中国象棋游戏的设计与实现摘要象棋程序的实现可以被分为人工智能和界面程序辅助两大部分。人工智能部分主要体现计算机的下棋思路,既计算机如何进行思考并以最佳走法完成下一步,先由相应的搜索算法进行搜索,并对各种可能的走法进行估值,从中选择胜利面最大的一步;而界面及程序辅助部分主要便于用户通过以前的下棋步骤,更好地调整下棋思路,着法显示使用户能够清楚地知道下棋过程,更准确地把握整个局面。本文首先研究了中国象棋在计算机中的表示问题,接着讨论如何产生着法一系列相关内容。其次研究了博弈树的极小极大搜索技术及在此基础上发展起来的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页1引言..................................................................................................................................11.1象棋设计背景和研究意义.......................................................................................11.2象棋设计研究方法...................................................................................................12人工智能算法设计...........................................................................................................22.1棋局表示..................................................................................................................32.2着法生成..................................................................................................................42.3搜索算法..................................................................................................................52.4历史启发及着法排序...............................................................................................92.5局面评估..................................................................................................................92.6程序组装..................................................................................................................113界面及程序辅助设计.......................................................................................................123.1界面基本框架...........................................................................................................123.2多线程......................................................................................................................133.3着法名称显示...............................................................