wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> Mastermind I/II Solutions?
(Message started by: dbaker84 on Feb 23rd, 2006, 12:15am)

Title: Mastermind I/II Solutions?
Post by dbaker84 on Feb 23rd, 2006, 12:15am
Can someone post the solutions to these so I can verify if I did them correctly?

Title: Re: Mastermind I/II Solutions?
Post by Barukh on Feb 23rd, 2006, 1:45am
Maybe, you can post your solutions so we can verify if you did them correctly?

Title: Re: Mastermind I/II Solutions?
Post by towr on Feb 23rd, 2006, 2:28am
I: [hide]Green, Red, Light Blue, Brown[/hide]
II: [hide]Yellow, Yellow, Yellow, Light Blue[/hide]

Title: Re: Mastermind I/II Solutions?
Post by dbaker84 on Feb 23rd, 2006, 2:29am
thanks.

Title: Re: Mastermind I/II Solutions?
Post by japnik on Aug 24th, 2011, 4:47am
first lets see which colors are there in answer

from guess2 :- lightblue and green must be there
from guess1 :-one of light-blue and dark blue, but we already got light blue from guess2
from guess3:-one from dark blue and brown, it must be brown as its not dark blue ( by guess1)
from guess 4 :- one from dark-blue and red, which is red by same reasoning

so colors are green red brown light blue


for ordering
see guess 1 , it gives correct place of three of them, automatically giving correct place for fourth one also

so ans is Green red light blue brown

Title: Re: Mastermind I/II Solutions?
Post by japnik on Aug 24th, 2011, 12:35pm
i assumed all colors shud be diff

Title: Re: Mastermind I/II Solutions?
Post by c on Mar 24th, 2012, 1:48pm
Yes, japnik, i also am much more familiar with the simplified version of only different colour pegs.

However, my reasoning uses another direction, based on comparing guesses instead of left-out colours. For example, considering Mastermind I:
* the effect of changing from guess 1 to guess 2 is the loss of one information result-peg, which is triggerred by changing from green to dark blue. Therefore, green generates a peg and is in the "target" combo, while dark blue doesn't and isn't.
* similarly, for guess 1 to guess 2, a black result-peg changed into a white one, triggerred by changing from brown to light-blue. In such cases though, the other guess-pegs usually change position, so the conclusion would've been that brown is "similar" to light-blue (either both are in the target, or both aren't), but in this case the conclusion is that both are "in".
* guess 4 establishes which of the red and yellow is to be replaced by the light-blue. So the solution is indeed:
[hide]green, red, light blue, brown[/hide].

As for the Repeating Colours case (Mastermind II), i always found it tricky to nail the specific rules used, especially when they're not stated before-hand. Do the black answer-pegs get decided first, or do guess-pegs get considered left-to-right instead? Does guessing one green peg while the target has three generate one or three answer-pegs? Does guessing three yellows while the target has only one generate one or three?
* So could the fact that one red being replaced by a yellow generated an increase in the answer-pegs conceivably mean that there might be one red and two yellow in the target combo? Granted, this turns out not to be the case here, but still... I maintain it's a (much) harder type of "riddle" than the other one.

Title: Re: Mastermind I/II Solutions?
Post by rmsgrey on Mar 26th, 2012, 6:02am

on 03/24/12 at 13:48:43, c wrote:
As for the Repeating Colours case (Mastermind II), i always found it tricky to nail the specific rules used, especially when they're not stated before-hand. Do the black answer-pegs get decided first, or do guess-pegs get considered left-to-right instead? Does guessing one green peg while the target has three generate one or three answer-pegs? Does guessing three yellows while the target has only one generate one or three?
* So could the fact that one red being replaced by a yellow generated an increase in the answer-pegs conceivably mean that there might be one red and two yellow in the target combo? Granted, this turns out not to be the case here, but still... I maintain it's a (much) harder type of "riddle" than the other one.

I've only ever seen it done by establishing the bijection between guess and answer rows that maximises the number of black pegs, and the total number of pegs, in the response.

One way of looking at it is that the black pegs are the number of exact matches between the target and query strings, while the white pegs are the maximum number of additional matches that could be generated by any single permutation of the query string.

Title: Re: Mastermind I/II Solutions?
Post by Grimbal on Mar 26th, 2012, 10:03am
I agree with rmsgrey.

I prefer to consider the total number of answer-pegs.  The total of blak and white is the number of pegs that are correct regardless of order.  If  you swap one red for one yellow and the total number of answer-pegs increases, then you know the red is wrong and the yellow is correct.  I.e. there were too many reds and too few yellows in the first try.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board