I have flip-flopped a few times, but think that Player 2 has an unbeatable strategy. The trick is that Player 1 needs an X in each row and each column while Player 2 needs a "box". Four O's that form a rectangle with no X's that share a row or column with said rectangle.
- First two O's sharing a row with self and separated by 1 square. Never put below or above or in line with X on this move. If possible (X not in center column) also make the square not in line with the X.
- If X is not above or below your O's then place two more O's above or below your current ones, at this point you can make two three in a rows on your next move, which means X cannot win.
- If X is above or below your O's then they blocked the box and you need to work to make it. This involves forcing X's move every turn by making a three in a row with holes where you want him to go. The first move is to add a third O to your line forcing X to block, make this third O on a free column that does not have an X and place another O on that column not sharing a row with an X.
- After X's move they have an X in three columns and rows assuming good play, if they do not it is easier. The objective is to minimize the reach to avoid X gaining the needed diversity of locations. Place an O in the same row as your fourth O and sharing a column with one of the original row's Os. Place the second O in the same column in the row that does not have an X. X is now forced to block this column without blocking a new row (as you win if they don't play in that column and both those rows are blocked by new Os).
- Whichever one they block you now have two rows/columns with two O's and no X's. Place an O in each and finish whichever X does not block on your final move.
For instance the following moves show this algorithm:
X (3,3) O (2,2&2,4) X (4,4) O (1,2&1,5) X (5,2) O (2,1&2,5) X (2,3) O (1,3&3,5) X (1,1) O (4,5&5,5)
X chooses the middle and then blocks the first box. However after this X is forced to make each move it makes (or an equivalent or inferior move). In fact past the second move the only moves that would change Os moves would involve immediate wins by O.
If X goes (3,1) as their second move it ends sooner, with O (2,4&4,4) followed by two three in a rows on the next turn. (X (3,4) follows with O (2,3&4,3) then either (2,1&2,5) or (4,1&4,5) and X (2,3) follows with O (3,4&4,3) then O(1,4&5,4) or (4,1&4,5))
Player 1's strategy would be to block any three in a rows and always attempt to play in a row and column that does not contain an X, but that doesn't block the above from winning.