IDA* 有 15 个谜题,需要帮助
当IDA*(迭代加深A星)算法运行15个难题时,我必须对其进行可视化。确切地说,我需要可视化树和拼图。
我需要实现三件事:
1 )IDA* 代码。
2)之后,IDA*与问题(15-puzzle)联系起来。
3)之后,我需要可视化算法树。
但我相信之前肯定有人已经实现了运行 15 个谜题问题的 IDA* 代码。我需要你的帮助来找到这个源代码,这样我就不会花两个月的时间去写以前别人写过的代码,这样我就有时间专注于可视化。
我了解一些 C、C++ 和 C#。
我需要一个我能理解的简单源代码,在其中您输入一个表格作为谜题,它会返回一个包含已解决谜题的表格。
其次,您建议我使用上述 3 种编程语言中的哪种编程语言进行可视化?
我找到了一些实现:
C++ 中的 A*,我需要 IDA*
pheudocode 中的 IDA* 链接1 链接2 link3
解决滑动难题的 A* 和 IDA*(这个使用未定义的模板)
I have to make a visualisation of the IDA*(iterative deepening A star) algorithm when it is running a 15-puzzle problem. Exactly, I need to visualize the tree and the puzzle.
IDA* algorithm is similar to the A* algorithm. link 1 2 3
There are 3 things I need to implement:
1)The IDA* code.
2)After that, the IDA* connected with the problem(15-puzzle).
3)And, after that, I need to visualize the tree of the algorithm.
But I believe that someone before must have implemented the code for the IDA* running the 15-puzzle problem. I need your help to find this source code so that I would not spent 2 months writing code that has been written by someone else before, so that I would have time to focus on the visualization.
I know some C,C++ and C#.
I need a simple source code, that I would comprehend, in which you input a table as a puzzle and it gives you back as a table with the solved puzzle.
Secondly, what programming language from the 3 above do you suggest me to use for the visualization?
I have found some implementations:
A* in C++, I need IDA*
IDA* in pheudocode link1 link2 link3
A* and IDA* that solves Sliding puzzle (This one uses templates that aren't defined)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IDA* 的实施大约需要十分钟。你的启发式函数是微不足道的,我想你至少设法实现曼哈顿距离(有更好的启发式,但这样就可以了)。
然后您只需实施 A*,然后添加截止限制标准。您链接到的维基百科文章甚至有一个 Python 实现,您只需翻译即可。
IDA* takes approximately ten minutes to implement. Your heuristic function is trivial, I guess you at least manage to implement manhattan distance (there are better heuristics, but this'll do).
Then you simply implement A* and then add the cut-off limit criteria. The Wikipedia article you link to even has an implementation in Python you simply can translate.