• werefreeatlast@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    5 days ago

    Ask AI this: play all possible loosing scenarios in tictactoe.

    That’s like e^9th

    If everyone successfully has the program run the sequences, we would have spent many human years worth of energy.

    • AbsentBird@lemm.ee
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      5 days ago

      There are only like 500 losing tictac toe scenarios max.

      Three positions for each square (X, O, or blank), 9 squares: 3^9 = 19,683 possible game states.

      Of those there are only 512 combinations where the board is compete: 2^9 = 512

      Of those 512, only 16 combinations results in a win for either player. Meaning there are only 8 losing scenarios and 496 stalemate scenarios.

      • vithigar@lemmy.ca
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        3 days ago

        Even fewer than that, since you’re not accounting for the actual rules of the game. You counted every possible arrangement of X’s and O’s on the board, but many of those aren’t valid game states, like all X’s for example.

        On top of that you can also eliminate rotationally equivalent states. Ditto for mirrored states. Starting with an X in the top-right isn’t a meaningfully different state than starting in any other corner. There are effectively only three distinct starting states. Center, any corner, or any side.

        On the other hand, there are semi-filled final states you’re not considering. Not every square on the board needs to be filled for a player to win. You’re also only counting distinct winning lines (many of which could be eliminated due to rotational equivalence), but not the turns to get there, which would provide several possible scenarios for a given final state.

        All that said, I expect the actual number of unique possible games to be quite a bit lower than 500.