# Riddler Classic – 12/14/2018

This week, the Riddler asks if you can win at tic-tac-toe blindfolded. It turns out that with some planning, you can either win or force a draw.

To start, the squares in the board are numbered as follows.

$\begin{tabular}{c|c|c} 1 & 2 & 3 \\ \hline 4 & 5 & 6 \\ \hline 7 & 8 & 9 \end{tabular}$

You get to go first, but you do not know your opponents moves. If you call a square that is already taken, you have to choose another square.

The algorithm for choosing your moves is in the flow chart below.

The short description of the algorithm is to take the center, and then try for an edge. If you catch an O placement on the second move, then you have enough information to play to win. Otherwise, you play to eliminate the possible winning positions for O.

One interesting note on the second move. If you play for a corner on the second move, it is possible to have to guess to prevent defeat. Consider the board below.

$\begin{tabular}{c|c|c} X & & ?\\ \hline & X & ? \\ \hline ? & ? & O \end{tabular}$

Any of the question marks could be an O, and you do not have enough information to know for certain if you can block defeat on the next turn.