User icon

Ibrahim Gabol

← Back

A Star in C


AStarInC

A* pathfinding algorithm in c.

The algorithm uses a combined heuristic as dictated in the A* algorithm, to find the shortest path between two nodes.

Red is coordinates. Blue is cost between the nodes.

In main.c, there is setup for nodes in the 2D Plane. Example is given in main.c

The algorithm ignores the shorter paths south from S, because they are straying further from E.