Jump to content
  • Advertisement
Sign in to follow this  

About A* and IDA* path finding algorithm

This topic is 3076 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have read about A* algorithm and i understand how it is done. Im also reading about the A* algorithm optimized by Iterative Deepening A.K.A. "IDA*". I would like to optimize my A* into IDA* but i don't where to start. Can u help me here?

Pseudocode for A*:

Here is a pseudocode i have found for IDA:

function IDA*(initial, Expand, Goal,
Cost, Heuristic)
limit Heuristic(initial)
do result, limit Contour (initial, limit)
if result then return result
if limit = 1 then return failure

function Contour(current, limit)
cost Cost(current) + Heuristic(current)
if limit < cost then return null, cost
if Goal(current) then return solution, cost
new-limit 1
for each next in Expand(current)
do result, cost Contour(next, limit)
if result then return solution, cost
new-limit min(new-limit, cost)
return failure, new-limit

Note: If u need the source code of my A*. Ill post it here

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!