Hacker News new | ask | show | jobs
by igpay 737 days ago
Hey all, I'm the author of Probabilistic Tic-Tac-Toe. I'm currently working with Louis to integrate this solver into the game itself so that people can play against it. I'm hoping to have it released by EOD and will update this comment when it's ready.
4 comments

I can't edit my original comment but I have updated the game with "Impossible" difficulty mode as implemented by Louis.

Based on a suggestion from a sister comment, I have also added a "Tutor" mode. When hovering over a square in tutor mode, it shows the probability of winning the game given that you a) select that square and b) continue to play optimally for the rest of the game. Both of these options are in the settings menu in the top right of the game.

Finally, I've added a little writeup to the bottom comparing the strengths of the two AI implementations. Enjoy!

https://www.csun.io/2024/06/08/probabilistic-tic-tac-toe.htm...

I posted in your original thread about making a physical version of the game with tiles and real dice. Did you experiment with using other "dice" than a 20-sided? It seems to me as if just a regular 6-sided die would be more than enough to provide a board where every tile is different (there are still way more than 9 different combinations of possible tiles) and I think that means there is just as much strategy as in the original game? It makes presenting percentages a bit ugly (the nice 5%-intervals obviously look better) so I would not recommend it for the digital game, but I think 6-sided dice could be used to make more readable physical tiles (printing the ranges for happy and sad, together with numbers of smileys equal to the number of positive and negative outcomes, to make tiles easily readable from all directions at a glance; I do not think there is a need to spell out the neutral outcomes).
The D20 was the first die shape I tried and I ended up just sticking with it. My reasoning was basically the same as yours - 5% intervals look better.

Agreed that 6 sided dice would not detract from the amount of strategy in the game. I think it could be cool to try a physical version of the game where you shuffle premade tiles and place them in the grid - maybe a fun game to teach kids probability :)

If using just 1d6 and also by including tiles that have zero neutral (i.e. no) outcomes, you get 15 possible tiles, which should be enough to build... very many different tic-tac-toe boards (I am too lazy to count, but combinations of 9 from 15 and then 9!=362880 different configurations of the tiles for each combination, although all mirrors and rotations should be excluded so in reality there are fewer than that, but still more than what you need for a (re-)playable game and probably never see a board you saw before).
I'm actually interested in being coached by the solver, so it can tell me when I made a suboptimal move and what the optimal move would have been.

Like in chess, playing against stockfish isn't very fun, but having it as a way to get better is fun.

Hey there, I thought this was a good idea so I added it to the game as "Tutor" mode. Thanks!
Thanks, this was very interesting. I was happy to see that my play was indeed near optimal.
Have you considered making probabilistic Chess or Go? One way to do it is before each move a coin is flipped to decide who’s turn it is.
Hmm, but party of the strategy of this one is that different cells have different odds, and you know those odds. It's not just a random 50% chance, that wouldn't be so interesting.

I could see probabilistic cheese working as each grid square having an odds that the move will "work." Those odds stay the same the whole game. If you try to move from that square, the odds dictate whether you do your move or just lose it and skip your turn.

This would mean that certain squares become very valuable. A queen on a 95% square is much more powerful than a queen on a 40% square. But those squares may not may not be in useful positions. And the battles may be over who gets to put good pieces on those squares.

An additional possible variation: The probability of a square could determine not just whether you can successfully move from it, but also whether you can successfully capture a piece on it. So, for instance, a queen on a 40% square is much less powerful offensively, but much more powerful defensively, because 60% of the time you can't capture it. You could "hide" powerful pieces on low-probability squares, and you'll have a hard time getting them back out but your opponent will have a hard time capturing them and might not try. (You could either have capture failure leave the piece that attempted capture on its original square, or have the piece that attempted capture get captured.)

Sticking your king on a 20% square would be a great way to probabilistically buy yourself time to bring other pieces to its defense, at the cost that the king can't easily try to escape.

That has a nice symmetry to it, where rather than making 95% always "good" and 40% always "bad", they're both valuable for different reasons.

Like chess on a Scrabble board