In the terminal, run pip3 install -r requirements.txt
to install the required Python package PyGame.
The file runner.py
contains the code for running the Graphical Interface of the game and tictactoe.py
contains the logic of the game, where I've implemented a MiniMax algorithm with Alpha-Beta Pruning to find the most optimal move for a player given any state of the TicTacToe board.
To play against the AI, simply run python3 runner.py
in the terminal.
To learn more about MiniMax and other Search algorithms, refer to this repository.
This is how the game should look like: