【发布时间】:2018-10-15 20:04:52
【问题描述】:
我正在编写一个简单的滑动瓷砖 (3x3) 求解器。 这肯定不是最好的方法,我只是生成所有可能的配置,但我不知道为什么在执行过程中我的电脑死机,我必须手动重启。 这是主循环
while(!(tree->s==final))
{
//copy it in tree
expand_node(tree);
//check if in open then add if not
it++;
}
print_s(tree->s);
PS:我用
编译了所有内容g++ -Wall -Wextra -std=c++11 main.cpp
【问题讨论】:
-
请在您的问题正文中包含相关代码。这些链接会腐烂,对于任何来到它的用户来说,这个问题在未来都没有意义。此外,pastebin 广告非常庞大且不必要地分散注意力。
-
提供minimal reproducible example。 ~400 LOC 链接到 pastebin 绝对不是 minimal reproducible example。
标签: c++ algorithm c++11 tree sliding-tile-puzzle