How many ways can you tie a tic

Skip to content

Tic Tac Toe (noughts and crosses) is always such a nice example.

I was thinking about strategies and decided to implement a program that plays Tic Tac Toe according to John von Neumann’s minimax. This is a kind of meta-strategy that can be used for playing any game: Always chose the move that will minimize the maximum damage that your opponent can do to you.

The algorithm works recursively by looking for the move that will let an optimally playing opponent inflict the least damage. The opponent’s strategy is calculated by way of the same algorithm, and so on. This means that on the first move, the computer investigates the entire game tree – it considers every single possible Tic Tac Toe game and then choses randomly among the best (least dangerous) moves.

Have a go at http://www.half-real.net/tictactoe/

    • Here’s a document with every single game of Tic Tac Toe. It gives the following numbers.
    • 255,168 unique games of Tic Tac Toe to be played. Of these, 131,184 are won by the first player, 77,904 are won by the second player, and 46,080 are drawn.
    • This supports the intuition that it is an advantage to begin the game.
    • These numbers do not take similar board positions into account – rotating the board, mirroring it and so on. It does not matter which corner you place the first piece in, but this is not taken into account here.
    • If neither player makes a mistake, the game is drawn (but we knew that already).
  • This is an exercise in examining the objective properties of a game. There are two interesting sides to this:
  • 1) The objective properties of Tic Tac Toe really matter for our enjoyment of it: It is a boring game because there are so relatively few combinations.
  • 2) On the other hand, humans clearly play the game in a different way than the computer. The computer’s playing style lets us make some observations about how humans play games.
  • To the computer, the first move is the most complicated (takes around a second on my 2ghz machine). This is unlike human players who seldomly have any problem deciding what to do on the first move.
  • The program assumes that the opponent does not make any mistakes. Humans do make mistakes, of course, so adding some amount of randomness in algorithm would probably make it a better player against human opponents.
  • The number of possible unique games is larger than I would have guessed, but this indicates how we humans are very good at identifying patterns. Faced with the huge number of variations in a game like this, we simply identify some general properties of Tic Tac Toe: Beginning in the middle is a good thing; if your opponent begins in the middle, you must pick the corner; a good way of winning is to threaten two squares simultaneously.
  • We think about games like this in fuzzy and chaotic ways – this gives us a lot of flexibility.
  • It is the same fuzziness that leads us into making stupid mistakes.
  • On some level, it is our fuzzy way of playing games that allows us to have fun. If we simply played with the unimaginative brute force strategy that the computer uses, it would definitely be work rather than play – and nobody would have any fun playing against us, for that matter.

Post navigation

$\begingroup$

How many combinations are possible in the game tic-tac-toe (Noughts and crosses)?

So for example a game which looked like: (with positions 1-9)

A1   --   B1

A2   --   B2

A3   --   --

[1][3][4][6][7] would be one combination

asked Jan 2, 2013 at 9:50

$\endgroup$

3

$\begingroup$

This information is taken from this website.

A naive estimate would be $9!=362\,880$, since there are $9$ possible first moves, $8$ for the second move, etc. This does not take into account games which finish in less than $9$ moves.

  • Ending on the $5^\text{th}$ move: $1\,440$ possibilities
  • Ending on the $6^\text{th}$ move: $5\,328$ possibilities
  • Ending on the $7^\text{th}$ move: $47\,952$ possibilities
  • Ending on the $8^\text{th}$ move: $72\,576$ possibilities
  • Ending on the $9^\text{th}$ move: $127\,872$ possibilities

This gives a total of $255168$ possible games. This calculation doesn't take into account symmetry in the game.

answered Nov 22, 2013 at 5:21

DarylDaryl

5,3933 gold badges25 silver badges39 bronze badges

$\endgroup$

3

$\begingroup$

I will say that the board combinations are 3^9, which is 19683 possibilities, and 2032 winning positions. The answer of 9! is related to how many ways we have to fell all the positions, rather than the possible combinations.

I have answered this question already in another post, please see the next link: https://stackoverflow.com/a/54035004/5117217

Cheers!

answered Jan 4, 2019 at 20:07

How many ways can you tie a tic

$\endgroup$

2

Can there be a tie in tic

Even after putting X in the middle square of the second level, we do not end in a tie. Based on these four cases, it is impossible to end in a tie in a 3x3x3 tic-tac-toe game. If both players play optimally, the first player will always win if they place their first move in the center of the cube.

What is a tie game of tic?

cat's game (plural cats' games) (tic-tac-toe) A tie game. Comes from the concept that a cat cannot catch its own tail just like a player in tic-tac-toe cannot win a game that is already tied.

How many ways can you win 3d tic

There are 76 different possibilities for a win (16 rows in each direction, 2 diagonals per face in each direction (which makes 12 faces), and then 4 corner-to-corner diagonals), and this algorithm checks each one in sequence.