Use the Minimax Algorithm to code a tic tac toe AI that is literally unbeatable. It is undefeated. You can tie, but only if you play optimally. Find out what happens when you pit AI against AI.
Want to learn Python if you are an absolute beginner? Check out my in-depth beginner series:
[ Ссылка ]
In this video, I explain how the minimax algorithm can be used to find the most optimal move in a game of tic tac toe. The algorithm never loses. Then, I delve into a technical explanation of my code and what each line represents.
Feel free to leave any questions.
Please consider subscribing if you liked this video: [ Ссылка ]
Thanks for watching everyone!
~~~~~~~~~~~~~~~~~~~~~~~~
Source code: github.com/kying18/tic-tac-toe
game.py - tic tac toe board implementation/playing a game
player.py - player implementations
~~~~~~~~~~~~~~~~~~~~~~~~
Tags: Minimax Algorithm, Game Theory, Tic Tac Toe, Artificial Intelligence, Machine Learning, Python, Software Engineering, Coding
~~~~~~~~~~~~~~~~~~~~~~~~
Follow me on Instagram: [ Ссылка ]
Follow me on Twitter: [ Ссылка ]
Check out my website: [ Ссылка ]
![](https://i.ytimg.com/vi/fT3YWCKvuQE/mqdefault.jpg)