spectastic Walkthrough
changes/2026-07-20-larger-boards/proposal.html
Change proposal · 001-tic-tac-toe

Larger boards, fewer marks to win

So a three-player game isn't always a draw.

applied proposed → approved → applied owner  games date  2026-07-20
TL;DR

Three-player tic-tac-toe on a 3×3 board needing three in a row is a forced draw under good play. This change parameterises the board size (3×3, 4×4, 5×5) and the win length (3–5), so games stay decisive — a 5×5 board won on three in a row drew zero of eight test games. The engines follow: beyond 3×3, exhaustive search gives way to a depth-limited threat search; MCTS and Random scale unchanged.

§1  Intent & scope

The 3-player mode we shipped is almost always a draw: nine cells, three players, three-in-a-row — perfect play blocks every threat. The fix is more room and a shorter goal. This change makes the board and win length configurable, and adapts the engines so the search families still play well (and fast) on the bigger boards. Out of scope: non-square boards, gravity/Connect-Four rules, and boards beyond 5×5.

§2  Deltas

Four typed changes against the spec. Each carries an op and a target.

addedtarget · FR-006

Configurable board size and win length

The game MUST support a board size of 3×3, 4×4, or 5×5 and a win length of 3 to N marks in a row, chosen independently. The opponent menu and win-length options MUST stay valid for the chosen size.

modifiedtarget · FR-004

Two- and three-player modes, any board

− support 2 and 3 players on the 3×3 board
+ support 2 and 3 players on the 3×3, 4×4, or 5×5 board
addedtarget · SC-004

Larger boards are decisive

A three-player game on a 5×5 board won by three in a row MUST NOT always draw — measurably decisive across a run of games.

modifiedtarget · NFR-001

A move resolves under 500 ms — on every board

The < 500 ms budget now spans all board sizes, met by depth-limiting the search beyond 3×3 and bounding the MCTS iteration count per size.

§3  Approach

Win detection generalises to any K-in-a-row on an N×N board. The engines split by tractability:

§4  Risk register

An adversarial pass raised three risks. None block the change; all are resolved.

R-1accepted

Beyond 3×3 the search engines are no longer provably perfect. Depth-limiting trades optimality for speed. Accepted and disclosed — the game's legend states plainly that big-board search is "strong, but no longer provably perfect," and the 3×3 guarantee is untouched.

R-2mitigated

Larger boards could blow the 500 ms budget. First cut of MaxN on 5×5 took ~2.1 s per move. Mitigated by tuning search depth (4→3 on 5×5) and MCTS iterations (1,400→600); re-measured worst-case well under budget.

R-3accepted

Some configurations stay drawish. A 4×4 board needing four in a row still tends to draw. Accepted — the decisive target (SC-004) is met on 5×5 / three-in-a-row, and players can pick the ratio they like.

§5  Verification

0
draws in 8 three-player 5×5 / 3 games. SC-004 ✓
3×3 still unbeatable — regression intact. SC-001 ✓
<500ms
worst move on every board after tuning. NFR-001 ✓

§6  Change log

applied · 2026-07-20
Deltas folded into the spec (FR-006, SC-004, FR-004, NFR-001); spec → v1.1.0; proposal archived.
approved · 2026-07-20
Risk register cleared — R-2 mitigated, R-1/R-3 accepted.
proposed · 2026-07-20
Larger boards + configurable win length, to keep three-player games decisive.
This worked example
principles.html spec.html plan.html tasks.html triage-log.html proposal.html ↳ walkthrough ▶ play the game

One file. Renders anywhere. Degrades to readable static HTML.