Post Reply 
(11C) Code guessing game
04-30-2018, 07:29 PM (This post was last modified: 04-30-2018 08:05 PM by Rogier.)
Post: #14
RE: (11C) Code guessing game
I'm pretty sure my scoring isn't official Mastermind, but it's what I came up with.
The minor problem is the double scoring of digits of a correct colour AND in the right place. That could easily be solved (multiply by 10 and subtract from the total of correct digits). I just never bothered. I can live with a result "a correct, of which b in the right place".
The major problem is that I don't check whether a colour has already been tested and with what kind of result:
- not present > ignore for the rest of this turn,
- present, wrong place > ignore unless you find one in the right place, then adjust score
- present, in the right place > ignore for the rest of this turn
I don't remember why I chose this system (I didn't know all Mastermind rules? Couldn't fit in a better one?).
With it's limitations I still think it's one of my better programs and fun to play (and a challenge if you use 10 places, 9 colours, possibility of one or more colours appearing more than once).

Playing your program with a slightly different set of rules should be fun too. I'm going to give it a try.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Code guessing game - Rogier - 04-25-2018, 06:18 PM
RE: (11C) Code guessing game - Dieter - 04-26-2018, 06:57 PM
RE: (11C) Code guessing game - Rogier - 04-26-2018, 10:10 PM
RE: (11C) Code guessing game - Dieter - 04-27-2018, 06:54 AM
RE: (11C) Code guessing game - Dieter - 04-27-2018, 12:52 PM
RE: (11C) Code guessing game - Rogier - 04-28-2018, 12:24 PM
RE: (11C) Code guessing game - Dieter - 04-29-2018, 09:00 PM
RE: (11C) Code guessing game - pier4r - 04-28-2018, 07:23 PM
RE: (11C) Code guessing game - Rogier - 04-29-2018, 09:58 PM
RE: (11C) Code guessing game - Dieter - 04-30-2018, 08:11 AM
RE: (11C) Code guessing game - Rogier - 04-30-2018 07:29 PM
RE: (11C) Code guessing game - SlideRule - 07-23-2018, 03:22 PM
RE: (11C) Code guessing game - Rogier - 05-02-2018, 06:49 PM



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