Post Reply 
(11C) Calculator Random Guess with Hi-Lo Game
09-17-2023, 11:00 AM (This post was last modified: 09-17-2023 12:26 PM by Gamo.)
Post: #1
(11C) Calculator Random Guess with Hi-Lo Game
This program I try to let the HP-11C make random guesses between 0 - 99

Calculator play by it own to try to find that hidden number.

First I let it start in the middle at 50 and keep guessing from lower or higher

from that mid point. Program is not perfect yet just the start to get the idea

on how to program to make a segment guess for the update version in the future.

------------------------------------------------------------------------

To Run: [FIX] 0
First Clear Statistic Register [f] Σ and Clear all Register [f] REG

[f] A display shown 50 and briefly display either 1 for High and -1 for Low

Calculator will keep guessing until it get it right then display "Number of try"

[X<>Y] display the hidden number

[R/S] Continue new game and this time no need to Clear Statistic and Storage Register again.

----------------------------------------------------------------------
Quote:LBL A
RAN# EEX 2 x INT STO 6
50 STO 7
LBL 0
Σ+ CLx RCL 6 RCL 7 PSE
X=Y GTO 2 X>Y GTO 1
1 CHS PSE
RAN# 50 x 50 + INT STO 7 GTO 0
LBL 1
1 PSE RAN# 50 x INT STO 7 GTO 0
LBL 2
RCL 7 RCL 0 R/S
[f] Σ GTO A

Remark: The best number of try so far is 8 times to guess. The worst is about 200+ times.

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 




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