ESILV 2021–2022
The main objective of this project was to create a program capable of playing a tic tac toe game on 5*5 grid versus a human player. Unlike tic tac toe, the player objective is to obtain a 4 symboles row with his own symbol instead of 3. The AI behind the computer player is based on a MiniMax algorithm, optimized with Zobrist Hashing and alpha beta pruning. Obviously, the MiniMax algorithm is based on a Evaluation function which could be clearly optimized to increase the difficulty of the game.
Useful ressources :
- Tic-tac-toe https://en.wikipedia.org/wiki/Tic-tac-toe
- Minimax https://en.wikipedia.org/wiki/Minimax
- Alpha–beta pruning https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning
- Zobrist hashing https://en.wikipedia.org/wiki/Zobrist_hashing
- Solving connect 4 http://blog.gamesolver.org/solving-connect-four/02-test-protocol/
- Computer Science Game Trees https://www.yosenspace.com/posts/computer-science-game-trees.html
- Minimax and Monte Carlo Tree Search https://philippmuens.com/minimax-and-mcts
- Zobrist Hashing https://levelup.gitconnected.com/zobrist-hashing-305c6c3c54d0
The MiniMax Tic-tac-toe 5x5 Grid Game.ipynb file contains all the code in python to play the game
- Required librairies
- random
- math
- IPython.display
- ursina
use the following command in your Anaconda console to download the required librairies
pip install "library name"
Ursina engine is an open source game engine made for python. You can various exemple of project that has been made with it on their github. The following links explain you how to install ursina engine and how to use the librairy.
- Pincet Bruno