Share your repls and programming experiences

← Back to all posts
Tic-Tac-Toe Minimax AI
SkipperBoop (6)

I've created an AI that can't be beaten... I think? It uses the minimax algorithm to pick the move that will win. If there isn't a winning move, it will pick a drawing move. Please let me know if you beat it and how!

henryspare24 (0)

I beat it because I could put my x on top of its o

SkipperBoop (6)

@henryspare24 Shhhh :D I think that's the only way to beat it...

SkipperBoop (6)

I fixed the bug so now your technique shouldn't work ;)

DhyanShetty (3)

I keep on getting error messages

SkipperBoop (6)

@DhyanShetty I was editing the script while you made the comment. Try again, and let me know if it persists!

Bunnytoes (233)

this is impossible to beat. I have drawed every time