180Games · Turn-based games

Rock, Paper, Scissors

Rock, Paper, Scissors

Play repeated rounds against the calculator and keep separate win, loss and tie counts.

  • 167 bytes
  • COMP mode
01

Worked examples

Example 1

Original game exercise. Assumed computer moves: C=2. Input order: 3 → 0. Read the output sequence and explain the result. These examples assume the stated draws solely to explain a game. Ordinary play is random and will usually show different values; these inputs do not force the illustrated secret or cards.

Answer
2, 1, 1, 0, 0
Standard solution (without a calculator)
  1. Apply the stated rules in order.
  2. 3>2 ⇒ +1
  3. (X,Y,M)=(1,0,0)
  4. Output sequence: 2, 1, 1, 0, 0
Do it on the calculator

Example 2

Original game exercise. Assumed computer moves: C=2,1,3. Input order: 1 → 2 → 3 → 0. Read the output sequence and explain the result. These examples assume the stated draws solely to explain a game. Ordinary play is random and will usually show different values; these inputs do not force the illustrated secret or cards.

Answer
2, −1, 1, 1, 3, 0, 1, 1, 1
Standard solution (without a calculator)
  1. Apply the stated rules in order.
  2. (1,2) ⇒ −1; (2,1) ⇒ +1; (3,3) ⇒ 0
  3. (X,Y,M)=(1,1,1)
  4. Output sequence: 2, −1, 1, 1, 3, 0, 1, 1, 1
Do it on the calculator

Example 3

Original game exercise. Assumed computer moves: C=3. Input order: 0.5 → 1 → 0. Read the output sequence and explain the result. These examples assume the stated draws solely to explain a game. Ordinary play is random and will usually show different values; these inputs do not force the illustrated secret or cards.

Answer
−9, 3, 1, 1, 0, 0
Standard solution (without a calculator)
  1. Apply the stated rules in order.
  2. 0.5∉{1,2,3} ⇒ −9
  3. (1,3) ⇒ +1; (X,Y,M)=(1,0,0)
  4. Output sequence: −9, 3, 1, 1, 0, 0
Do it on the calculator
02

When to use it

Play repeated rounds against the calculator and keep separate win, loss and tie counts. These examples assume the stated draws solely to explain a game. Ordinary play is random and will usually show different values; these inputs do not force the illustrated secret or cards.

Input order

  • A?: 1=rock, 2=paper, 3=scissors; 0 or blank EXE quits.

Output order

  • Each round shows the computer move, then 1=win, 0=tie, −1=loss. Quitting shows wins, losses, ties, in that order. Invalid input gives −9 and consumes no move.

Conditions and limitations

  • Rock beats scissors, scissors beat paper, paper beats rock. Equal moves tie. Errors never count as losses.
  • The program sets Fix 0, overwrites its registers and Ans, then returns to Norm 1 on normal completion. AC during play may leave Fix 0. Previous values and display settings are not restored. Registers can be inspected; there is no anti-cheating protection.
  • Equal-likelihood claims assume independent equally likely Ran# grid values; no cryptographic security is claimed. When used, rejection sampling has no fixed maximum number of draws.

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.