4

I was coding a tic tac toe game where $2$ players play tic tac toe randomly on a given $N$ board size $(N\times N)$. $X$ starts first. If one side gets $N$ consecutive (horizontal/vertical/diagonal) of their symbols, they win. If no one won and there is no more space on the board, it is a draw. I implemented it and give it a go a couple of times. I realized when $N$ gets bigger the draw rate increase a lot even with relatively small $N$'s. For example I couldn't get a single non-draw game with $10\times 10$ board in $20$ games.

My question is, what is the probability of a draw on $N\times N$ tic tac toe board with random play in terms of $N$? or if it is too complicated to express, what is the general relation between $N$ and the draw rate?

P.S: I don't know the answer.

Gary
  • 36,640
Minot
  • 141
  • 4
  • 1
    Very neat question! Just trying to see this intuitively myself. Each time a player places in a cell, it removes that row and column as candidates for the other player to win from. Heuristically a player placing around N places will render the other player form winning ever (blocking all the rows/columns). While a player needs to spend N specific placements to win, filling out an entire row say, which can be thwarted easily by the opponent placing once in that row. It does seem to become much less likely for any player to win for large N, i.e. very likely to draw. – bonsoon Nov 14 '21 at 08:02
  • 1
    I didn't work out the specifics, but the I think the best way to solve it analytically is to switch from thinking about probabilities to thinking about filled boards. If the players continue placing pieces after someone wins (just to fill the board, not changing the actual outcome) then no probabilities are changed and you now have that every game ends in a filled board; further, I believe all boards are equally likely (you'd have to prove this). Then you just need to count the number of boards which are draws. – Vedvart1 Nov 14 '21 at 09:33
  • 1
    The only thing I can think of is to express the answer as a huge sum using inclusion-exclusion, however I think maybe an answer might be possible inductively using reccursion. I will have a think and post an answer if I find anything – OskarSzarowicz Nov 14 '21 at 11:03

0 Answers0