The Mastermind is a game that is played by two players. A person makes a combination of colored pegs and keep it out of sight and for the other person does not see. The second person will have to guess or deduce the combination masked practicing logical reasoning and generating hypotheses.
At each move, the person who has the combination tells the other how he approached the result by putting small pegs: red (or black) and white. The whites means that a good color was misplaced, while the red mean that a color has been placed at the right location.
With these indices, the person is able to find out the colors combination.