Skip to the game
Tic Tac Toe

Chomp

Take bites from a chocolate bar in this Chomp game, against a computer that knows every position or a friend, and leave your opponent the poisoned square.

Play Chomp

You
0
Computer
0

Unwrapping the chocolate…

Tap a square to bite it along with every square below it and to its right, then tap Eat (or the same square again). Don't be the one left with the poisoned square in the corner. With a keyboard, move with the arrow keys and press Enter; Escape clears your pick, H gives a hint, U undoes, and N starts a new game.

Game settings
Changing a setting starts a new game. Each opponent keeps its own score.
Opponent
Difficulty
First bite
Bar size

How it works

How to play the Chomp game

Pick a square to eat it along with everything below and to its right, and make sure your opponent is the one left facing the poisoned corner.

  1. Step 01

    Pick a square

    Tap any square except the poisoned one. It's picked along with every square below it and to its right.
  2. Step 02

    Take the bite

    Tap Eat, or the same square again. A bite can be a single square or most of the bar.
  3. Step 03

    Leave the poison

    Whoever is left with only the poisoned square in the top-left corner loses. Make sure it's your opponent.

Features

Chomp with a computer that knows every position

  • A Hard level that has solved every bar

    Easy and Medium slip up. Hard has worked out every position on the bar and never misses a winning bite.

  • Take turns biting with a friend

    Pass the bar back and forth on one screen. Player 1 bites first, and two-player wins are counted on their own.

  • Three bar sizes

    Small is 4 × 5 squares, Medium 5 × 7, and Large 7 × 9.

  • Hints that show a winning bite

    The squares to eat glow, or the hint tells you no bite wins for sure.

  • Undo

    Take back a bite and try another. Against the computer, its reply goes back too.

  • Arrow keys and squares read aloud

    Move around the bar with the arrow keys, press Enter to pick and eat, and hear every bite announced.

Strategy

Chomp strategy: shapes that win and lose

Nobody knows a rule for every bar, but a few shapes have simple answers, and they turn up in real games.

  • Leave an equal L

    When only the top row and the left column are left, with arms of the same length, the player to move loses. Copy every bite on the other arm.

  • Never leave a square

    Whoever faces a square bar wins by biting at row 2, column 2. Eating the whole last column of the 4 × 5 bar hands your opponent a 4 × 4 square.

  • Two rows: top one longer by one

    With two rows left, leave the top row exactly one square longer than the bottom row. That shape loses for the player to move.

  • One row or column left? Eat all but the poison

    If a single row or column is left on your turn, eat everything except the poisoned square and you win.

  • Take the first bite

    On every bar here the first player can always win, and each bar has exactly one winning first bite. The hint shows it.

About the game

The Chomp game: a chocolate bar with a poisoned corner

The rules, bar sizes, the computer levels, controls, why the first player wins, the shapes you can solve, and where Chomp came from.

Chomp is a two-player game played on a chocolate bar with one poisoned square in the corner. Each bite takes a square and everything below it and to its right, and whoever is left with the poison loses. Here you play it against a computer that has worked out every position, or against a friend on the same screen.

The rules of the Chomp game

The bar starts as a full rectangle, with a skull on the poisoned square in the top-left corner. On your turn, choose any square that's still there, other than the poison. You eat that square and every square below it, to its right, or both. Then it's the other player's turn.

Because every bite takes a corner off what's left, the bar always looks like a staircase, with rows that never get longer going down. The game ends when only the poisoned square is left: the player who has to face it loses, and the player who took the last bite wins. There's no luck and no draw.

Bar sizes and who bites first

Under Bar size, choose Small, 4 rows by 5 columns, Medium, 5 × 7, or Large, 7 × 9. A Small game takes a minute or two, and the Large bar, with 63 squares, gives both players a lot more to think about.

Against the computer, First bite decides who starts, and it matters: on every bar here, the first player can always win with perfect play. In 2-player mode Player 1 bites first, so swap who starts each game.

Playing the computer or a friend

Choose Computer or 2 players under Opponent. The computer has three levels:

  • Easy goes for a winning bite only about 1 time in 4 and otherwise bites at random.
  • Medium finds the winning bite about 2 times in 3, and every time once 10 or fewer squares are left.
  • Hard has worked out every shape the bar can reach, so it never misses a winning bite. When it has none, it eats a single square as far from the poison as it can and waits for a slip.

Hard can't lose when it bites first. Take the first bite yourself and you can beat it, but only by finding the one winning bite and never slipping after that. Two-player games and each computer level keep separate scores.

Picking a bite with a tap, a mouse, or the keys

Tap or click a square to pick it, and the squares that would go light up. With a mouse you see them as soon as you hover. Tap Eat, or the same square again, to take the bite.

  • Keyboard: Tab to the bar, move with the arrow keys, and press Enter to pick and Enter again to eat. Escape clears your pick, H shows a hint, U undoes, and N starts a new game.
  • Screen readers: each square is read out with its row, its column, and how many squares a bite there would eat, and every bite is announced.
  • Undo: takes back your last bite, and against the computer its reply too.

Why the first player always wins the Chomp game

On any rectangle bigger than a single square, the first player can force a win. The proof uses an argument called strategy stealing. Suppose the second player had a winning plan. The first player opens by eating only the bottom-right square, and the second player answers with some winning bite.

But every bite eats the bottom-right square anyway, so that answer leaves a bar the first player could have made with one opening bite of their own. Then the first player would be the one following the winning plan. That's a contradiction, so the second player can't have a winning plan, and the first player must.

The proof never says which bite wins. It only shows that one exists, which is why it's called a non-constructive proof.

No general rule, but one winning first bite per bar

For a general rectangle, nobody has found a rule that says where to bite. A computer can find the answer for one bar by checking every shape it can be eaten down to, but the count grows fast: a 7 × 9 bar can already be eaten into just over 11,000 different staircases. The computer here works through all of them.

Each of the three bars has exactly one winning first bite, and it's bigger than you might guess. It eats 6 squares on the Small bar, 20 on Medium, and 30 on Large. Every other opening loses against perfect play, and Hint shows the winning bite whenever there is one.

Shapes you can solve: L shapes, squares, and two rows

A few shapes do have simple answers, and they come up during real games:

  • Equal L: when only the top row and the left column are left, with arms of the same length, the player to move loses. Whatever they eat from one arm, copy it on the other.
  • Square: the player facing a square bar wins by biting at row 2, column 2, which leaves an equal L.
  • Two rows: with two rows left, the player to move loses exactly when the top row is one square longer than the bottom. Facing two equal rows, eat the bottom-right square.
  • One row or one column: eat everything except the poison.

The two-row rule holds up because you can always restore it. If your opponent shortens the bottom row, cut the top row back to one square longer. If they shorten the top row, the rows end up equal, and eating the bottom-right square brings back the one-square gap. Sooner or later the bottom row is empty and the top row is just the poison.

On the Small bar, eating the whole last column looks harmless, but it leaves a 4 × 4 square, and your opponent wins by biting at row 2, column 2.

Beating each computer level

  • Easy takes a sure win only now and then, so even a shaky bite usually survives. Practice the shapes above on it until leaving an equal L feels automatic.
  • Medium is beatable on a big bar, but once 10 or fewer squares are left it never misses a winning bite. Reach a losing shape for it before the bar gets that small.
  • Hard can only be beaten if you bite first. Use the hint on the opening bite, and press it again whenever you're unsure, since every reply after that has to be a winning one too.
  • When no bite wins, eat one square at a time from the far corner. Easy and Medium bite at random when they miss, so a longer game gives them more chances to slip.

Where the Chomp game came from

The chocolate-bar game was devised by David Gale, a mathematician at the University of California, Berkeley. Martin Gardner wrote about it in his Mathematical Games column in Scientific American in 1973 and gave it the name Chomp, and Gale published his own article, A Curious Nim-Type Game, in 1974.

The same game had already appeared in another form. In 1952 the Dutch mathematician Frederik Schuh described a game of choosing divisors of a number, where you may not pick 1 or a multiple of a number already chosen. Take 12: its divisors 1, 2, 4 and 3, 6, 12 fit in a 2 × 3 grid, and choosing one rules out all its multiples, just as a bite takes the squares below and to the right. The number 1 plays the poison.

Like Nim, Chomp gives both players the same moves, and Hex uses the same strategy-stealing proof to show that the first player wins.

What's saved between visits

No account is needed. The page needs a connection to load, and after that Hard's search through every staircase, and every hint, runs in your browser. Your bites and scores aren't sent to a server.

The bar you're partway through, your settings, and a score against each computer level and for two players are kept in this browser's local storage. Close the tab mid-game and the same staircase is waiting later. Reset scores clears every score, and the privacy policy lists the rest.

FAQ

Chomp questions

Quick answers about playing the Chomp game: the rules, who wins, the computer, bar sizes, and saving.

How do you play the Chomp game?

Take turns choosing a square of the chocolate bar and eating it, together with every square below it and to its right. The player left with only the poisoned corner square loses.

Who wins at Chomp?

On any rectangle bigger than one square, the first player can always win with perfect play. The proof, called strategy stealing, shows a winning first bite exists without saying which one it is.

Is there a winning strategy for Chomp?

One always exists for the first player, but nobody knows a general rule for finding it. Square bars, two-row bars, and L shapes do have simple strategies, and the Chomp tips cover them.

Can I beat Hard at Chomp?

Only if you bite first and play perfectly from the first bite on, because Hard has worked out every position. Each bar has exactly one winning first bite, and the hint shows it.

Can I eat the poisoned square?

No. The poisoned square can't be picked. The game ends as soon as it's the only square left, and the player who has to face it loses.

What bar sizes can I play?

Small is 4 rows by 5 columns, Medium is 5 × 7, and Large is 7 × 9. Changing the size, or any other setting, starts a new game.

Can two people play Chomp on one device?

Yes. Set Opponent to 2 players and hand the device over after each bite. Player 1 always bites first, and since the first player can always win, swap who is Player 1 between games.

Is a half-eaten bar saved if I leave?

Yes. The bar in progress, your settings, and a score for each opponent stay in this browser's local storage. Reset scores clears the scores but leaves your settings alone.

Who invented Chomp?

David Gale devised the chocolate-bar game, and Martin Gardner named it Chomp in Scientific American. Frederik Schuh had described an equivalent game about divisors in 1952.