如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
中国象棋游戏的设计与实现摘要本文首先研究了中国象棋在计算机中的表示问题,接着讨论如何产生着法一系列相关内容。其次研究了博弈树的极小极大搜索技术及在此基础上发展起来的Alpha-Beta剪枝算法,使用MFC文档视图体系结构和VisualC++开发工具,实现了一个具有一定棋力的中国象棋人机对弈程序。象棋程序的实现可以被分为人工智能和界面程序辅助两大部分。人工智能部分主要体现计算机的下棋思路,既计算机如何进行思考并以最佳走法完成下一步,先由相应的搜索算法进行搜索,并对各种可能的走法进行估值,从中选择胜利面最大的一步;而界面及程序辅助部分主要便于用户通过以前的下棋步骤,更好地调整下棋思路,着法显示使用户能够清楚地知道下棋过程,更准确地把握整个局面。关键词:中国象棋;人工智能;博弈树;Alpha-Beta搜索TheDesignandImplementationofChineseChessAbstractTheimplementationofachessprogramcanbedecomposedintotwomajorparts:theartificialintelligenceandtheuserinterfaceandprogramassist.Thepartofartificialintelligenceshowsthewayofcomputerthinking,andwhichstepisthebeststepwouldbedecidedbyit.Firstly,thecomputerusessearchalgorithmstosearch,andthenevaluateseveryimpossiblestep,finallychosesthebestone,theotherpartisusedfortheplayertoadjusthisthoughttothecurrentlyphases.Thedisplayofsteplistmakesplayerknowtheprocessofchessdistinctly,andletplayermakeabetterchoice.Thispaperfirstlystudieshowtorepresentachessboardincomputer,thendiscusseshowtogeneratelegalmoves.Secondly,thispaperstudiesthemini-maxsearchingprocedureofGameTree,andtheAlpha-Betapruningalgorithm.AChess-playingsystemisdesignedanddeveloped,whichisbuiltontheintegratedcomputerMFCSDIdocumentviewarchitecturebyusingVisualC++.Keywords:Chinesechess;ArtificialIntelligence;Gametree;Alpha-Betasearching目录论文总页数:22页TOC\o"1-3"\h\z\uHYPERLINK\l"_Toc170710061"1引言PAGEREF_Toc170710061\h1HYPERLINK\l"_Toc170710062"1.1象棋设计背景和研究意义PAGEREF_Toc170710062\h1HYPERLINK\l"_Toc170710063"1.2象棋设计研究方法PAGEREF_Toc170710063\h1HYPERLINK\l"_Toc170710064"2人工智能算法设计PAGEREF_Toc170710064\h2HYPERLINK\l"_Toc170710065"2.1棋局表示PAGEREF_Toc170710065\h3HYPERLINK\l"_Toc170710066"2.2着法生成PAGEREF_Toc170710066\h4HYPERLINK\l"_Toc170710067"2.3搜索算法PAGEREF_Toc170710067\h5HYPERLINK\l"_Toc170710068"2.4历史启发及着法排序PAGEREF_Toc170710068\h9HYPERLINK\l"_Toc170710069"2.5局面评估PAGEREF_Toc170710069\h9HYPERLINK\l"_Toc170710070"2.6程序组装PAGEREF_Toc17