共享资料,信息互通。需要更多相关资料和设计源代码。加QQ:493703123基于Java的五子棋游戏的设计基于Java的五子棋游戏的设计摘要五子棋作为一个棋类竞技运动,在民间十分流行,为了熟悉五子棋规则及技巧,以及研究简单的人工智能,决定用Java开发五子棋游戏。主要完成了人机对战和玩家之间联网对战2个功能。网络连接部分为Socket编程应用,客户端和服务器端的交互用ClassMessage定义,有很好的可扩展性,客户端负责界面维护和收集用户输入的信息,及错误处理。服务器维护在线用户的基本信息和任意两个对战用户的棋盘信息,动态维护用户列表。在人机对弈中通过深度搜索和估值模块,来提高电脑棋手的智能。分析估值模块中的影响精准性的几个要素,以及提出若干提高精准性的办法,以及对它们搜索的节点数进行比较,在这些算法的基础上分析一些提高电脑AI方案,如递归算法、电脑学习等。算法的研究有助于理解程序结构,增强逻辑思维能力,在其他人工智能方面也有很大的参考作用。关键词:深度搜索;估值;电脑AI;五子棋;算法GobangJava-basedgamesdesignAbstractAsasport,gobangisverypopularincivil,inordertobecomefamiliarwithgobangrulesandtechniques,andthestudyofsimpleartificialintelligence,IdecidetousetheJavatodevelopegobanggamesandcompletethetwofunctionsincludingman-machinewarandman-manwar.NetworkConnectionisSocketProgrammingforsomeapplications,clientandserverinteractionisdefinitedbyClassMessage,whichisaverygoodscalability,Clientinterfaceisresponsibleforthecollectionandmaintenanceofuserinputinformation,anderrorhandling.Serverusersmaintainonlinebasicinformationandarbitrarytwo-timeusersofthechessboardofinformation,dynamicmaintenanceuserlist.Duringtheman-machineplayers,itimprovesintelligenceofthecomputerplayersthroughdepthsearchandvaluationmodule.AnalyzesModulevaluationofthepreciseelements,aswellasanumberofincreasedprecision,andcomparestheirsearchfornodes,whichraisessomecomputerAIprogramsonthebasisofanalysis,suchasrecursivealgorithm,computerlearning.Algorithmofprocedurescontributetotheunderstandingofthestructure,logicalthinkingability,Inotherareasofartificialintelligencehasgreatreferences..Keywords:Searchdepth;Valuation;ComputerAI;Gobang;Algorithm目录论文总页数:23页1引言...........................................................................................................................................11.1课题背景...........................................................................................................................11.2本课题研究的意义...........................................................................................................11.3本课题的研究方法...........................................................................................................22课题相关基础...........................................................................................................................22.1五子棋...............................................................................................................................22.1.1棋盘和棋子..............................................................................................................22.1.2规则及解释..............................................................................................................32.1.3五子棋常用术语......................................................................................................42.1.4五子棋攻防..............................................................................................................73JAVA.........................................................................................................................................83.1JAVA简介...........................................................................................................................83.2JAVA开发环境...................................................................................................................94课题详细研究方法.................................................................................................................104.1程序结构说明.................................................................................................................104.2棋盘及棋子的类.............................................................................................................114.2.1棋盘.........................................................................................................................114.2.2棋子........................................................................................................................134.3胜负判断条件.................................................................................................................134.4网络对战.........................................................................................................................154.5电脑AI............................................................................................................................17结论.........................................................................................................................................21参考文献............................................................................................................错误!未定义书签。致谢............................................................................................................错误!未定义书签。声明............................................................................................................错误!未定义书签。第1页共23页1引言1.1课题背景五子棋是起源于中国古代的传统黑白棋种之一。现代五子棋日文称之为连珠,英译为Renju,英文称之为Gobang或FIR(FiveinaRow的缩写),亦有连五子、五子连、串珠、五目、五目碰、五格等多种称谓。五子棋起源于古代中国,发展于日本,风靡于欧洲。对于它与围棋的关系有两种说法,一说早于围棋,早在“尧造围棋”之前,民间就已有五子棋游戏;一说源于围棋,是围棋发展的一个分支。在中国的文化里,倍受人们的青睐。本世纪初五