

Tic-Tac-Toe-ception - gjsriv
https://www.khanacademy.org/cs/tic-tac-toe-ception/1676336506

======
anonymous
Is anyone able to beat the bot at [https://www.khanacademy.org/cs/in-tic-tac-
toe-ception-perfec...](https://www.khanacademy.org/cs/in-tic-tac-toe-ception-
perfect/1681243068) ? Seems like its strategy is unbeatable and player1 always
wins.

~~~
mcintyre1994
Tic tac toe is a solved game - if you start and play optimally you always win.
(you take 3 corners in 3 moves). If they start every board then they're
unbeatable.

~~~
anonymous
Normal tictactoe always ends in a draw if both players play optimally. The one
I linked though seems to always end with X winning.

------
matchu
Note that this was created long before the recently posted article. So, its
rules variations are totally correct, because it wasn't _trying_ to match the
article's definition of the game ;)

It originally used what it calls Rule 5a, as the article proposed, but that
allows the first player to always win (see Perfect), so it now uses Rule 5b by
default, but it can be toggled easily.

There are also a ton of other config options if you scroll down past the
initial comments; most of the variants, like the Perfect one, just have
different defaults for linking convenience.

------
paullik
I seen this game on: [http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-
tac-t...](http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-toe/)

------
sigkill
There's one unfair thing in this though. If the board has already been won,
sending them to the same board allows them to place a mark anywhere on the
megaboard even if there are vacant spots available on the said board.

~~~
gjsriv
Try this- [https://www.khanacademy.org/cs/tic-tac-
toe2/1747678284](https://www.khanacademy.org/cs/tic-tac-toe2/1747678284) You
get the first turn :)

~~~
sigkill
Oh yeah, this is better. Fyi note that the AI is totally evil. Its first
priority is to send you to a square that's already been won (does not matter
who won) effectively rendering your move useless while you give it map
mobility. It prioritizes that over making a move at winning a table even!
Also, if you think that the AI will play to win the specific board and you can
use that knowledge to your advantage... you're wrong, you're so wrong. The
only way to make the AI do what you want is to pigeonhole it into a board
where there's only one square left.

~~~
gjsriv
About the AI sending us to already won square - won't we do the same? So this
is a smart AI :P

~~~
sigkill
Oh totally. I didn't look at the code though but I'm impressed if that isn't a
hardcoded behaviour.

~~~
matchu
It looks like it's using the Monte-Carlo bot, "which plays out as many random
games as it can within 5 seconds and plays which ever next position had the
greatest percentage of wins". So, yup, not hardcoded :)

------
oliveratkinson
It doesnt follow the correct rules? or have i misunderstood them? when you
send the player to a square already complete (with spaces left) they should
have to go in that square, not get a free go.

~~~
mooism2
_5 (variation B - current default). If a player is sent to a mini-square that
has already been won, or in which all the cells are already filled, then the
player may next place his mark in any unfilled cell in any other mini-board._

------
Timoty
Sorry but rules are wrong!

when you send the player to a square already complete (with spaces left) they
should have to go in that square, not get a free go.

This is correct.

~~~
Timoty
Well correct rules can be turned on.

[https://www.khanacademy.org/cs/tic-tac-
toe2/1747678284](https://www.khanacademy.org/cs/tic-tac-toe2/1747678284)

------
RockofStrength
The interplay of micro and macro reminds me of Go. I also like how offense and
defense are so connected in a Yin Yang fashion.

Perhaps it should be called "TictIctaC TactActaC ToetOetoE". Another
possibility: "Tic Frac Toe", giving a nod to the fractal quality. This game is
great!

------
tarun_anand
And there is a cool "app for that"....

[https://play.google.com/store/apps/details?id=com.MoongLabs....](https://play.google.com/store/apps/details?id=com.MoongLabs.UltimateTicTacToeHD)

------
smoyer
I won on my second try ... you should ignore winning games in favor of forcing
the other player to drop you into the squares you want. None-the-less, it's a
fun variation!

Edit: 1st=Lost, 2nd=Won, 3rd=Lost, 4th=Tie.

------
stephengillie
I keep seeing "Oh noes! SecurityError: DOM Exception 18" using Chrome on
win7...

Edit: It has something to do with either reading cookies, or loading a video
from a different server?

~~~
gjsriv
I tried just now! it works perfect for me. Google the problem. Some
reasons/solutions from Stack might help

------
fmax30
No draw checks , Infact it locks up my browser when the game has been drawn.

------
tled
What if we combine this game with Battleship

~~~
pepijndevos
Explain?

~~~
technolem
Maybe you only get to see the board they made their move in. You don't get to
see the move unless you select that board to move in yourself. Or maybe you
don't even get that much information. You only know what moves have been made
in the board you select and no further info. Do they control that side board
yet? Are they trying to rig the center boards?

Taking this further, you are stuck with the board you select. Even if it has
already been won. You get to update the world board, but otherwise lose your
turn.

------
gjsriv
It becomes easy after a couple of gameplays

