c - how to find a path to go home - algorithm -
valid xhtml http://img2.blogcu.com/images/e/t/k/etkinlik4/clip_image001.jpg
assume there rabbit , @ position (1,1). moreover, home @ position (7,7). how can reach position ?
home positon not fix place.
real question, trying solve problem on book exersizing c.what algorithm should apply find solution? should use linked list store data?
data (1,1), (1,2),..., (3,3) ..., (7,7) place marked black shows wall.
use a*. classic go-to algorithm path-finding (that article lists many other algorithms can consider too).
by using a* learn algorithm might need in normal programming career later ;)
an example evaluation of maze similar in question using a*:

Comments
Post a Comment