What is the point of IDA* vs A* algorithm

后端 未结 1 1022
悲&欢浪女
悲&欢浪女 2021-02-05 19:06

I don\'t understand how IDA* saves memory space. From how I understand IDA* is A* with iterative deepening.

What\'s the differenc

相关标签:
1条回答
  • 2021-02-05 19:46

    In IDA*, unlike A*, you don't need to keep a set of tentative nodes which you intend to visit, therefore, your memory consumption is dedicated only to the local variables of the recursive function.

    Although this algorithm is lower on memory consumption, it has its own flaws:

    Unlike A*, IDA* doesn't utilize dynamic programming and therefore often ends up exploring the same nodes many times. (IDA* In Wiki)

    The heuristic function still needs to be specified for your case in order to not scan the whole graph, yet the scan's memory required in every moment is only the path you are currently scanning without its surrounding nodes.

    Here is a demo of the memory required in each algorithm:

    In the A* algorithm all of the nodes and their surrounding nodes needs to be included in the "need to visit" list while in the IDA* you get the next nodes "lazily" when you reach its previews node so you don't need to include it in an extra set.

    As mentioned in the comments, IDA* is basically just IDDFS with heuristics:

    0 讨论(0)
提交回复
热议问题