r/WatchPeopleCode • • Sep 27 '21

Using Minimax Algorithm to create an Unbeatable Tic-Tac-Toe Opponent in Python

https://youtu.be/EZA0v-jOsEk
2 Upvotes

4 comments sorted by

2

u/mudokin Sep 27 '21

So it's alway a draw?

2

u/[deleted] Sep 28 '21

It will either win or draw, it will never lose.

2

u/mudokin Sep 28 '21

I mean, if you play it correctly, you shouldn't be able to win or lose. Did you let it play against itself?

2

u/[deleted] Sep 28 '21

Yes, it always draws when playing against itself. And you're right, if you're a good tic-tac-toe player, you should always be able to tie too.