This app creates striking patterns by placing chess pieces according to a set of simple rules. It's a lovely example of emergent behavior.
I got the idea from this Numberphile video featuring Neil Sloane. Credit also goes to Jonas Karlsson for inspiring parts of the design.
Here are a handful of interesting examples. Click the links to open them in the app. If you find a pattern you like, you can click the Share button to copy its URL.
https://rgambee.github.io/knight-grid/?players=f25959-2.1%2C598cf2-3.1&n=200

https://rgambee.github.io/knight-grid/?players=f25959-1.0%2C598cf2-4.3&n=1000

https://rgambee.github.io/knight-grid/?players=f25959-2.1%2C598cf2-2.1%2C66d980-3.3%2Cf2d959-1.0&n=1000

https://rgambee.github.io/knight-grid/?players=f25959-1.1%2C598cf2-3.1%2C66d980-4.2%2Cf2d959-3.0&n=1000

https://rgambee.github.io/knight-grid/?players=f25959-1.1%2C598cf2-2.2%2C66d980-3.3%2Cf2d959-4.4&n=1000

The board is an infinite grid. The squares are numbered, starting with 1 in the center and spiraling outward.
Each player has exactly one type of piece they can play. A knight is the classic example. On each turn, the player places a piece in the lowest-numbered square which is not threatened by an opponent.
See the Numberphile video for a clearer explanation.
The game works best with leaping pieces, i.e. non-sliding ones which can move in any direction. Only one standard chess piece meets these criteria: the knight. But we can use alternative pieces to create different patterns.
Copyright © 2026 Robert Gambee