Post Reply 
(17B) Fifty Game
07-14-2014, 12:17 AM (This post was last modified: 06-15-2017 01:18 PM by Gene.)
Post: #1
(17B) Fifty Game
This game is a takeoff on the game of NIM. You are playing against the calculator. You go first, selecting a number from 1 to 6. Then the calculator selects a number from 1 to 6. The running total is maintained and can be checked via RCL SCORE. If you are able to reach the score of exactly 50 on your turn, you win and the calculator beeps its congratulations. Conversely, if the calculator is able to reach the score of exactly 50 on its turn, you lose and the display says COMP=3507. Turn the calculator upside down and observe that you LOSE.

Playing the game:
  1. Press INIT to reset the score to 0.
  2. Enter your guess (1-6) and press ME.
  3. Press COMP and the calculator makes its guess.
  4. Optionally, press RCL SCORE to see the current running score.
  5. Repeat steps 2 and 3 until either you or the calculator wins.
  6. If the calculator beeps, you won, congratulations (ignore the SOLUTION NOT FOUND message).
  7. If the response is COMP=3507, you lost.


There is a strategy for winning the game every time (since you go first). See if you can figure it out. If you make a mistake, the calculator will win. Every time.

Below is the 17b solver code. The game also works on the 17bii, 19b, 19bii, and 27s (although the 19b, 19bii, and 27s have a random number function that could make the code simpler).

In the code, X means multiply. 0X means zero times.






Find all posts by this user
Quote this message in a reply
07-14-2014, 05:58 AM
Post: #2
RE: (HP-17B) Fifty Game
The zip-file contains a state-file for Emu42.

Attached File(s)
.zip (Size: 2.72 KB / Downloads: 6)
Find all posts by this user
Quote this message in a reply
Post Reply 

User(s) browsing this thread: 1 Guest(s)