Where to learn A*

Hello, does anyone know of a website, book, course, or video tutorial that teaches A* and actually implements it? Most articles only explains what A* is and they do not show an actual implementation of the algorithm while some other websites post the source code without explaining or commenting any of it at all.

Does anyone know of a book or article or just about whatever really that explains the algorithm and implement it all based on their explanation?

Thank you!
Last edited on
Just a quick search found this site: http://www.redblobgames.com/pathfinding/a-star/introduction.html
And its companion page showing implementation in Python, C++, and C#: http://www.redblobgames.com/pathfinding/a-star/implementation.html

Programming Game AI by Example by Mat Buckland I think also covers A*, but I can't recall off hand.
Last edited on
Yup "Programming Game AI by Example" definitely does cover A* (Along with other common pathfinding algorithms). I would highly recommend checking it out if you are interested in graph traversing or even graphing in general. Mainly because it goes quite a bit more in depth into the subject then you will find on your standard everyday internet tutorials.

Another good AI book that I liked was "Artificial Intelligence for Games 2nd Edition" by Ian Millington. While "Programming Game AI by Example" teaches purely though example as the title states, "Artificial Intelligence for Games" delves more into the general theory behind the concepts and how to implement them, it also goes quite a bit more in-depth into each subject. Both have different teaching styles so all depends on what style you like better.

Both books have excellent sections on Graphing and Pathfinding and would recommend checking both out.
I almost bought the ebook version of that, but I can't afford the $60. I got the other book as part of my college course books, but been six years since I read it so couldn't recall. Will have to get Millington's book when I get the money as it sounds like an interesting read. I spend more time reading books than I do actually coding anymore as I love the knowledge the books have in them.
Topic archived. No new replies allowed.