Greedy Pig VS

Solo against the bots, or pass a laptop around the group.

How this works

  • Add 1–6 players. Each slot is a human (you choose a name and press a key to decide each roll) or a bot with a fixed personality.
  • Each human's number key toggles their stance between STAND (in the game, at risk) and SIT (safe, score locked).
  • Press SPACE or click ROLL to roll for everybody.
  • Highest score after 15 rolls wins.

Greedy Pig

The rules of the game itself

The goal

Have the highest score after 15 rolls of one die.

Each roll

  • Before each roll, every player is either STANDING or SITTING.
  • Standing means you are in the game and at risk. Sitting means your score is safe.
  • If the die shows 2, 3, 4, 5, or 6: every standing player adds that number to their score. Sitting players do not change.
  • If the die shows 1: every standing player's score resets to ZERO. Sitting players are safe.
  • Between any two rolls you may change your mind: stand up to chase more points, or sit down to lock in what you have.

Winning

After the 15th roll, the highest score wins. Ties are possible.

The one decision: every single roll, you ask yourself the same question. Bank what I have, or risk it for more? Stand too long and a 1 wipes you out. Sit too early and you leave points on the table.

The bots in this version

Mathematician

Plays the expected-value-optimal strategy: stands until score reaches 20, then sits. This is the strategy the math view derives.

Cautious

Sits as soon as score reaches 12. Rarely busts, but usually leaves points on the table.

Daredevil

Pushes on until score reaches 28 before sitting. Often busts. Occasionally wins big.

Coin-flip

Flips a fresh coin every roll: 50% chance to stand, 50% to sit. A control case showing what "no strategy" looks like.

The Math Behind Greedy Pig

Why 20 is the magic number

What happens on one roll?

Imagine you are standing, and your score right now is S. The die is about to be rolled. Two things can happen:

1 chance out of 6, the die shows a 1, and you lose everything: a change of −S
5 chances out of 6, the die shows 2 to 6. The average of 2, 3, 4, 5, 6 is 4

The expected value of one more roll

Expected value means: if you made this exact decision many, many times, what would happen on average?

EV = 16 × (−S)  +  56 × (+4)  =  20 − S6

The expected value of standing for one more roll is (20 − S) divided by 6. Whether that is a good idea depends entirely on your score S.

Try it: drag the slider to set your current score
Your current score (S) = 8

The magic number: 20

If your score is below 20, the expected value is positive. On average, standing for one more roll pays off. If your score is above 20, the expected value is negative. At exactly 20, it is a perfect break-even.

So the math gives a clear guideline: climb to about 20, then sit and stay seated. That is exactly what the Mathematician bot does.

How risky is it to keep standing?

Rolls standing in a rowChance of surviving them all
183%
269%
358%
448%
540%

Across all 15 rolls of a game, expect roughly 2 or 3 ones to come up.

The twist: when a bad bet is the smart play

Expected value tells you the best move on average. But you are not trying to score well on average, you are trying to win. If it is the final few rolls and you are in last place, sitting guarantees you lose. So you have to stand, even past 20. The bots in this version do not know that — if you can read the scoreboard near the end, you can outplay even the Mathematician.