文件名称:ai1
介绍说明--下载内容来自于网络,使用问题请自行百度
带回溯的深度优先策略:解决经典野人传教士过河问题的求解:三个修道士和三个野人过河,船一次最多只能载两个人,在任何时候修道士的人数不能少于野人人数,否则野人会吃掉修道士。找出六个人顺利过河的所有方案。
采用带回溯的深度优先搜索策略,共定义了7种合法操作{2,0,0},{1,0,0},{1,1,0},{0,1,0},{0,2,0},{0,1,1},{1,0,1}代表上船的人数,根据船所在位置决定在状态上是加或者减操作。扩展结点时按顺序应用操作,知道回溯到初始状态且所有操作用完,程序结束。-With a backtracking depth-first strategy: to solve the classic problem solving Savage missionaries across the river: three monks and three Savage across the river, the ship only contained a maximum of two people, the number of monks at any time not less than the number of Savage Otherwise, Savage will eat monks. Smoothly across the river to find six people to all programs. Used with a backtracking depth-first search strategy, a total of seven kinds of legal action defined (2,0,0), (1,0,0), (1,1,0), (0,1,0), (0 , 2,0), (0,1,1), (1,0,1) represents the number of people on board, according to vessel location decision is plus or minus state operation. Extension junction point, application and operation in order to know back to the initial state and all the operations used up, the process has been completed.
采用带回溯的深度优先搜索策略,共定义了7种合法操作{2,0,0},{1,0,0},{1,1,0},{0,1,0},{0,2,0},{0,1,1},{1,0,1}代表上船的人数,根据船所在位置决定在状态上是加或者减操作。扩展结点时按顺序应用操作,知道回溯到初始状态且所有操作用完,程序结束。-With a backtracking depth-first strategy: to solve the classic problem solving Savage missionaries across the river: three monks and three Savage across the river, the ship only contained a maximum of two people, the number of monks at any time not less than the number of Savage Otherwise, Savage will eat monks. Smoothly across the river to find six people to all programs. Used with a backtracking depth-first search strategy, a total of seven kinds of legal action defined (2,0,0), (1,0,0), (1,1,0), (0,1,0), (0 , 2,0), (0,1,1), (1,0,1) represents the number of people on board, according to vessel location decision is plus or minus state operation. Extension junction point, application and operation in order to know back to the initial state and all the operations used up, the process has been completed.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ai1.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.