Knights game with the possibility of playing against artificial intelligence, based on the Monte Carlo Tree Search algorithm. 🏆
Knights game is played on an 8x8 board. Each of the two players has 16 knights. Each of those pieces can move one square in any direction. They can also jump over several other knights in one move (like in draughts). The goal of the game is to put all of the knights at the end of the board.
Monte Carlo Tree Search (MCTS) is one of the best algorithms for board game engines. It uses much less resources than classical versions of tree search algorithms. MCTS keeps perfect balance between exploration and exploitation of the tree. The implementation of this algorithm is based on the implementation of Mr. Jeff Brady. Big credits to him!
- Clone the repo
git clone https://github.com/DavidSolomon22/knights-ai.git
- Create virtual enviroment by using below command inside the root direcotry of this project
virtualenv venv
- Activate virtual enviroment
source venv/bin/activate
- Install required packages
pip install -r requirements.txt
- Go inside working directory
cd knights-ai
- Run program
python3 main.py
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
David Solomon - via Linkedin