Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A* implemented in C

Where can I find an A* implementation in C?

I was looking around but it seems my google-fu is not strong enough. I've started writing my own implementation, but then I remembered Stack Overflow and I thought I should ask here first. It seems a bit complicated to write a real A* implementation - I was tempted to just write an implementation of Dijkstra's algorithm for a binary grid, since that's all I really need, but I feel like I want to have a C A* implementation in my repertoire.

like image 217
Vasiliy Sharapov Avatar asked Dec 13 '22 20:12

Vasiliy Sharapov


2 Answers

Your google-fu is indeed weak, young padawan :-)

Try googling for astar c.

The first and second links are actual code implementations (the first under a liberal MIT licence, no idea about the second).

like image 57
paxdiablo Avatar answered Dec 25 '22 23:12

paxdiablo


here you can find the pseudocode: http://en.wikipedia.org/wiki/A*

to find the right code for you just search after: astar graph search algorithm C

like image 35
Ervin Avatar answered Dec 25 '22 22:12

Ervin