[del]Green Blue Yellow Red[/del]
Yellow Blue Green Red
OO
NB - The first two guesses and responses established that there was no yellow in the code. See above.
History:
BBBB X
BYYY O
RBRB XO
YBGR OO
White Red White Blue
OOOO
BBBB X
BYYY O
RBRB XO
YBGR OO
WRWB OOOO
That gives it away.
Rwbw
Of course. Someone else’s turn now.
okay - I have one
Red Green Yellow Blue
Interesting approach.
Well, I’ve played this game a few times… In my view an initial guess like mine does a better job of dividing the solution space up evenly. Four of one colour is something I’d never do: it tells you nothing about the other colours, and nothing about the position of the colour you have chosen. I’d normally expect to crack the code in four or five guesses with six colours and four places; sometimes I’d blow into a sixth guess but I’d think I’d done badly.
Yeah; a guess like WWWW tells you exactly how many white pegs are in the answer, but only that. Your guess finds out that same information, and more.
That’s why I said it was interesting.
When my brother and I played, the initial guess was something like BBBG. But we got the rules wrong; I’m still figuring out the strategy for when it’s played correctly.
0***
(do I have the key correctly? “0” means no match at all and “*” means right color, wrong space)
Actually, no. Idle Thoughts used one system (* and -) and Malacandra used another (X and O). A color with no match has no symbol. I find Mal’s a little easier to follow.
Notice that the symbols are not in the same order as the colors in the guess. So when you said:
RGYB 0***
did you put them in that order meaning that “red is totally wrong; green is the right color, but not in the right place, etc.”? That’s not right. Part of the challenge is matching the facts in the hint to the colors in the guess.
ok - I will revise it to match Mal’s -also as in the board game, the responses do ***not * ** correspond to the color guesses
therefore
R-G-Y-B
000
RGYB OOO
White Red Green Yellow
(I think Malacandra’s opening move may not be as straightforward as I originally thought.)
Well you’ve done what I would have done, more or less: keep three colours the same and change the fourth, while changing the positions of all the ones you kept (as none was in the right position before). Among other implications, if you now get three marks again (e.g. XOO) you know that either:[ul]both the colour you dropped and the colour that replaced it are in the code, or[li]neither is.[/ul] Similarly if you get one fewer mark (e.g. XX) you know that the colour you dropped is in the code and the colour that replaced it is not.[/li]
One reason why making your opening move monocoloured is that you can only get five different scores: zero to four Xs, in my nomenclature. Clearly that doesn’t divide the solution set up as small or as evenly as a move that allows you to be awarded a much greater variety of marks (nothing, O, X, OX, OO, XX and so on). What’s more, out of 625 possible codes, 256 will give you nothing and 256 will give you a single X - in other words, about five-sixths of the time you still have nearly half of the possible codes to eliminate.
I normally figure that each turn should eliminate about five-sixths of the possible codes and playing against a computer that set each code randomly, I found the “mixed opening line” strategy usually achieved this.
:smack: silly me - I wrote down my pattern at work - and left it there - I hope you can wait til tomorrow
Some more strategy pointers while we’re waiting:
As noted above, beginning with four of the same colour restricts the possible responses to five: - (i.e. nothing), X, XX, XXX or XXXX. Beginning with a more polychromatic guess allows the full range of responses, of which there are fourteen: zero to four Xs, and zero to (4-x) Os, except that XXXO is not a valid response (you can’t have three direct hits and the fourth being the right colour in the wrong place). This wider range of possible responses obviously means that there are fewer codes for each possible response, so in general you’re left with less to shuffle through on your way to a solution. Of course the distribution among the fourteen codes isn’t even: an XXXX is a direct hit, a - (in the present set-up) means the actual code is four of the only one you didn’t pick. But in general it’s more even.
The variant I’m used to (standard four-hole Mastermind) has six colours and so 6^4 (1296) possible codes, although I used to like Super Mastermind (five holes, eight colours; 8^5 (32,768) codes) and once wrote a computer program that set six-hole, ten-colour codes. A little surprisingly, the difficulty does not increase exponentially - it takes concentration to process all the information, but it doesn’t take many more guesses to crack the code.
My typical strategy with six colours, four holes, is to open ABCD and, on receiving the likeliest response (OO or XO) to follow up with, say, ACEF. The likeliest response is again OO or XO and that tells me that the code consists of exactly one of each of the pairs {AC}, {BD} and {EF}, one of them being repeated. So I start perming these and seeing how they work out. In principle there are a lot of combinations still but in practice the Xs and Os themselves give more information that eliminate some of these: if a previous line has one X then the guess must include one exact match, and so on. I rate a code like this as a par five, with about as much expectation of shooting over or under par as you would have in golf. A Super Mastermind code is a par six and a “Mega” Mastermind code is a par seven.
A solver program that I wrote just generated the list of all possible codes and picked one. It got the response from the player, then matched each code on the list versus the guess and calculated what response the guess would have attracted had the code on the list been the actual code. Any non-matches were dropped from the list, and the program then picked a random one from the reduced list. It did about as well as I did, or marginally better.
In case it’s not yet obvious, scoring is a two-pass process:
Check elements 1 to 4 of the guess against the corresponding elements of the code. For every match, award an X (in the original game, a black peg) and flag the matching elements as “already scored”.
Check each unscored element of the guess against all unscored and non-corresponding elements of the code. For every match, award an O (in the original game, a white peg, but white is a playable colour in this thread) and flag the matching elements as “already scored”.
So comparing a secret code of R-W-R-B against a guess of R-B-B-G:
First pass: Red in element 1 of the guess matches red in element 1 of the code. Award an X and flag the elements.
Second pass: code [del]R[/del]-W-R-B against guess [del]R[/del]-B-B-G:
First element of the guess is already scored. So it doesn’t matter that it matches the red in element 3 of the code.
Second element of the guess matches the fourth element of the code. Award an O and flag the elements:
code [del]R[/del]-W-R-[del]B[/del] against guess [del]R[/del]-[del]B[/del]-B-G
Third element of the guess no longer matches anything. Nor does the fourth. So the score is XO - one exact match, one inexact.
White Red Green Yellow
XX