(11C) Code guessing game
|
07-23-2018, 01:14 AM
Post: #16
|
|||
|
|||
RE: (11C) Code guessing game
This program is based on Donald Knuth's paper The Computer as Master Mind.
It works only with 4 digits and the 6 colours 0-5. The following formula to count the total number of misses is used: \[ \max(n_1-n_1', 0)+\max(n_2-n_2', 0)+\ldots+\max(n_6-n_6', 0) \] From this value the number of "black hits" is subtracted to get the number of "white hits". Usage Generate Code [B] Check Test Pattern 1 ENTER 2 ENTER 3 ENTER 4 [A] Result 1.2 Code: LBL A Well, not half as fancy as Dieter's solution but maybe you find the approach still interesting. (04-28-2018 07:23 PM)pier4r Wrote: Did anyone create some "computer opponent" on calculators for the game? So an heuristic search for solutions. Not sure if that's what you are looking for but in the linked paper Donald Knuth proves that the codebreaker can always succeed in five moves or less. Cheers Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)