Mastermind or Master Mind is a code-breaking game for one or two players. A secret code is given by computer or one player, and you must figure it out using guesses.
One player secretly puts four colored pegs in the spaces behind a screen at once end of the game board(Duplicates and blanks are allowed). The other player, the code breaker, makes a series of guesses. After each guess, the code maker uses smaller pegs to tell the code breaker if their guessed pegs are the right color and in the right place, are the right color but the wrong place. The code breaker makes another guess in the next row, building upon information from previous guesses, trying to match the pegs the code maker hide at the beginning of the game.