Share your repls and programming experiences

← Back to all posts
54
Unbeatable Tic Tac Toe

To play, use the numpad to select your square and try to get 3 X's in a row. You will not win a game of tic tac toe against this AI. But if you do, please leave a comment with the moves you used so I can fix it. Here is a layout of the board if you don't have a num pad or are confused how that works:

7 | 8 | 9

4 | 5 | 6

1 | 2 | 3

Loading Repl
Commentshotnewtop
3

Hey, nice job! Haven't been able to beat now!

2
2

i beat it i simply put 5 then 6 then 1 then 2 then 3

2

@MegaGiratina

Are you sure because I lose when I do that

1

@TrentBultsma Does this AI make same moves for a particular set of player's input???

1

Now can we make this play itself?

1

i won! just put 5, then 6, then 1, then 2, then 3!!!

1

Didn't loose but didn't win nice game

1

its not unbeatable, i beat it first try

1

This game is guaranteed to tie every time if every move is perfect

1

Welp, the nearest solution to win is to tie

1

It is unbeatable because it is an AI that doesn't get distracted.
Any game where both sides try will end in a tie

1

This AI is cool. I can't beat it, but I can definitely tie with it!

2

@programmyBoi A perfect game of tic tac toe always ends in a tie

1

Very nice, still haven't beat it yet. Must be doing something right...!

1

um the number input is really hard to understand

1

@Unfortunately If you have a number pad on the side of your keyboard, the spots correspond to the numbers on that. If you don't, there is a helpful diagram in the description at the top.

1

0 | X | X

X | X |

0 | 0 |
It did this then froze

1

All wins below this post are fixed, continue bug testing. Your help is much appreciated

1

Same as me


Take the L, AI!

1

@launcherman08 Also, I did it on a chromebook!

1

I win! yay!

Game:
Me: 5 AI: 7
Me: 3 AI: 8
Me: 9 AI: 6
Me: 1 AI: 2
End of game

1

@UphillBrush Also won, check comment above on the page

1

never mind, I figured it out and am working on a fix