An interactive version of the classic Connect Four game, built with Python and Pygame, featuring a clean GUI and an intelligent AI opponent using the Minimax algorithm with Alpha-Beta pruning.
- Easy – Random AI
- Medium – Minimax with shallow depth
- Hard – Minimax with deeper search and Alpha-Beta pruning

- Player vs Player
- Player vs AI
- Smooth graphical user interface using Pygame
- Real-time move previews
- Win and draw detection
- Reset and replay functionality
- Object-Oriented clean codebase
The AI uses the Minimax algorithm to evaluate game states and simulate optimal moves. Alpha-Beta pruning is applied to ignore unpromising branches, improving performance significantly at deeper levels.

pip install pygame
python connect_four.py