{
  "title": "Solved m,n,k games (tic-tac-toe on other boards)",
  "source": "https://playnook.io/blog/tic-tac-toe-bigger-boards",
  "generated": "2026-08-31",
  "method": {
    "search": "negamax with alpha-beta, two null-window probes (values are only -1, 0, 1)",
    "table": "transposition table storing exact values and bounds, keyed on the canonical form under the board's symmetry group",
    "symmetry": "8 symmetries for square boards, 4 for rectangles; both masks permuted together",
    "crossCheck": "every board of at most 12 squares is also solved by brute force — no table, no pruning, no symmetry — and the two must agree; the script aborts if they do not",
    "independentCheck": "5x5 with k=4 was recomputed with symmetry folding switched off: 1,727,700,000 nodes instead of 63,850,638, a completely different path through the search, same result",
    "note": "Only two outcomes are possible: a first-player win or a draw. A second-player win is impossible by the strategy-stealing argument, and the solver aborts if it ever sees one."
  },
  "longRun": {
    "board": "6x5",
    "m": 6,
    "n": 5,
    "k": 4,
    "result": "first player wins",
    "nodesSearched": 13334540017,
    "seconds": 5527.8,
    "date": "2026-08-31",
    "agreesWith": "Jos W.H.M. Uiterwijk, Solving Strong and Weak 4-in-a-Row, IEEE Conference on Games (CoG) 2019, doi:10.1109/CIG.2019.8848010 — which proves the 5x6 board a first-player win, and a monotone one",
    "note": "computed here independently; the published result was not used as an input"
  },
  "citedNotComputedHere": [
    {
      "board": "15x15",
      "k": 5,
      "result": "first player wins (free-style Gomoku)",
      "reference": "L. V. Allis, Searching for Solutions in Games and Artificial Intelligence, PhD thesis, 1994",
      "why": "far beyond exhaustive search; established by a dedicated proof"
    }
  ],
  "results": [
    {
      "board": "3x3",
      "m": 3,
      "n": 3,
      "k": 3,
      "result": "draw",
      "winningLines": 8,
      "squares": 9,
      "linesPerSquare": 0.889,
      "nodesSearched": 269,
      "seconds": 0
    },
    {
      "board": "3x3",
      "m": 3,
      "n": 3,
      "k": 2,
      "result": "first player wins",
      "winningLines": 20,
      "squares": 9,
      "linesPerSquare": 2.222,
      "nodesSearched": 10,
      "seconds": 0
    },
    {
      "board": "3x4",
      "m": 3,
      "n": 4,
      "k": 3,
      "result": "first player wins",
      "winningLines": 14,
      "squares": 12,
      "linesPerSquare": 1.167,
      "nodesSearched": 175,
      "seconds": 0
    },
    {
      "board": "4x4",
      "m": 4,
      "n": 4,
      "k": 3,
      "result": "first player wins",
      "winningLines": 24,
      "squares": 16,
      "linesPerSquare": 1.5,
      "nodesSearched": 116,
      "seconds": 0
    },
    {
      "board": "4x4",
      "m": 4,
      "n": 4,
      "k": 4,
      "result": "draw",
      "winningLines": 10,
      "squares": 16,
      "linesPerSquare": 0.625,
      "nodesSearched": 39837,
      "seconds": 0.03
    },
    {
      "board": "5x5",
      "m": 5,
      "n": 5,
      "k": 3,
      "result": "first player wins",
      "winningLines": 48,
      "squares": 25,
      "linesPerSquare": 1.92,
      "nodesSearched": 162,
      "seconds": 0
    },
    {
      "board": "4x5",
      "m": 4,
      "n": 5,
      "k": 3,
      "result": "first player wins",
      "winningLines": 34,
      "squares": 20,
      "linesPerSquare": 1.7,
      "nodesSearched": 150,
      "seconds": 0
    },
    {
      "board": "4x5",
      "m": 4,
      "n": 5,
      "k": 4,
      "result": "draw",
      "winningLines": 17,
      "squares": 20,
      "linesPerSquare": 0.85,
      "nodesSearched": 1356970,
      "seconds": 0.41
    },
    {
      "board": "4x5",
      "m": 4,
      "n": 5,
      "k": 5,
      "result": "draw",
      "winningLines": 4,
      "squares": 20,
      "linesPerSquare": 0.2,
      "nodesSearched": 918545,
      "seconds": 0.23
    },
    {
      "board": "5x5",
      "m": 5,
      "n": 5,
      "k": 4,
      "result": "draw",
      "winningLines": 28,
      "squares": 25,
      "linesPerSquare": 1.12,
      "nodesSearched": 63850638,
      "seconds": 38.59
    },
    {
      "board": "5x5",
      "m": 5,
      "n": 5,
      "k": 5,
      "result": "draw",
      "winningLines": 12,
      "squares": 25,
      "linesPerSquare": 0.48,
      "nodesSearched": 21016650,
      "seconds": 11.91
    }
  ]
}
