第一范文网 - 专业文章范例文档资料分享平台

基于Android技术的中国象棋人机对弈游戏的设计与实现

来源:用户分享 时间:2025/7/26 19:13:46 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

西安邮电大学

毕 业 设 计(论 文)

android技术的中国象棋人机对

弈游戏的设计与实现

目:基于

目 录

摘 要 ...................................................... I ABSTRACT .................................................... II 1 绪论 ....................................................... 1

1.1 研究背景 ....................................................... 1

1.1.1中国象棋背景 .............................................. 1 1.1.2 Android系统简介 .......................................... 1 1.2 本论文研究意义 ................................................. 3

2设计相关技术理论 ........................................... 5

2.1 游戏系统开发平台及搭建 ......................................... 5 2.2 可行性研究 ..................................................... 6

3游戏系统功能分析与设计 ..................................... 7

3.1 界面的需求分析 ................................................. 7 3.2游戏走棋需求设计分析 ............................................ 7 3.3类框架的设计 .................................................... 8

4 游戏系统的设计与实现 ....................................... 9

4.1游戏界面的设计 .................................................. 9

4.1.1 共有类ChessActivity的实现 ............................... 9 4.1.2 辅助界面相关类的实现 ..................................... 9 4.1.3 游戏界面相关类的实现 ..................................... 9 4.2 中国象棋的规则及走法的实现 .................................... 10

4.2.1行棋规则 ................................................. 10 4.2.2棋盘的表示 ............................................... 22 4.3 游戏人机会话的实现 ............................................ 23

4.3.1 着法的生成 .............................................. 23 4.3.2 搜索算法 ................................................ 24 4.3.3 局面评估 ................................................ 26

5 游戏系统模块的设计实现 .................................... 28

5.1 欢迎界面 ...................................................... 28 5.2菜单界面 ....................................................... 28 5.3 帮助界面 ...................................................... 30 5.4游戏界面 ....................................................... 30

6 运行测试 .................................................. 34 7 结束语 .................................................... 35 致 谢 ...................................................... 36 参考文献 .................................................... 37 附录: ...................................................... 38 译文 ........................................................ 48

基于Android技术的中国象棋人机对弈游戏的设计与实现

摘 要

中国象棋是一款智力休闲游戏,具有历史悠久而且拥有巨大的游戏爱好者群体,

他们以中国象棋陶冶情操、锻炼智力、体验象棋带来的快乐,中国象棋还是一个老少皆宜的娱乐游戏。随着手持设备、智能手机的普及,搭载Android操作系统的智能手机也已经走进了千家万户,当人们闲暇偶尔需要娱乐时,却发现没有实物象棋,该软件不失为一个很好的替代品,供大家进行娱乐享受,尤其是在现在这个快节奏的社会中 ,人们更满足于手机的使用,可以方便地随意移动,不像实物象棋那样静静的坐着。

本论文通过实际应用软件的开发深入分析和研究Android开发技术。实现中国象棋的人机会话。本文实现了中国象棋在计算机中表示问题,基于Android平台应用,人机对战模拟现实中的人人对战;讨论走棋规则和着法的实现等一系列问题,最终电脑能够通过产生着法,搜索,估计来产生一步最优的走棋,实现人机会话的目的。

关键字:中国象棋,Android,智能手机,人机对战

I

基于Android技术的中国象棋人机对弈游戏的设计与实现

ABSTRACT

Chinese Chess is an intellectual casual games, has a long history and has a huge game

enthusiasts groups, Chinese Chess edify sentiment, exercise intelligence, experience the joy of chess brought Chinese Chess is an entertainment for all ages games. With the popularity of handheld devices and smart phone, smart phone equipped with Android operating system has entered every household, when people leisure occasionally need entertainment, but found no physical chess, the software would be a good substitute for entertainment, especially in this fast-paced society, people are more satisfied with the use of mobile phones, you can easily move freely, unlike physical chess as sitting quietly. With the development for the practical application of software, Android development technology was deeply analyzed and researched to achieve human-machine chess battle of Chinese chess in this thesis. This article realization of the Chinese chess in the computer representation that the problem, based on the application of Android platform, a series of questions were discussed about the man-machine war simulate and related playing chess rules and achieving chess moves. Finally, the computer products a best way for computer moves to achieve the purpose of man-machine war with the chess moving and searching and estimating.

Keywords: Chinese Chess,Android,smart phone,man-machine war

II

基于Android技术的中国象棋人机对弈游戏的设计与实现.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c5h5fa45e9t03ypi6bk157e16g2f50200ouc_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top