Kayles
Quick Pitch
Kayles is a two-player strategy game where players take turns removing one or two adjacent objects from a row β the player who takes the last object wins.
Hook
Line up about a dozen stones or coins in a row. On your turn, you can remove one object, or two objects that are sitting right next to each other. Gaps in the line are fine β they stay there. The player who takes the very last object wins. It looks almost too simple, but working out who's going to win takes real strategic thinking, and the person who figures it out first usually does.
Equipment Needed
- 10β15 small objects (stones, coins, sticks, buttons, or any identical small items)
- A flat surface to arrange them in a line
Setup
- Arrange 10β15 objects in a straight line. A row of 12 is a good starting point.
- Number the objects from left to right if you want to track positions during play (optional but helpful).
- Decide who goes first.
Rules
Objective
Be the player who removes the last object from the line.
How to Play
Players take turns. On your turn, you must do one of the following:
- Remove one object from anywhere in the line, or
- Remove two objects that are sitting next to each other (adjacent, with no gap between them).
When you remove objects from the middle of the line, you leave a gap β the remaining objects stay exactly where they are. They don't slide together to fill the space.
Important Rule: Adjacency
When choosing two objects to remove, the two objects must be directly next to each other with no gap between them. Two objects with a gap between them do not count as adjacent and cannot be removed together.
Winning
The player who removes the final object (or the final pair of adjacent objects) wins the game. If no objects remain after your turn, you win.
Example Turn Sequence
Starting row: β β β β β β (6 objects)
Player 1 removes objects 3 and 4 (adjacent):
Row: β β _ _ β β
Player 2 removes object 1:
Row: _ β _ _ β β
Player 1 removes objects 5 and 6 (adjacent):
Row: _ β _ _ _ _
Player 2 takes the last object.
Player 2 wins!
Expert Player
Tips
Kayles has been fully analyzed using a branch of mathematics called combinatorial game theory. Here's what that analysis tells us about playing well:
Think about the gaps. When you remove objects from the middle, you split the row into separate sections. Each section can be thought of as its own mini-game. The player who can see all the sections together and reason about them has a big advantage.
Count the remaining objects. In simple cases (one unbroken row), the parity (odd or even count) of remaining objects often predicts who will win. But splits and gaps complicate this quickly.
Control the splits. Removing the center object (or center pair) of a row splits it in half. This can be either devastating or brilliant depending on the position. If both halves are equal, the second player can mirror the first player's moves β a powerful strategy.
Understand P-positions and N-positions. Game theorists call losing positions (where the current player loses with perfect play) "P-positions" and winning positions "N-positions." With a bit of practice, you can learn to recognize which positions are which and always steer toward P-positions for your opponent.
Variations
- Misère Kayles: The player who takes the last object loses instead of wins. This flips the strategy entirely.
- Extended reach: Allow removal of up to 3 adjacent objects instead of 2. Changes the strategic analysis significantly.
- Different starting counts: Vary the number of starting objects to explore how difficulty changes.
Learn More β History & Origins
History & Origins
Kayles was developed as a mathematical game in the 20th century, inspired loosely by bowling β where a bowler knocks down "kails" (pins) by rolling a ball. The game belongs to the larger family of combinatorial games studied alongside Nim, Chomp, and Hackenbush. The name "Kayles" is thought to derive from "quilles," the French and older English word for bowling pins.
The game was formally analyzed by the mathematicians Richard Guy and Cedric Smith in the mid-20th century. John Conway and Elwyn Berlekamp later included Kayles in their landmark book Winning Ways for Your Mathematical Plays (1982), which catalogued the mathematical structure of dozens of combinatorial games. Conway and Berlekamp showed that Kayles positions can be assigned Grundy numbers (also called nimbers), which allow any position to be analyzed exactly. They computed the Grundy sequence for Kayles positions up to very large numbers, discovering that the pattern of values is eventually periodic β a surprising and beautiful result.
Cultural Context
Kayles sits at the intersection of recreational mathematics and strategic gameplay. Unlike most games, it can be completely solved with the right mathematical tools β there is always a determined winner with perfect play, and in principle you could always know before taking your first turn whether the position is winning or losing. This makes Kayles a favorite example in university courses on combinatorial game theory and competitive mathematics.
In practice, most casual players engage with Kayles purely by intuition, which makes it genuinely fun and competitive even without knowing the theory. The game is quick to set up, requires no special equipment, and produces natural tension as the row of objects shrinks toward the end. It's often used in mathematics camps and enrichment programs as an accessible introduction to game theory concepts.