This is the classic Tic-Tac-Toe game implemented using the minimax algorithm.
You can choose to play as either the X or O player. If you select O, the computer will calculate the optimal move and start first (it will take a while). If you select X, you will make the first move.
The algorithm assumes that the player will make no mistakes and calculates moves based on that assumption.
git clone https://github.com/goksuko/tic-tac-toe
cd tic-tac-toe
sudo pip install -r /path/to/requirements.txt
python3 play.pyor
git clone https://github.com/goksuko/tic-tac-toe
cd tic-tac-toe
sudo pip install -r /path/to/requirements.txt
python play.py