How To Play

How to play Mastermind: rules & feedback pegs

The goal is simple: crack the hidden color code within a limited number of guesses. After each guess, feedback pegs tell you how close you are — read them well and you'll close in fast.

How does Mastermind work?

Every game hides a code of 4 or 5 color slots. You submit a guess from the color pool, and the game replies with clues — it never points at a specific slot.

The goal is simple: guess every slot correctly before you run out of turns. The real skill is using each round of feedback to rule out wrong colors, confirm the right ones, and then fix their order.

Mastermind rewards deduction, process of elimination, and a little patience — the same muscles as a good logic puzzle.

What do the feedback pegs mean?

Crucially, pegs are counts, not positions. Two green pegs mean two of your colors are exactly right — but not which two. That "total information, not a slot-by-slot hint" is the heart of Mastermind, and what makes each guess a small deduction.

One round of reasoning

  1. Open with a spread of different colors to quickly learn which ones exist at all.
  2. Get a green peg? Try to keep that color where it is. Get an orange peg? Keep the color but move it.
  3. Lots of empty pegs? Drop those colors next round and reuse the ones you've confirmed.

A reliable habit: settle which colors are in the code before you fuss over their exact order. Nailing the set first, then the arrangement, usually beats shuffling positions from move one.

How do you win in fewer guesses?

Good players treat every guess as a question that splits the remaining possibilities roughly in half. Early on, favor guesses that test many new colors at once — you learn more from a guess that could be wrong in interesting ways than from a "safe" one.

Once you've confirmed the color set, stop introducing new colors and spend your guesses purely on order. And read empty pegs as hard facts: a color ruled out never comes back, so never waste a later guess on it.

How do the rules change across modes?

Solo and the Daily Challenge use no repeated colors. Duplicates mode lets the same color appear more than once, which removes a shortcut and makes deduction harder. Two-Player lets one person set a code and the other crack it.

For the full breakdown of colors, slots, and guess limits per difficulty, see the modes page.

Frequently asked questions

What is Mastermind?

A code-breaking puzzle: deduce a hidden sequence of colors from the feedback you get after each guess.

How is the Daily Challenge different from normal play?

The Daily Challenge gives everyone the same puzzle each day and tracks your daily streak. Normal modes are better for practice, chasing a best score, or playing a friend.

Does sharing my result spoil the answer?

No. A shared result shows only your feedback progress — never the answer colors. A two-player code lives in the link or your local browser.

Ready to play?

If the rules make sense, jump straight in — or browse how the modes differ in pace and difficulty first.