This is a simple implementation of Tic Tac Toe with an AI opponent using the Minimax algorithm.
These instructions will help you run the game on your local machine.
You will need Python 3 and the Pygame module installed.
python3
pygame
Clone the repository to your local machine:
git clone https://github.com/MZaFaRM/tictactoeAI.git
Navigate to the project directory:
cd TicTacToeAI
Running the game To start the game, run the runner.py file:
py runner.py
Use your mouse to click on either "Play as X" or "Play as O" to choose which player you want to be. If you are X, you go first. Click on any empty square to make your move. If you are O, the AI will calculate its move and go first. Then you can click to make your move. The AI uses the Minimax algorithm to calculate the optimal next move. When the game ends, click "Play Again" to reset the board and play another round.
Completed as part of my venture in CS50AI from Harvard CS50 hosted on EDx
Made with 🧡 by Muhammed Zafar