-
A* pathfinding
I am possibly looking to develop an A* pathfinding algorithm for part of my project to navigate an entity around a 2D map. I have seen the algorithm implemented using a linked list. Although I have covered linked lists in my studies and would feel confident using them, I would prefer if possible to iterate over an array instead. Does anyone know if this can be done or are the 'next' and 'previous' pointer elements of a linked list going to be crucial in an algroithm such as this?
-
What does the algorithm do? Show us some code?
-
Sorry, I thought it was a pretty standard algorithm that people would be familiar with. This is the example implementation I found on the web and the link is the tutorial of the algorithm.
http://www.geocities.com/jheyesjones/astar.html
-
OK, now I know what the A* algorithm does. I did not know this and had to take an AI course in grad school.
You can have array based lists. Most of your Data Structure books have examples. I am looking at C++ Data Structures and they have an array based list ADT. Other DS texts have something similar.
Make sense.