ln015 - A* Pathfinding The A* pathfinding algorithm is an...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
A* Pathfinding The A* pathfinding algorithm is an exhaustive search algorithm which is guaranteed to find the shortest path between two points. The basic assumption is that the search area is tiled (e.g. square tile) and that the animat moves from the center of one tile to the center of the next tile.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A* Algorithm Add the starting square to the open list . Repeat the following: Look for the lowest F cost square on the open list. We refer to this as the current square. Switch it to the closed list . For each square adjacent to this current square If it is not walkable or if it is on the closed list, ignore it. If it is not on the open list, add it to the open list. Make the current square the parent of this square. Record the F, G, and H costs of the square. If it is on the open list already, check to see if this path to that square is better, using G cost as the measure. If so, change the parent of the square to the current square, and recalculate the G and F scores of the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 11

ln015 - A* Pathfinding The A* pathfinding algorithm is an...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online