(17BII) Mastermind
|
04-30-2020, 08:45 PM
(This post was last modified: 04-30-2020 08:51 PM by Nihotte(lma).)
Post: #1
|
|||
|
|||
(17BII) Mastermind
This time, it's a function for the HP17BII to search Mastermind code
I think my formula needs to be modify to run on the HP17BII+ because i use some multiply by 0 But it could run on HP27S too The formula is close to the mechanism in use for the program running on the 12C You should see the 3 steps : 1) generates the code to break (MIND) when N is 0 2) search for black positions between MIND and N (the user attempt) and prepares the white step 3) search for white positions among the remaining non black positions There is the code : Code:
Example of use : [CALC] → [EVAL] [ N ] [ NIVO ] [ RAN# ] [ MIND ] [ NB ] DSP [ FIX ] 2 INPUT ,123456789 [RAN#] 5 [NIVO] 0 [N] [EVAL] → EVAL=0,00 12399 [N] [EVAL] → EVAL=12399,05 : 0 black position but 5 white positions 99321 [N] [EVAL] → EVAL=99321,32 : 3 black positions and 2 white positions 93921 [N] [EVAL] → EVAL=93921,50 : all 5 positions found RCL [NB] → NB=3,00 after 3 attempts 0 [N] [EVAL] → EVAL=0,00 xxxxx [N] [EVAL] and so on |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(17BII) Mastermind - Nihotte(lma) - 04-30-2020 08:45 PM
RE: (17BII) Mastermind - pinkman - 04-30-2020, 10:08 PM
RE: (17BII) Mastermind - Nihotte(lma) - 05-01-2020, 07:34 AM
|
User(s) browsing this thread: 1 Guest(s)