GetHubApps Logo
GetHubApps
✊
FunFree · In-Browser

Rock Paper Scissors

Play rock, paper, scissors against the computer and keep score.

0

Wins

0

Draws

0

Losses

Play rock paper scissors against the computer, with a running score across rounds. The computer plays uniformly at random, which — unusually for a game — makes it unbeatable in the long run and impossible to lose to consistently either.

That sounds like it drains the game of interest. In fact it points at the only thing that ever made rock paper scissors interesting: against a human, it is a game of prediction, and humans are dreadful at being unpredictable.

Why random play is mathematically optimal

Rock paper scissors is a zero-sum game with no pure-strategy equilibrium — whatever you always throw, there is a throw that always beats it. Its Nash equilibrium is the mixed strategy of playing each option exactly one third of the time, at random.

A player at that equilibrium cannot be exploited by any opponent, no matter how clever, and will win exactly a third of games, lose a third and draw a third. The cost of that guarantee is that it also cannot exploit anyone else. Against a predictable opponent, deliberately unbalanced play wins far more — which is why the world championships are won by reading people, not by randomising.

How humans fail to be random

  • Men open with rock disproportionately often. It's the aggressive-feeling choice, and it's the most exploitable habit in the game.
  • Players rarely throw the same option three times running, because it doesn't feel random — so after two identical throws, the third is predictable.
  • Winners tend to repeat what won; losers tend to switch to what would have beaten them. Both are exploitable once you notice which one your opponent does.
  • Scissors is thrown least often, roughly 29% of the time, so paper is a marginally better opening than the alternatives.
  • Announcing your throw in advance works surprisingly often, because opponents assume you must be bluffing.
  • None of this applies here — the computer is genuinely random, so no pattern exists to read.

Older and more widespread than you'd think

The game descends from Chinese hand games recorded as early as the Han dynasty, and reached its modern three-gesture form in Japan as jan-ken by the 17th century. It spread worldwide in the early 20th century through Japanese emigration and trade.

It's also used as a genuine decision procedure. In 2005 the auction houses Christie's and Sotheby's were asked to play rock paper scissors for the right to sell a $20 million art collection; Christie's won with scissors, on the advice of an employee's eleven-year-old daughter, who reasoned that everyone expects rock. Courts have occasionally ordered it to settle procedural disputes between lawyers who couldn't agree on anything else.

Frequently asked questions

Does the computer cheat or read my move?
No. Its throw is generated at random independently of yours, so over many rounds you should converge on roughly a third wins, a third losses and a third draws.
Is there a winning strategy against a random opponent?
No — that's precisely what makes random play optimal. No strategy beats it and none loses to it; the expected result is an even split however you play.
What is the best opening move against a human?
Paper, marginally. Rock is thrown most often, particularly by inexperienced male players, and scissors least — so paper has a small edge in a first round against a stranger.
Why do I feel like I'm on a losing streak?
Random sequences cluster more than intuition expects. Losing five in a row has a probability of about 1 in 243 per attempt, which comes up regularly across a long session.
Where does the game come from?
It traces to Chinese hand games from the Han dynasty, took its modern three-gesture form in Japan as jan-ken, and spread globally in the early 20th century.
Has it ever settled anything important?
Yes — Christie's and Sotheby's played for the right to auction a $20 million collection in 2005, and courts have occasionally ordered it to resolve procedural deadlocks between lawyers.

Related tools