Skip to content

A five chess game which support pve&pvp. It is a project for C++ course of UCAS. 国科大C++课程大作业,使用α-β剪枝算法配合决策树实现了一个机器人棋手。

License

Notifications You must be signed in to change notification settings

chen622/FiveChessWithAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FiveChessWithAI

A five chess game which support PVP&PVE mode. It is a project of UCAS C++ course.

微信截图_20201205160145

Design Principle

The PVE mode use decision tree to play the chess. In order to have a deeper tree, I use alpha-beta pruning algorithm to prune the tree.

How to build a decision tree you can see this blog.

The structure of this project just like the flowing class diagram shows.

ClassDaigram

Quick Start

This project use cmake to build, you should first install cmake.

mkdir build
cd build
cmake ..
make
chmod +x ./bin/fivechess
./bin/fivechess
# The UI works well with font SONG(宋).

If you want to change the parameters, this is a table to record all the parameters.

Name Default Value Note
TOTAL_MATCH 5 How many matches of a game?
BOARD_SIZE 15 The size of the chess board
MAX_DEPTH 3 The depth of decision tree. The program works much better when the depth is 4, but it will take more time.

TODO

Maybe I will change this project to a web server to play five chess online.

About

A five chess game which support pve&pvp. It is a project for C++ course of UCAS. 国科大C++课程大作业,使用α-β剪枝算法配合决策树实现了一个机器人棋手。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published