Run "playchess(3)" to start a game with search tree depth = 3
Then choose:
(1)-for playing WHITE against Computer
(2)-for playing BLACK against Computer
(3)-Computer plays against itself.
or alternatively type "playchess(4,3)" to start a game with search tree depth = 4 and computer against itself.
I tried to keep it "minimalistic", so strength isn't great. There is only console input and output. No special strategies e.g. for opening or end game situations are implemented.
The function for evaluating the search tree is very simple, so the program sometimes surprises with weird moves. Choosing a more sophisticated evaluation function would most likely improve strength and eliminate weird actions.
引用格式
Thomas (2024). Simple Chess game (https://www.mathworks.com/matlabcentral/fileexchange/118150-simple-chess-game), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
创建方式
R2020a
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |