摘要
本文模拟人工智能的思路,用回溯法编程求解爱因斯坦谜题,使总排列数下降了7 个数量级,极大提高了解题
速度。程序编写了线索输入函数,把迷题线索存入向量中,可随意修改线索的内容、数量及顺序,进而对新的谜题进行重新求
解,而不用修改剪枝函数的代码,适用性好。
Abstract
With the thought of artificial intelligence, this paper uses the backtracking algorithm in solving Einstein’s Riddle,
which can reduce the number of permutations by seven orders of magnitude and greatly improve the problem solving speed. The program
includes a clue input function and puts the puzzle clues in vector. The content, quantity and sequence of the clues can be modified
at random, to resolve new puzzles without modification of pruning function code. Therefore, the program has good applicability.
关键词
爱因斯坦谜题 /
回溯法 /
拼图 /
人工智能 /
向量
Key words
Einstein’S Riddle /
backtracking algorithm /
jigsaw /
A.I. /
vector
谢玉庚.
用回溯法编程求解爱因斯坦谜题[J]. 电脑与电信. 2016, 1(10): 50-51
Xie Yugeng.
The Solution of Einstein’S Riddle with Backtracking Algorithm[J]. Computer & Telecommunication. 2016, 1(10): 50-51
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}