中国象棋对弈游戏设计

.............................................................................................................................................1机器博弈是博弈游戏与计算机设计的结合,是人工智能领域里一个重要研究领域,在国际上已经开展了半个多世纪,在人工智能领域始终将棋类的机器博弈作为最具有挑战性的研究方向之一。本系统是基于Visual C++开发的一款计算机博弈程序,包括人机对战,人人对战两种模式,采用Alpha-beta搜索算法达到了一定的人工智能水平。本系统将C++、VC++、数据结构、算法分析与设计结合在一起,主要由局面表示、走法表示及生成、局面评估、搜索算法及程序界面等5大部分组成。
目 录
Abstract.......................................................................................................................................1
Key words...................................................................................................................................1
引言.............................................................................................................................................1
1 研究背景 1
1.1研究背景及意义 1
1.2研究现状及发展趋势 2
1.3论文组织结构 2
2 开发平台及应用技术 2
2.1 开发平台 2
2.2 应用技术 2
3 系统分析 2
 *好棒文|www.hbsrm.com +Q: ^351916072^ 
3.1用户需求分析 2
3.2可行性分析 3
3.3系统功能 3
3.4难点分析 3
4 系统设计 3
4.1走棋示意图 3
4.2系统流程图 4
4.3响应鼠标处理流程图 4
5 系统实现 5
5.1系统内容 5
5.2局面表示 5
5.2.1棋盘表示 5
5.2.2棋子表示 6
5.2.3简化合理位置数组 7
5.2.4字符串表示局面 8
5.2.5不同表示方法的转换 8
5.2.5.1 一维数组转换成FEN串 8
5.2.5.2 FEN串转换成一维数组 9
5.3走法表示和走法生成 10
5.3.1走法表示 10
5.3.2走法生成 10
5.3.2.1生成马的走法 10
5.3.2.2生成将(帅)的走法 11
5.3.2.3生成士(仕)的走法 11
5.3.2.4生成象(相)的走法 12
5.3.2.5生成车的走法 13
5.3.2.6生成炮的走法 13
5.3.2.7生成兵(卒)的走法 14
5.3.3将军检测 15
5.4局面评价 16
5.5搜索算法 17
6 系统界面与资源 19
6.1系统界面 19
6.2系统资源 19
7 软件测试 20
7.1软件测试的定义 20
7.2软件测试的目的与意义 20
7.3软件测试的结果 20
8 结论与展望 21
致谢 21
参考文献 21
中国象棋对弈游戏设计
计算机科学与技术专业学生 俞森
指导教师 徐焕良
The game design of Chinese chess
Student majoring in Computer Science and Technology Yu Sen
Tutor Xu Huanliang
Abstract: computer games combine the game with program design which is an important reserch direction of artificial intelligence and has developed for half a century in internation, the computer game of board games is always regarded as the most challenging reserch direction in AI field.The system based on Visual C++ luaguage, include manmachine games and manman games,and adopt Alphabeta to achieve artificial intelligence.The system combines C++ luaguage,Visual C++ luaguage,the data structure with algorithm analysis and design.It is mainly composed of five parts including the representation of the situation,the representation and the generation of the moves,the evaluation of the situation,the algorithm of
The search and the program interface.
Key words: computer;game;artificial intelligence;Alphabeta
中国象棋,一个简单而古老的游戏,在中国流传已久。两方棋手相互揣摩、相互牵制,最大化自己的利益同时最小化对方的利益,如此便下出了精彩纷呈、变化多端的棋局。

版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/jsj/jsjkxyjs/2012.html

好棒文