Skip to content

Repository files navigation

🧠 Checkers AI Agent

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.


📌 Project Overview

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.


🗂️ Repository Structure


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
    

🎥 Demo Video

🔗 Watch Demo Video – See the AI in action playing against a human.


🚀 Getting Started

Step 1: Clone the Repository

git clone [https://github.com/ssarimm/checkers-ai-project.git](https://github.com/ssarimm/checkers-ai-project.git)
cd checkers-ai-project

Step 2: Install Requirements

pip install -r requirements.txt

Step 3: Run the Game

python src/checkers-AI/main.py

✨ Features

  • 🧠 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.

📈 Training Progress

Here's a visualization of the training progress:

Training Progress

📊 After Training Results

These graphs illustrate the performance of the AI after training:

Graphs


🛠️ Technologies Used

  • Python 3.10+
  • Pygame
  • NumPy
  • TensorFlow or PyTorch (for advanced RL, optional)
  • GitHub (Version control)

⚙️ Configuration

Edit values like training episodes, epsilon decay, board size, or UI settings in: src/checkers-AI/config.py


📚 Documentation


📘 References


About

This project develops an AI agent to play Checkers using Deep Q-Learning and Alpha-Beta Pruning. It features a Pygame-based interface for human vs. AI play. The agent learns through self-play and improves over time, becoming more competitive with each game.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages