An intelligent agent that plays the game of Checkers using Q-Learning and Alpha-Beta Pruning. Built using Python and Pygame, the agent can learn through self-play and make strategic moves against human players in a classic board game environment.
This project focuses on building an adaptive AI for Checkers by combining reinforcement learning (Q-learning) with traditional decision-making algorithms (Minimax with Alpha-Beta Pruning). It also includes an engaging graphical interface for human-AI interaction, real-time gameplay, and performance analytics.
checkers-ai-project/
├── README.md
├── Project Proposal Checkers.docx
├── Project Report CheckersAI.pdf
├── demo_video.mp4
├── requirements.txt
│
├── src/
│ └── checkers-AI/
│ ├── ai/
│ │ ├── minimax.py
│ │ ├── model.py
│ │ └── q_learning.py
│ ├── data/
│ │ └── best_model_50.weights.h5
│ ├── game/
│ │ ├── board.py
│ │ ├── game.py
│ │ ├── gui.py
│ │ └── piece.py
│ ├── utils/
│ │ ├── helpers.py
│ │ └── loggers.py
│ ├── config.py
│ └── main.py
│ ├── training_progress.PNG
│ └── graphs.png
│
└── models/
└── best_model_50.weights.h5
🔗 Watch Demo Video – See the AI in action playing against a human.
git clone [https://github.com/ssarimm/checkers-ai-project.git](https://github.com/ssarimm/checkers-ai-project.git)
cd checkers-ai-projectpip install -r requirements.txtpython src/checkers-AI/main.py- 🧠 Q-Learning Agent: Learns from self-play to improve gameplay.
- ♟️ Minimax Agent: Uses Alpha-Beta Pruning for efficient decision-making.
- 🎮 Interactive GUI: Built with Pygame for smooth gameplay.
- 📊 Performance Analysis: Optional performance tracking (win rate, move time, etc.).
- 🔄 Multi-jump & King Rules: Complete Checkers rules implemented.
Here's a visualization of the training progress:
These graphs illustrate the performance of the AI after training:
- Python 3.10+
- Pygame
- NumPy
- TensorFlow or PyTorch (for advanced RL, optional)
- GitHub (Version control)
Edit values like training episodes, epsilon decay, board size, or UI settings in: src/checkers-AI/config.py
- Sutton, R. S., & Barto, A. G. (2018). Reinforcement Learning: An Introduction.
- Pygame documentation: https://www.pygame.org/docs/
- TensorFlow documentation: https://www.tensorflow.org/api\_docs