# chess-ai
A chess engine by someone who doesn't know how to play chess.
## About
chess-ai is a simple chess AI in JavaScript.
The primary concern of chess-ai is the decision-making part of the application. All functionality outside the scope of the AI are implemented using external libraries:
- Chessboard GUI: Using the chessboard.js API
- Game Mechanics: Using the chess.js API
The AI uses the [minimax algorithm](https://en.wikipedia.org/wiki/Minimax), which is optimised by [alpha-beta pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning).
The evaluation function uses [piece square tables](https://www.chessprogramming.org/Piece-Square_Tables) adapted from Sunfish.py, and eliminates the need for nested loops by updating the sum based on each move instead of re-computing the sum of individual pieces at each leaf node.
A global sum is used to keep track of black's evaluation score after each move, which is used to display the 'advantage' bar.
## How to Play?
1. Head over to https://zeyu2001.github.io/chess-ai/.
2. Play as white by dragging a piece to your desired location. The AI plays as black. The AI's minimax search depth (which is directly related to how well it will play) can be customised using the 'Search Depth (Black)' dropdown. Using a higher value will improve the AI's accuracy, but it will take longer to decide on the next move.
3. To pit the AI against itself, click the 'Start Game' button under Computer vs. Computer. You can stop the game at any time using the 'Stop and Reset' button.
## License
Use of this project is governed by the [MIT License](LICENSE).
没有合适的资源?快使用搜索试试~ 我知道了~
JavaScript 中的简单国际象棋AI_JavaScript_代码_下载

共20个文件
png:12个
js:2个
css:1个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉

温馨提示
JavaScript 中的简单国际象棋 AI。使用 chess.js 和 chessboard.js 库。 关于 chess-ai 是 JavaScript 中的一个简单的国际象棋 AI。 chess-ai 的主要关注点是应用程序的决策部分。人工智能范围之外的所有功能都是使用外部库实现的: 棋盘图形用户界面:使用 chessboard.js API 游戏机制:使用 chess.js API AI 使用通过alpha-beta pruning优化的minimax 算法。 评估函数使用改编自 Sunfish.py 的块方表,并通过根据每次移动更新总和而不是重新计算每个叶节点上各个块的总和来消除嵌套循环的需要。 全局总和用于跟踪黑方每次移动后的评估分数,用于显示“优势”条。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论


























收起资源包目录



























共 20 条
- 1
资源评论

- 蔡岩8702025-01-17资源很不错,内容和描述一致,值得借鉴,赶紧学起来!

快撑死的鱼
- 粉丝: 2w+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 电大计算机网络试卷及答案.doc
- 2023年建设工程项目管理概论.doc
- 2023年网络营销试题库.doc
- 2023年江苏省中小学教师心理健康网络知识竞赛中学版.doc
- VS1及VBG常见故障及排除课件.ppt
- DBX01PLC可编程控制器实训装置.doc
- 2022自动化顶岗实习报告.docx
- Maven培训教材PPT课件.pptx
- 2023年计算机等级考试讲义一级教程.doc
- 传染病监测信息网络报告管理与新要求.ppt
- PT2262-PT2272编解码集成电路(可编辑修改word版).docx
- SY 4032.4-93 石油建设工程质量检验评定标准 通信工程(长途通信明线载波电话安装工程).pdf
- 北邮数据采集技术期末重点.docx
- HTML5游戏开发实例-百度.ppt
- DB2学习笔记.pdf
- 初中语文quest基于网络的主题探究式学习省名师优质课赛课获奖课件市赛课一等奖课件.ppt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
