Mastermind
Crack the secret color code using logic and deduction. Feedback pegs guide your next guess.
How to Play
Fill the guess slots with colors, then submit. Black peg = right color & position. White peg = right color, wrong position. Four difficulties (6 to 10 colors). Hints reveal a position or a color; using one disqualifies best record. Timed mode: 30s per move, auto-submit on timeout.
Objective
Deduce the hidden color code within the limited number of guesses. Each guess earns feedback: black pegs for exact matches (right color, right position) and white pegs for partial matches (right color, wrong position).
Controls
• Click a palette color to fill the next slot • Click a filled slot to remove that peg • Submit when all slots are filled • Black peg: correct color in correct position • White peg: correct color, wrong position • Easy: 4 pegs, 6 colors, duplicates, 10 guesses, 2 hints • Medium: 4 pegs, 8 colors, duplicates, 8 guesses, 1 hint • Hard: 5 pegs, 8 colors, duplicates, 7 guesses, 1 hint • Expert: 5 pegs, 10 colors, duplicates, 6 guesses, 1 hint • Classic mode: standard rules • No-duplicate mode: secret has no duplicate colors (easier) • Timed mode: 30s per move, auto-submit on timeout • Hints: position hint reveals a correct color and locks that slot; color hint tells if a color is in the code. Using a hint disqualifies the game from best record • Streaks and stats are tracked per difficulty + mode • Shortcuts: U undo / H hint / Enter submit / R new game
Tips & Strategy
• Start with a guess of all-different colors to narrow down possibilities • Elimination: if a color earns no pegs, it's not in the code • Watch peg counts: 2 reds earning 1 peg means at most 1 red in the code • Duplicates are harder — test the same color in multiple positions • In no-duplicate mode, used colors won't recur, so safely rule them out • Track deductions on paper for hard/expert modes • Use a hint when stuck, but it costs the best record