[net.math] Some of my own comments on MASTERMIND

osman@sprite.DEC (Eric Osman, dtn 283-7484) (03/06/85)

Thanks, JIM DAVIS, for your input on MASTERMIND.  I also wrote a program
a number of years ago on TOPS20 (in MACRO) that played the game.

I don't recall if the program ever needed 6 moves or not.  However, my program
did NOT require that the guessed move necessarily be a possible answer.
It merely attempted to make the guess that most reduced the set of possible
answers.

The program was rather interesting.  It and the human player thought of
secret colors and took turns guessing each other's, with the winner being
the one that guessed first.  The program typically took a minute or so
during the "middle" game to make its move.  But what it did is use a subfork
to do the computing so that it could respond to the human's guess at the
same time.

At the time I was working on the program, John Francis wrote a program
whose output looked like this:

       0b0w 0b1w 0b2w 0b3w 0b4w 1b0w 1b1w 1b2w 1b3w 2b0w 2b1w 2b2w  3b0w

1)1123  46   79   80  . . .
2)1234  57   46   46 . . .
. . .

The line labeled "1)" means that you should first guess 1123.  The "79"
under "0b1w" means that if the person tells you "0 blacks 1 white", which
in Mastermind means "NO exact matches but ONE correct color in wrong spot",
then go to line "79)" to see what to guess next !

So his table dictated EXACTLY how to play the best game.  I don't know
how he programmed it, perhaps John you can tell us, or perhaps someone
can tell John I've mentioned him here !

Some questions I never answered (any takers?):

1)	What are some example games in which it IS better to make a
	wrong guess, i.e. where a wrong guess eliminates more possibilities
	than any right guess ?

2)	My program made the single move that reduced the possibilities the
	most.  Perhaps a DIFFERENT move would allow the SUBSEQUENT move
	to result in more possibilities being eliminated by the two moves
	than any second move that follows the original single move.  In
	other words, can we do better with 2-level lookahead in Mastermind ?