Pig

Each throw adds to a running total and you carry on as long as you dare — but a one wipes out everything you have gathered and passes the dice along. Bank instead and it is safe. First to a hundred wins.

How to play

Only the pot is ever at risk, since anything banked cannot be taken back, so each roll is a question of whether the pot is now worth more than the odds of losing it.

  1. Roll The pot grows by whatever the die shows.
  2. Decide Roll again for more, or bank what you have.
  3. Avoid the one A one takes the pot and hands the turn over.
Full instructions
⚀

In depth

Playing the odds in the dice game Pig

Roll a single die as many times as you dare. Every roll adds to a pot in front of you, but roll a one and the entire pot vanishes. Bank the pot at any time and those points are yours for good. The first player to reach the target score wins. One decision, repeated over and over, and there is a mathematically correct answer for when to stop.

Screenshot: How to play Pig
How to play Pig as it appears when the page opens.

The complete rules

Two players alternate turns. On your turn you roll one die. If the result is two through six, that number is added to your pot. You then choose whether to roll again or to bank. Banking adds the entire pot to your permanent score and ends your turn. Rolling again risks the pot for a chance to grow it further.

If you roll a one, the pot is wiped out immediately and your turn ends. You do not lose any points you have already banked. Only the pot, the part you have been accumulating this turn, is lost. You must roll at least once per turn because the pot starts empty and banking nothing is not allowed.

The first player to reach or exceed the target score wins. There is no bonus for going over, and there is no second chance for the trailing player once the leader crosses the line.

Controls and display

Two buttons control the game. Roll throws the die and adds the result to the pot unless it is a one. Bank it takes whatever is in the pot and adds it to your permanent score, then passes the turn. Both buttons are disabled while the die is spinning and while the computer is playing.

The stats bar shows three numbers: your banked score, their banked score, and what is currently sitting in the pot. Two progress bars below the die show how close each player is to the target. A note beneath the playing area narrates what happened on the last roll.

Why twenty is the number to hold at

Each roll of the die has six equally likely outcomes. One of them, the one, costs you the entire pot. The other five add an average of four points each. So each roll is a bet: you risk the pot for an expected gain of about four.

When the pot is small, the gain outweighs the risk. When the pot is large, the risk outweighs the gain. The crossover happens around twenty. Below twenty, rolling again is worth the gamble on average. Above twenty, banking is the smarter choice. This is not a rough guess. The mathematics work out cleanly and the figure has been confirmed by computer analysis.

A player who banks at twenty will beat a player who banks at ten or at thirty over a long series of games. The difference is not dramatic in any single game because the die still decides individual turns, but over many games the pattern is clear.

When to ignore the twenty rule

The hold-at-twenty rule assumes the game is in its middle phase and neither player is close to the finish. Near the end of the game the right strategy changes in two important ways.

First, if the other player is about to win and banking your current pot would not catch up, cautious play just loses slowly. There is no point in banking fifteen when they need only six more to finish. In that position you should keep rolling even past twenty, because the only outcomes that matter are the ones where you bank enough to overtake them or roll a one and lose nothing you would not have lost anyway.

Second, if a small bank would win you the game, take it immediately. If the pot is eight and eight more puts you over the target, do not roll for a bigger number. There is no prize for winning by more, and every extra roll carries a one in six chance of losing everything in front of you.

The computer opponent in this game plays hold-at-twenty with exactly these two corrections. It keeps rolling when banking would leave it hopelessly behind, and it stops the moment it can bank a winning total.

Reading the other player

Because both scores are visible, you always know how far behind or ahead you are. Use this information. If you are comfortably ahead, there is no reason to gamble. Bank at twenty or even a little earlier and let your lead do the work. If you are behind, you need bigger turns than usual, which means holding past twenty more often.

Watch the computer's turns carefully. It will occasionally roll past twenty when it is behind. That is not recklessness. It is the correct play in that position, and copying its logic when you are in the same spot will improve your results.

A turn is worth about eight or nine points on average when played well. If you are more than two full turns behind, you need to take bigger risks to catch up. If you are one turn ahead, steady play should close it out.

Common beginner mistakes

Rolling too long is the most frequent error. A pot of twenty-five is a real haul, and losing it to a one hurts far more than the four extra points were worth. New players often chase a big round number, rolling for thirty or forty, and then watch the one appear.

Banking too early is the opposite mistake and it is nearly as costly. A pot of five or eight is not worth banking in the early game. The probability of a one is only one in six, and the expected gain from rolling again is higher than the pot you would be protecting.

Ignoring the opponent's score is the third common error. Pig is a race, and the correct hold point changes depending on how close the other player is to the finish line. Playing as though the opponent does not exist throws away the one strategic dimension the game offers.

  • Rolling past twenty in the early game when there is no need to take risks.
  • Banking five or six points on every turn, which falls well short of the average turn value.
  • Playing the same way regardless of the score gap, missing chances to gamble when behind or to play safe when ahead.

The three target settings

The easy target is fifty. A game to fifty is short and swings wildly on individual turns. One good turn of twenty-plus points covers nearly half the distance. The shorter game means luck plays a larger role and strategic depth is limited.

The normal target is one hundred. This is the standard version of the game and the one that balances luck and strategy best. A typical game lasts roughly ten to twelve turns per player, which is long enough for the hold-at-twenty rule to matter but short enough that a bad streak can still flip the result.

The hard target is one hundred and fifty. A longer game gives strategy more time to work. The player who consistently holds at twenty will almost always beat one who plays erratically. The extra length also means that falling behind is less catastrophic, since there are more turns left to recover.

A game small enough to solve completely

Pig is one of the few real games whose optimal play has been computed exactly. The solution considers every possible pair of scores and every possible pot size, and it says whether rolling or banking is the better choice in that exact position. The answer is not simply hold at twenty. It is a surface that bends near the end of the game, where a trailing player should roll much longer than twenty.

The hold-at-twenty rule sits within about half a percentage point of the optimal strategy for most of a game. That is why it is the rule people teach and the rule that works in practice. The endgame adjustments described above are the corrections that matter most.

Privacy and where the game runs

The entire game runs inside your browser. Nothing is uploaded to any server, there is no account, and your scores are stored only on this device. The die rolls use your browser's built-in random number generator. Once the page has loaded the game works offline.

Help

How to play Pig

Only the pot is ever at risk, since anything banked cannot be taken back, so each roll is a question of whether the pot is now worth more than the odds of losing it. A one on a single die is a one-in-six chance, which puts a sensible ceiling somewhere around twenty. The target score is yours to set, and a higher one rewards patience.

Roll

The pot grows by whatever the die shows.

Decide

Roll again for more, or bank what you have.

Avoid the one

A one takes the pot and hands the turn over.

Bank

Banked points can never be lost.

Race to the target

First past the post wins, so the score on the other side changes what you should do.

A game small enough to solve completely

Pig is one of the few real games whose optimal play is known exactly. Todd Neller and Clifton Presser worked it out in 2004 by value iteration over every possible score — and the answer is not "hold at twenty" but a surface that bends near the end of the game, where a player who is behind should roll far longer than the simple rule suggests. Hold at twenty is within about half a per cent of it for most of a game, which is why it is the rule everyone teaches. The computer here plays hold at twenty with the two endgame corrections that matter most.

Good to know

Hold at twenty

One face in six wipes the pot, and the other five average four. That makes another roll worth it while the pot is under about twenty, and a losing bet once it is over.

Except when you are behind

If banking would still leave them about to win, cautious play just loses more slowly. Keep rolling.

And except when a small bank wins

If six points takes you over the line, take them. There is no prize for a bigger pot.

The turn is worth about eight

Played well, an average turn banks eight or nine. If you are more than a couple of turns behind, you have to gamble to catch up.

Common questions

Why is twenty the magic number?
Rolling risks the whole pot for an average gain of about four. That trade stops being worth it once the pot is around twenty.
Does a one lose my banked score?
No. Only the pot, which is the part you have not banked yet.
Can I bank without rolling?
No. The pot is empty at the start of a turn, so you have to roll at least once.
Is this a game of skill?
Partly. The dice decide any single turn, but a player who holds at twenty beats one who holds at ten or thirty over a series.
Where does the name come from?
It is an old folk dice game, recorded under that name since at least the nineteen forties and usually played with two dice in its older form.