This is a Connect 4 game with a reinforcement learning agent. It is a project for the Reinforcement Learning course at the Universidad de los Andes in 2024. We were asked to implement a reinforcement learning agent to play Connect 4 using Q-learning.
I will incrementally add features to this project for example include levels of difficulty for the agent. I plan to use a neural network to approximate the Q-values in the next release.
- Install uv
- Run
make setupto create a virtual environment and install dependencies. - Run
make runto start the game. - Enjoy!
| Command | Description |
|---|---|
make setup |
Create virtual environment and install dependencies |
make typecheck |
Run type checking |
make train |
Train the RL agent using Q-learning |
make test |
Run tests |
make run |
Launch the Connect 4 game |
- Mario Reyes Ojeda


