Go back to previous page
Forum URL: http://www.cut-the-knot.org/cgi-bin/dcforum/forumctk.cgi
Forum Name: This and that
Topic ID: 139
Message ID: 1
#1, RE: Mastermind - Maximum number of trials
Posted by alexb on Aug-07-01 at 10:23 AM
In response to message #0
>I'm programming a MasterMind game and
>I'm stuck on how to
>assign the maximum number of
>tries that should be permitted.
>I read in this web
>page that, for the 4
>balls and 6 colors variant
>(the normal one), a solution
>is guaranteed (by an algorithm)
>in 5 tries or less.

This is exactly as much as I know.

>My question is:
>
>1) Not everyone knows the algorithm
>nor can deduce it that
>fast; which number of maximum
>tries would be decent to
>permit?

Well, this is a matter of design. You may probably have several difficulty levels with progressivlely fewer guesses alowed.

>2) How about the r^n variation,
>where n is number of
>balls and r is number
>of colors? Is there a
>way to determine a "decent"
>number of trials permitted?

I've no notion. Perhaps you can use a scroll window.