Probably X but Possibly O
June 16, 2024 9:22 AM   Subscribe

Probabilistic Tic-Tac-Toe โ€“ The rules are the same as normal tic-tac-toe, but each square has a different probability of a good (smiley face), neutral (meh face), or bad (frowny face) event happening when selected. posted by Wolfdog (18 comments total) 10 users marked this as a favorite
 
๐Ÿ˜
posted by HearHere at 9:47 AM on June 16 [2 favorites]


This is fun! Another variant that rescues Tic Tac Toe is Ultimate Tic Tac Toe.
posted by rikschell at 9:48 AM on June 16 [2 favorites]


Played three and went 1-1-1, which is definitely more exciting than regular tic-tac-toe. Unfortunately, in spite of the D20, I doubt it would work physically quite as well as the ordinary game. Maybe with preprinted odds sheets?
posted by dick dale the vampire at 10:16 AM on June 16


Fascinating game. I played 6 games and only won 1.
posted by jy4m at 10:39 AM on June 16


If you wanted to play on paper with a human, you could roll 2d20 for each cell, throwing out and re-rolling the second if the sum is of the rolls is 20 or greater. The third is twenty minus the sum of the first two. That gives you three numbers that sum to 20, and you can use those to partition the roll of a d20 when attempting to place your mark. So eg if a square says 5,7,8, then 1-5 (inclusive) is the good outcome, 6-12 is neutral, and 13-20 is bad.

So yeah, rolling twenty-some d20 and labeling would take a few minutes, but it's not terrible. I think I'll try it with my kid, where the randomness will help level the playing field :)
posted by SaltySalticid at 11:37 AM on June 16 [1 favorite]


Fun! Have a 4-0-2 record so far. Part of my strategy is to try to force the computer to play in squares with poor odds.
posted by TedW at 11:41 AM on June 16


Well, now I am 4-0-5; maybe I should go read the article on strategy.
posted by TedW at 11:46 AM on June 16 [1 favorite]


The analysis is nice, and I appreciate the pseudocode. But a solution that just gives the value of the game, and not the optimal play, always feels so hollow to me. So now I find myself wondering if a different approach could be used to get optimal play -- and this being a Sunday afternoon, whether I should look for it myself.

Along similar lines, I once had fun finding the solution to this "Enhanced Rock Paper Scissors" game (twitter link) once. In fact, since I mentioned it I may as well link the solution as well: enhanced_rps.pdf (google drive link).
posted by dbx at 12:35 PM on June 16 [1 favorite]


The Python code in that blog post does actually compute the optimal moves as well. In the example:
print(value(grid))
# ((0.5385368180873334, 2), (0.46146318189602853, 2))
the value 2 as the second element of both tuples means that for both players, the cell with index 2 is the optimal choice. The algorithm uses zero-based indexes, going left to right row-by-row, so cell 2 is the top right.

After making the first move, you can find subsequent moves by using the state argument to tell the solver the current state of the board.
posted by teraflop at 1:00 PM on June 16 [1 favorite]


I won 9 to the computer's 2, not sure if I was just lucky!
posted by BungaDunga at 2:33 PM on June 16


The chance element can be decisive. I played impossible mode and won 4, tied 4, lost 2.

I mainly choose the square with the best odds, giving a small intuitive advantage to strategic squares.
posted by vacapinta at 3:01 PM on June 16


Every time I think I have an effective strategy, it immediately fails.

It's a fun time, though.
posted by edencosmic at 3:27 PM on June 16


I did play a few more and on the second round, got 13-4 and two ties, so I think I actually am better than the machine, at least on regular difficulty.
posted by BungaDunga at 4:37 PM on June 16


Interesting. I often found myself having to choose between forcing the computer into a poor-odds square and playing what would seem obvious, such as blocking what looks like a certain win for the computer. Neither seems to be reliably better. It was hard to stop, but I managed to get to 16-3-15 and decided that was as good as I was going to get and declared myself the winner ;-)
posted by dg at 11:16 PM on June 16


is the title a Bernstein reference because thatโ€™s niche as seven hells and I love it
posted by lokta at 6:27 AM on June 17


So my 16yo and I worked out a paper+die version (with a d10, roll for each square and discard rolls under 3 or over 7 to set it up, when playing if you roll anything under the square's number it's negative, over positive, and equal neutral), showed it to a school friend, and they quickly decided it would be more fun if you used it to play Ultimate Tic-Tac-Toe and invented Ultimate Probabilistic Tic-Tac-Toe which is apparently really intuitive and cool but it takes like a ten minutes to set up the board.
posted by signal at 4:57 PM on June 17 [2 favorites]


Turn the board tiles into a deck of cards, so setting up the play field is just dealing shuffled tiles, each one having a pre-randomized partition of the good-neutral-bad outcome probabilities. I bet that would work really well. Total randomization of the board might require a prohibitively large deck, but you should be able to get a pretty good result with a reasonable-sized deck, and setting up the board should only take a few seconds (once you've made the deck).
posted by biogeo at 7:47 PM on June 17 [2 favorites]


It would take more than a few seconds, as they're 81 cells, but it might be cool to print smaller, square cards, about 4x4cm.
posted by signal at 7:56 AM on June 18 [1 favorite]


« Older Good News: Cancer Edition   |   โ€œThe whole place feels like wildfire.โ€ Newer »


This thread has been archived and is closed to new comments