Mastermind is a game played by two players, the codemaker and the codebreaker. The game begins with the codemaker selecting a code, a sequence of four colors (digits, pegs or other symbols) (c_{1}, c_{2}, c_{3}, c_{4}) chosen from a set of six colors (repetitions allowed). The codebreaker will then try to guess the code. After each guess (g_{1}, g_{2}, g_{3}, g_{4}), the codemaker responds with two numbers. The first, the number of exact matches, is the number of times c_{k} = g_{k} , k = 1, . , 4. The second, the number of near matches, is the number of colors in the guess which are the right color, but in the wrong position. In the applet bellow the number of exact matches is indicated by small red dots,
while white dots define the second number. In the real game the codemaker uses small pegs for the same purpose.

When you choose "Continuous response", the small pegs are displayed as soon as you complete one row of the puzzle. In the static variant, computer makes a sequence of (always the same!) moves responses to which clarify the situation completely. All you have to do is to find the right move to solve the puzzle.