中国象棋游戏的设计与实现

摘  要

象棋程序的实现可以被分为人工智能和界面程序辅助两大部分。人工智能部分主要体现计算机的下棋思路,既计算机如何进行思考并以最佳走法完成下一步,先由相应的搜索算法进行搜索,并对各种可能的走法进行估值,从中选择胜利面最大的一步;而界面及程序辅助部分主要便于用户通过以前的下棋步骤,更好地调整下棋思路,着法显示使用户能够清楚地知道下棋过程,更准确地把握整个局面。

本文首先研究了中国象棋在计算机中的表示问题,接着讨论如何产生着法一系列相关内容。其次研究了博弈树的极小极大搜索技术及在此基础上发展起来的Alpha-Beta剪枝算法,使用MFC文档视图体系结构和Visual C++开发工具,实现了一个具有一定棋力的中国象棋人机对弈程序。

 

 

关键词:中国象棋;人工智能;博弈树;Alpha-Beta搜索

 

The Design and Implementation of Chinese Chess

Abstract

The implementation of a chess program can be decomposed into two major parts: the artificial intelligence and the user interface and program assist. The part of artificial intelligence shows the way of computer thinking, and which step is the best step would be decided by it. Firstly, the computer uses search algorithms to search, and then evaluates every impossible step, finally choses the best one, the other part is used for the player to adjust his thought to the currently phases. The display of step list makes player know the process of chess distinctly, and let player make a better choice.

This paper firstly studies how to represent a chess board in computer, then discusses how to generate legal moves. Secondly, this paper studies the mini-max searching procedure of Game Tree, and the Alpha-Beta pruning algorithm. A Chess-playing system is designed and developed, which is built on the integrated computer MFC SDI document view architecture by using Visual C++.

 

Key words: Chinese chess; Artificial Intelligence; Game tree; Alpha-Beta searching

 

目  录

论文总页数:22页

1   引言… 1

1.1   象棋设计背景和研究意义… 1

1.2   象棋设计研究方法… 1

2   人工智能算法设计… 2

2.1   棋局表示… 3

2.2   着法生成… 4

2.3   搜索算法… 5

2.4   历史启发及着法排序… 9

2.5   局面评估… 9

2.6   程序组装… 11

3   界面及程序辅助设计… 12

3.1   界面基本框架… 12

3.2   多线程… 13

3.3   着法名称显示… 14

3.4   悔棋和还原… 15

4   系统实现… 16

结    论… 19

参考文献… 20

致    谢… 21

声    明… 22

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。

最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。 若排除这种情况,可在对应资源底部留言,或联络我们。

对于会员专享、整站源码、程序插件、网站模板、网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。

如果您已经成功付款但是网站没有弹出成功提示,请联系站长提供付款信息为您处理

源码素材属于虚拟商品,具有可复制性,可传播性,一旦授予,不接受任何形式的退款、换货要求。请您在购买获取之前确认好 是您所需要的资源