Skip to main content
GameDev.net gamedev.net
🔒 Locked

A* algorithm heuristic and accuracy.

Started by GekkoCube Sep 9, 2003 at 9:36 PM 1 replies 250+ views
Original Post
GekkoCube
GekkoCube
I know this belongs in the AI for obvious reasons, but this is a game question as well. I read that if the heuristic is less accurate, then the path generated by A* is less than perfect. and if the heuristic is perfect or nearly perfect, then so will the path generated by A*. THis brings the question: I thought that A* always gave you the best, shortest path regardless. IS this wrong now? A* will only give you a path that is directly related to the heuristic you use?
JohnBolton
JohnBolton
quote:
Original post by GekkoCube
I read that if the heuristic is less accurate, then the path generated by A* is less than perfect.


No. As the AP stated, as long as the heuristic meets certain requirements, A* will find the shortest path regardless of how good the heuristic is. If the heuristic is less accurate, then the algorithm will take longer.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.