The red and black knights problem asks for an explanation of the patterns generated by a deterministic greedy
algorithm devised by J. Karlsson for placing two colors of chess
knights on an infinite chessboard
(Numberphile 2026). Label the cells 0, 1, 2, ... in a counterclockwise spiral,
starting at the origin and first moving right. The first
three cells have coordinates ,
, and
, and the successive straight line
runs have lengths 1, 1, 2, 2, 3, 3, ....
Starting with an empty chessboard, black and red take turns, with black moving first. At each turn, place a knight on the lowest-numbered
unoccupied cell not attacked by a knight of the opposite color. A knight attacks
the eight cells whose coordinates differ from its
own by
or
.
The first four placements occupy cells 0, 1, 2, and 3. On the fifth turn, black skips cell 4 because it is attacked by the red knight on cell 1, and occupies cell 5 instead. On the sixth turn, red occupies cell 4, since attacks between red knights are allowed. The panels show these first six placements; a gold outline marks the newest knight and gold rings mark the cells it attacks in the displayed region.
The knight graph encodes the same attack relation on a finite chessboard. The classical knights problem asks for the maximum number of mutually nonattacking knights on such a board. In the two-color construction, attacks between knights of the same color are allowed.
The labels occupied by black knights begin 0, 2, 5, 9, 11, 15, 20, 21, 30, 31, ... (OEIS A392177), while those occupied by red
knights begin 1, 3, 4, 6, 10, 12, 24, 25, 34, 35, ... (OEIS A392178).
Reading the placements in turn order and using negative
labels for red gives 0, , 2,
, 5,
, 9,
, 11,
, ... (OEIS A395355).
This turn order differs from reading the final occupied cells in increasing label
order.
The animation first shows individual placements and their attacks, then accelerates and zooms out to the region.
Uncolored cells remain unoccupied. Placements continue outside each displayed region until neither color can subsequently occupy another cell within it. The large-scale computations linked from OEIS A392177 suggest red and black regions approaching the upper and lower half-planes, respectively, away from narrow bands near the coordinate axes. These finite computations do not establish the suggested asymptotic separation. Branicky et al. (2026) report a convergence proof.
Numberphile (2026) explains the two-color construction, while Numberphile2 (2026) presents additional patterns and variants.
