没有合适的资源?快使用搜索试试~ 我知道了~
九宫排序问题的实现
需积分: 28 4 下载量 13 浏览量
2015-05-29
20:11:15
上传
评论
收藏 245KB DOC 举报
温馨提示
试读
21页
九宫排序(八数码问题)是人工智能中一个很典型的智力问题。本文以状态空间搜索的观点讨论了九宫排序问题,给出了九宫排序问题的C语言算法与实现的思想,分析了A算法的可采纳性等及系统的特点。九宫排序问题是人工智能当中有名的难题之一。问题是在3×3方格盘上,放有八个数码,剩下一个位置为空,每一空格其上下左右的数码可移至空格。问题给定初始位置和目标位置,要求通过一系列的数码移动,将初始状态转化为目标状态。状态转换的规则:空格四周的数移向空格,我们可以看作是空格移动,它最多可以有4个方向的移动,即上、下、左、右。九宫重排问题的求解方法,就是从给定的初始状态出发,不断地空格上下左右的数码移至空格,将一个状态转化成其它状态,直到产生目标状态。 九宫排序实验环境为Windows 7,实验编程工具为VC++6.0,且其算法规模小,最大搜索深度不超过32。
资源推荐
资源详情
资源评论
数
据
结
构课程设计(论文)
题 目 九宫排序
作 者
院 (系) 信息工程学院
专 业
指导教师
答辩日期
I
数据结构课程设计(论文)
摘要
九宫排序(八数码问题)是人工智能中一个很典型的智力问题。本文以状态空
间搜索的观点讨论了九宫排序问题,给出了九宫排序问题的 C 语言算法与实现的
思想,分析了 A 算法的可采纳性等及系统的特点。九宫排序问题是人工智能当中
有名的难题之一。问题是在 3×3 方格盘上,放有八个数码,剩下一个位置为空,
每一空格其上下左右的数码可移至空格。问题给定初始位置和目标位置,要求通
过一系列的数码移动,将初始状态转化为目标状态。状态转换的规则:空格四周
的数移向空格,我们可以看作是空格移动,它最多可以有4个方向的移动,即上
下、左、右。九宫重排问题的求解方法,就是从给定的初始状态出发,不断地空
格上下左右的数码移至空格,将一个状态转化成其它状态,直到产生目标状态。
九宫排序实验环境为 Windows 7,实验编程工具为 VC++6.0,且其算法规模小,最大
搜索深度不超过 32。
关键词:九宫重排,状态空间,启发式搜索,A 算法
II
九宫排序(论文)
Abstract
Jiugong sort (eight digital problem) is a typical mental problems in artificial
intelligence. In this paper, the state space search approach eight digital
problem, C language algorithm eight digital problem is presented and the
realization of the thought, analyzes the characteristics of admissibility and
system of A algorithm. Jiugong sequencing problem is one of the difficult
problems in artificial intelligence known. The problem is in the 3 * 3 squares,
with eight digital, leaving a location is empty, every space and the upper and
lower about digital can be moved to the space. Given the initial position and the
target position, through a series of digital mobile, the initial state to the target
state. State transition rules: the space around the number moved to the space,
we can be seen as the mobile space, move it can have up to 4 directions,
namely, left, right. Method JiuGongTu rearrangement problem, is from a given
initial state of continuous space, up and down about digital to space, a state into
another state, until the target state. The experimental environment Jiugong
ordering for Windows 7, the experimental programming tools for VC++6.0, and
the algorithm of small scale, the maximum search depth of no more than 32.
Keywords: JiuGongTu rearrangement, state space, heuristic search, A algorithm
1
数据结构课程设计(论文)
目 录
1 绪论......................................................................................................................................................3
1.1 课题背景及意义.......................................................................................................................3
1.1.1 背景说明................................................................................................................................3
1.1.2 课题意义................................................................................................................................3
1.2 九宫游戏的研究现状...............................................................................................................4
1.3 本论文的研究内容...................................................................................................................5
.................................................................................................................................................................5
2 系统需求分析......................................................................................................................................6
2.1 需求分析...................................................................................................................................6
2.1.1 功能描述........................................................................................................................6
2.1.2 操作特性分析................................................................................................................6
2.2 功能需求分析...........................................................................................................................7
2.3 可行性分析...............................................................................................................................7
3 系统概要设计......................................................................................................................................9
3.1 问题描述...................................................................................................................................9
3.2 问题的搜索形式描述...............................................................................................................9
3.3 解决方案介绍(原理).........................................................................................................10
4 算法设计............................................................................................................................................11
4.1 算法介绍.................................................................................................................................11
4.2 A*搜索算法一般介绍............................................................................................................11
4.3 算法伪代码.............................................................................................................................12
5 程序测试............................................................................................................................................13
5.1 实验环境与问题规模.............................................................................................................13
5.2 数据结构.................................................................................................................................13
5.3 实验结果.................................................................................................................................13
5.4 系统中间及最终输出结果.....................................................................................................14
5.4.1 输入数据结果如下图 3-1 所示:...............................................................................14
5.4.2 运行中间及最终结果如下图 3-2 所示......................................................................14
6 总结....................................................................................................................................................16
2
九宫排序(论文)
6.1 总结.........................................................................................................................................16
6.2 展望.........................................................................................................................................16
7 参考文献............................................................................................................................................17
剩余20页未读,继续阅读
资源评论
云梦仙魂
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功