Mastermindlogician series
(For those who don’t know) Mastermind is a game for two players: the setter and the solver.
The setter chooses a sequence of four colours (possibly with repetition) from the set {red, orange, yellow, green, blue, violet}.
At each stage of the game, the solver suggests a similar sequence of four colours (again, repetitions are allowed). Each position p (1 to 4) scores:
| BLACK | if the colour in position p of the setter’s sequence is the same as that in position p of the solver’s. |
| WHITE | if the colour in position p of the solver’s sequence occurs in the setter’s sequence but not in position p. |
| ZERO | otherwise. |
The numbers of black and white scores for the current suggested sequence is communicated to the solver, and are remembered from each stage to the later ones.
The game ends when the solver produces the same sequence as the setter.
The present challenge is to encode the rules of the game in such a way that when clauses are added representing the solver’s sequences so far in a game of Mastermind and their scores, the solver outputs up to 3 suggestions for the next sequence. Each suggestion should be consistent with all the information given so far, together with the supposition that it is going to score four blacks.
Each suggestion will be a separate solution (“model”) of the clauses in your encoding.
Solver
Auto Parser Results
No errors found.