/Ai-tictactoe

Implementation of Minimax algorithm to play Tictactoe perfectly

Primary LanguagePython

Tic-tac-toe Ai using Minimax

Written in Python and includes a Gui

To play select whether you want to go first or second on the main screen and then either lose or tie(since the ai plays perfectly using the minimax algorithm)

Requirements :

  • Python 3

  • Pygame which can be easily installed after installing python with the command -

pip3 install pygame

or in case that doesn't work

python3 -m pip3 install pygame

To run the program simply download all the files from the resporitory or clone them and then run runner.py using python

Note : the time.sleep() have been added in the program to improve the experience but you can remove or increase them to suit your interests

  • Inspired by CS50ai