|
Posted by Robbo on December 6, 2009, 11:05 am
In this example, robot (^) wants to go to
place marked by "@".
(please copy maze shown below to notepad to
have equal wide fonts)
. - is cell
, - is opening between cells
# - wall
x - destination position
^ - actual position of robot
# # # # # # # # #
.
# ###,# # # # # #
#^,.#
# #,##### # # # #
#.,.,.#x
# #,###,#,# # # #
.,.#.,.,.#
###,#,##### # # #
.,.#.,.,.#
# ###,###,### # #
,.#.#.#.#.#
#####,#,#,#,### #
#.,.,.#.,.,.,.#
#,#,#######,### #
.#.#.,.,.,.#.#
###,#,###,#,#,# #
#.,.#.#.,.#.,.#
############### #
# # # # # # # # #
for this maze, my implementation of A*
generates such digits:
# # # # # # # # # #
2
# # ### # # # # # #
#^ 1#
# # # ##### # # # #
#1 #
# # # ### # # # # #
# #
# ### # ##### # # #
# #
# # ### ### ### # #
# # # # #
# ##### # # # ### #
# # #
# # # ####### ### #
# # # #
# ### # ### # # # #
# # # # #
# ############### #
# # # # # # # # # #
As you can see, it try to go up and
generates only two 1 and one 2.
Digits even do not connect to destination.
|