Implementation of a Monte Carlo Tree Search algorithm and a Deep Q-Network for Connect Four. Made as a final project for Computational Intelligence for Games. The orginal code was written in a Jupyter notebook but has since been transferred to individual files for ease of use and modularity.
To run this project,
- Install Python 3.8 or above from here
- Clone the repository:
or download as a zip file and extract.
git clone https://github.com/victor-hugo-dc/connectfour-ai.git
- To install all dependencies, run:
pip install -r requirements.txt
- In
simulate.py
, view the possible simulations that can be made with the MCTS. Choose a match up, write it in the main file and in the root directory, run:python3 main.py
- To run the DQN, go in the ai directory and run
train.py