Share your repls and programming experiences

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

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!

Voters
maxina
pr0p3rno0b10
kindred
Bunnytoes
SkipperBoop
Comments
hotnewtop
henryspare24

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

SkipperBoop

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

SkipperBoop

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

DhyanShetty

I keep on getting error messages

SkipperBoop

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

Bunnytoes

this is impossible to beat. I have drawed every time

Bunnytoes

amazing job!

SkipperBoop

@Bunnytoes Thanks!