IDA* 有 15 个谜题,需要帮助

发布于 2024-12-23 11:37:32 字数 2171 浏览 3 评论 0原文

IDA*(迭代加深A星)算法运行15个难题时,我必须对其进行可视化。确切地说,我需要可视化拼图

IDA*算法与A*算法类似。 链接 1 2 3

我需要实现三件事:

1 )IDA* 代码。

2)之后,IDA*与问题(15-puzzle)联系起来。

3)之后,我需要可视化算法树。

但我相信之前肯定有人已经实现了运行 15 个谜题问题的 IDA* 代码。我需要你的帮助来找到这个源代码,这样我就不会花两个月的时间去写以前别人写过的代码,这样我就有时间专注于可视化。

15-puzzle 链接 1 , 链接 2

我了解一些 C、C++ 和 C#。

我需要一个我能理解的简单源代码,在其中您输入一个表格作为谜题,它会返回一个包含已解决谜题的表格。

其次,您建议我使用上述 3 种编程语言中的哪种编程语言进行可视化?

我找到了一些实现:

IDA* in LISP

C++ 中的 A*,我需要 IDA*

IDA*在java中

pheudocode 中的 IDA* 链接1 链接2 link3

C 语言的 IDA*

IDA* 与 15-puzzle

15-puzzle 在小程序中解决

解决滑动难题的 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.

15-puzzle link 1 , link 2

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:

IDA* in LISP

A* in C++, I need IDA*

IDA* in java

IDA* in pheudocode link1 link2 link3

IDA* in C

IDA* with 15-puzzle

15-puzzle solved in an applet

A* and IDA* that solves Sliding puzzle (This one uses templates that aren't defined)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

潦草背影 2024-12-30 11:37:32

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文