IB Mathematics Internal Assessment: Mathematical Exploration of Tic-Tac-Toe

Tic-Tac-Toe is a two player paper and pencil game that anyone can play; I have played this game since I was child. I used to draw 3x3 grids on the condensation of the bus windows and play tic-tac-toe with my friends. My brother and I always played the tic-tac-toe game included in the kids’ menu. Soon, my brother discovered a strategy that led him to win the game every time, which frustrated me. For my first move, I used to always mark the middle square. Although, I noticed my brother’s strategy involved marking the top left square first. I tried this method and earned a few successful wins. As I grew older and smarter, tic-tac-toe became easier to win; most of the time now, the game ends in a tie. In this investigation, I plan to examine the numerous outcomes of tic-tac-toe, as well as develop methods that would lead players to at least win or tie tic-tac-toe every time.

Basic Rules of Tic-Tac-Toe
Tic-tac-toe is a two player game; each player uses either the ‘X’ or ‘O’ symbol. First, a 3x3 grid is drawn. The first player goes first and marks their symbol on a space in the grid. Then the second player goes next and marks their symbol. The two players keep alternating moves until someone has won by drawing a row of their three symbols (either diagonally, vertically, or horizontally). If there is no more space on the grid, and no one has achieved a row of three, then the game is a tie.

Tic-tac-toe is played on a 3 x 3 board, as shown in the figure below. Two players, O & E, take turns placing their symbols (O and X) in unoccupied cells of the board. The first player to complete three cells in a row (horizontally, vertically, or diagonally) in his or her own symbol wins. It is well know that with best play this game is a draw (neither play can force three-in-a-row).

Game Theory/Math Exploration
In the language of Game Theory, tic-tac-toe is a two-player game that is finite (a game that comes to an end), has no element of chance, and is played with “perfect information” (all moves being known to both players).

Combinatorial Game means a 2-player zero-sum game of skill (no chance moves) with complete information, and the payoff function has 3 values only: win, draw, and loss.

39 =19,683 (each one of the 32 cells has 3 options: either marked by the first player, or marked by the second player, or unmarked) <--- possible moves, in general
T1: P1P1 places o1o1 => P1P1 has 9 choices to do this move.
T2: P2P2 places x1x1 => P2P2 has 8 choices to do this move.
T3: P1P1 places o2o2 => P1P1 has 7 choices to do this move.
T4: P2P2 places x2x2 => P2P2 has 6 choices to do this move.
T5: P1P1 places o3o3 => P1P1 has 5 choices to do this move.
T6: P2P2 places x3x3 => P2P2 has 4 choices to do this move.
T7: P1P1 places o4o4 => P1P1 has 3 choices to do this move.
T8: P2P2 places x4x4 => P2P2 has 2 choices to do this move.
T9: P1P1 places o5o5 => P1P1 has 1 choices to do this move.
I notice that this is a factorial so there are 9! unique ways to fill out the grid. 9!=362,880
There are 9! different sequences of play in tic-tac-toe, BUT the rule of three-in-row is discarded.

Next, what is the number of fully marked 3x3 grids. For this I realized that player 1 would always make 5 picks as they always start first (and we completely fill the grid), and player 2 would always make 4 picks. Therefore I can calculate this using a product rule: C(9,5)∗C(9,4)=15,876 completely filled grids.
Your second calculation is wrong. Once you select 55 spaces for the first player, the grid pattern is fully determined; there's not a second freedom of (94)94 choices. (Note, by the way, that (94)=(95)9495.) So there are only (95)=12695 different resulting grid patterns in Tic-Tac-Toe.

The first play must play in a corner, a side, or the center.

But 362880 is clearly too high. For example, a game that finishes after the seventh mark with three in a row would count twice in this figure, but