applets.

Paper Scissors Stone

← All apps

About Paper Scissors Stone

Paper covers Stone, Scissors cut Paper, Stone smashes Scissors. Pick your move with the buttons or the keys 1, 2, 3 (or P, S, T for sTone). The computer has already chosen before you press anything: its hand sits face down until yours is in. N starts a new game.

The Learner watches your habits and plays to beat the move it expects next. After each round it says what it expected and why. Against Random nobody can do better than a third wins, a third draws and a third losses in the long run, however clever they are. Copycat and Beat-last are simple bots you can learn to beat yourself. BOT VS BOT plays two strategies against each other for up to 10,000 rounds.

THE STORY

The game began in China, where a hand game of this kind is described in the late Ming dynasty, around 1600. It travelled to Japan, where the version with paper, scissors and stone (jan-ken) took shape, and it spread to the West in the early 20th century. In Britain it is often Paper, Scissors, Stone; in America, Rock, Paper, Scissors.

People are bad at being random. Asked to make up a random list, they avoid repeats and switch too often, and in this game many switch after losing and stick after winning. A large study of students playing for small cash prizes, published in 2014 by Zhijian Wang, Bin Xu and Hai-Jun Zhou, found just that pattern. Computer programs have long been written to exploit it: in 1999 the First International RoShamBo Programming Competition, run by Darse Billings at the University of Alberta, was won by Dan Egnor's "Iocaine Powder", which ran several predictors at once and trusted whichever had been doing best. The Learner here is a much simpler cousin of that idea.

HOW IT WORKS

Seven habit spotters each guess your next move from what you have done so far: your favourite move lately; what you played after your last one, two or three moves; what you do after a win, a loss or a draw (stay, or switch which way); how you answer its last move (copy it, or beat it); and whether the last few rounds have happened before, and what you did next then. Each spotter is scored on how its guess would have done (a win counts +1, a loss −1, older rounds count for less), and the Learner plays to beat the guess of the best one. Until one of them has earned some trust it plays at random. The scoreboard on the right shows how often each spotter has been right in its last 20 guesses; the one it used this round is outlined.

"How predictable you are" is the share of your moves its best spotter guessed right over the whole game. A truly random player sits at about a third, the Expected line on the chart. Most people drift well above that after 50 rounds or so, and the Learner starts winning.

The computer's move is worked out from the history only, before your move exists, and it never looks at the key you press until it has committed. The random choices use your browser's secure random numbers to seed the generator.

FURTHER WATCHING AND READING

Play against
VS

WINS SO FAR

SCORE

0 YOU WON
0 DRAWN
0 IT WON

HOW IT READS YOU

    BOT VS BOT

    v