Paper Duel

Board size
4 × 4Turn 0

About Paper Duel

This project began with Rift, a neural opponent combining learned weights with hand-written tactics. We then tried to prove optimal strategies on smaller boards.

A simple unbeatable strategy for every 1×n

The rule: On your territory, step away from your starting end. After stepping outside, return one cell toward home on the next turn.

Why it is safe. On a line the heads cannot pass without a collision. Your home remains an unbroken interval behind your head. You expose only one trail cell, and returning converts it before the opponent can cut it. If the opponent enters that new cell on the same turn, it only cancels your new gain; your older territory survives.

Why you cannot fall behind. A one-cell capture first takes two turns, then at least three per extra cell. Your rule grows at that fastest rate. When the two territories touch, the frontier cell can alternate between your trails, or you can claim it as the opponent retreats. The opponent cannot keep an extra captured cell: its return claims that cell just as your forward step overwrites it. Your territory cannot shrink, and you keep at least as many owned cells.

If the opponent draws a trail two cells long, it cannot turn back without hitting its own trail. There is no other way home on a line. Its territory stops growing while yours cannot shrink, so it cannot create a territory lead that way either.

Thus walls, self-intersections and trail cuts cannot defeat this rule; equal-or-better territory prevents a loss in a head collision, swap or repetition. Play must end because the board is finite and repeated positions end the game. Both seats can use the reflected rule, so optimal play is an actual draw for every n ≥ 2.

This is a logical argument for all lengths. The saved strategies for 1×2 through 1×16 are separate computer checks. The key fact—heads cannot pass—fails on wider boards, so this argument does not establish a strategy for 2×n or 3×n. A 1×1 board cannot hold two distinct starts.

BoardWhat we know
Why the new green strategies cannot lose

The newest Axiom policies assign an integer rank to each physical position. It never increases, and it strictly decreases when the protected player moves while behind on territory. A repeated position therefore cannot be behind: a cycle with a deficit would require the same rank to be both smaller and unchanged. The board is finite, so play must end by a checked terminal result or a nonlosing repetition. All four opponent replies are independently checked at every policy position.

This is a logical invariant over a computer-constructed strategy. It is a guarantee from the one-cell opposite-corner opening, not a claim about every arbitrary position.

How the proofs were checked

Each proved opening starts with one owned square beneath each player, at opposite corners. We replay each strategy against every possible opponent reply, including crashes. A cutoff never counts as a draw. Proofs for the previous four-square opening do not establish results for this opening.

Rules

Claim territory

Both players move one cell at the same time. Leave your territory to draw a trail, then return home to claim the trail and enclosed cells.

Protect your trail

Touch an opponent's trail to eliminate them. Hit your own trail and you are eliminated. The controls block moves beyond the board edge; a wall bump does not take a turn.

Collisions and repetition

When heads meet or swap places, the player with more territory wins. Equal territory draws. Mutual trail cuts use the same tiebreak. If a full position repeats twice, the territory leader wins; a tie draws. Simultaneous contested captures retain prior ownership.

Every board starts with one owned square per player, in opposite corners. Press Space after a game to rematch.

Standing on earlier work

Citations

Primary sources and prior work behind this project. The small-board proofs are for our own rules; related games have different rules.

Inspired by Paper.io and the territory-enclosure mechanics of Qix and Xonix. Our strategy certificates use classical AND/OR search and minimax bounds. Credit for the minimax foundation goes to John von Neumann (1928); Lloyd S. Shapley (1953) established foundational state-based game theory. Minimax paper · Stochastic Games.

Closely related simultaneous-move Tron research is by Marc Lanctot, Christopher Wittlinger, Mark H. M. Winands, and Niek G. P. Den Teuling (2013). Their stacked matrix-game approach is an important precedent, although our capture and collision rules differ. Read the paper.

Related neural territory-game work: Jits Schilperoort, Ivar Mak, Madalina M. Drugan, and Marco A. Wiering (2018), Learning to Play Pac-Xon. Direct Paper.io learning work includes Junshen Kevin Chen's 2019 Stanford course project, AI for Paper.io. These sources are prior work, not claims that their games are equivalent to ours.

Proof-number search: L. Victor Allis, Maarten van der Meulen, and H. Jaap van den Herik (1994), Proof-number search, Artificial Intelligence 66(1), 91–124. Used here to guide the ongoing small-board proof search.

The 5×5 search guide uses Double DQN, following Hado van Hasselt, Arthur Guez, and David Silver (AAAI 2016), Deep Reinforcement Learning with Double Q-learning.

Depth-first proof-number search: Ayumu Nagai and Hiroshi Imai (2002), Proof for the Equivalence between Some Best-First Algorithms and Depth-First Algorithms for AND/OR Trees. This guides the memory-bounded 6×6 investigation.

Learn Paper Duel