In a standard 3x3 Tic-Tac-Toe board, there is a strategy to win if the opponent makes a mistake. As far as I know, the strategy goes like:

  • Capture the centers
  • Capture the edges
  • Capture a square which can lead to multiple immediate wins
  • Be careful of immediate threats

I'm looking for a common strategy which works for all NxN board variants. Is there one?


The variant has the same rules as the standard one. All squares in a diagonal, row, or column occupied by a player is a win. And of course, if there isn't any moves to make, it's a tie.

  • 1
    On larger boards usually you need more than 3 in a row. Do you mean 5 in a row on a NxN board? – Cohensius Apr 26 '19 at 9:07
  • Thanks for pointing it out! I have edited the question accordingly. – Srivaths Apr 26 '19 at 16:40

Optimal play on NxN boards where you need N in a row leads to a draw for all N > 2:


Most of these board sizes can be proven to be a draw by the second player playing next to the pieces of the first player play to limit the options the first player has to play further.

Given that, it seems the thing you want to do in general would be to play pieces that give you as many options to win as possible. This would be central locations at the beginning and locations that are part of multiple lines of your pieces in the mid-game and late-game. In many cases, the optimal move for you is the one that your opponent should have made in optimal play.

Obviously, there are exceptions for winning the game or blocking your opponent from winning on any given move.

  • 1
    This video generalizes even further, also dealing with 3 or higher dimensional boards: youtu.be/FwJZa-helig – Swier Apr 28 '19 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.