An intelligent Tic-Tac-Toe game built using Python and Pygame, featuring an unbeatable AI opponent powered by the Minimax algorithm. The game demonstrates core concepts of game theory, AI search algorithms, and state-based decision-making.
This project simulates a Tic-Tac-Toe match between a human player and an AI agent. The AI uses the Minimax Algorithm to evaluate all possible game states and make the optimal move making it impossible to defeat, though draws are possible if you play optimally.
- Interactive GUI built with Pygame
- AI implemented using Minimax (no libraries used)
- Pure game logic functions
Clone the repository:
git clone https://github.com/ari7hkm/tic-tac-toe-ai.git
cd tic-tac-toe-aiInstall dependencies:
pip install -r requirements.txtRun the game:
python3 tictactoe.pyPlay against the AI - and try not to lose.
- Language: Python
- Libraries: Pygame
- Algorithm: Minimax (Implemented manually)



