Minimax Tic Tac Toe Game with an AI bot to play against.
This project was created as my final assignment for CS152 course: Harnessing Artificial Intelligence Algorithms in my third year at university.
I used the following technologies
- Python
- Libraries: random and copy
In this project I practiced and learned the following concepts:
- Minimax algorithm for adversarial games (search algorithms)
- OOP programming
- Optimizing algorithms by adding alpha beta pruning to the minimax algorithm
- Creating a bot player for a real scenario game
- Using a decorator function for memoization
- Documenting code with comments and docstrings
All of the code can be found in the Jupyter notebook. The explanations are in chronological order with 5 different stages of the project: from a simple human vs human game all the way to a playing against a smart bot that uses minimax algorithm with evaluation function, alpha beta pruning, and memoization to make decisions. I advise going through the cells in the notebook in order.