ID:273175
Nov 21 2009, 12:10 pm
|
|
Can someone explain the basics of "pathing" AI to me, or link to a demo which I can analyze and thus learn. Thanks in advance for any and all help!
|
Nov 21 2009, 3:06 pm
|
|
http://en.wikipedia.org/wiki/A*_search_algorithm
|
For an implementation of what Garthor linked to, you might check out hub://kuraudo.libpathfinder, which is based on hub://theodis.pathfinder.
I personally find mine slightly more usable and faster, though it doesn't offer the Djikstra algorithms, if you're looking for those. |
Might want to look into Depth First Search, and Breadth First Search then Dijkstra and A*.
Depth First Search, and Breadth First Search are uninformed algoritms. They'll search every neighbor (tile) to the destination. Basically if you want an AI that can go through walls ( walk into walls with collision ) Dijkstra and A* are informed algorithms. Dijkstra finds the cheapest neighbor to the destination by calculating cost. So, they aim to take the cheapest route. A* is basically Dijkstra with the addition of calculating distance. Might want to read / get "Programming Game AI by Example" book. (Code is in C++) |