Mastermind Deduce
Crack the code from past guesses and peg feedback.
About PlayMemorize Mastermind Deduce
PlayMemorize Mastermind Deduce is a code-breaking deduction trainer based on the 1970s board game Mastermind. Every round shows a history of past guesses and their black/white peg feedback. Exactly one candidate code (out of the no-repeat space of 6 colours × 4 pegs = 360 codes) survives the feedback · pick it and your streak grows.
What the pegs mean. A black peg means a peg in your guess is the right colour AND the right position · a perfect match in both axes. A white peg means the colour is right but the position is wrong. The order of the pegs in the feedback does NOT map to the positions of the guess · "two black, one white" means somewhere in your guess there are two perfect matches and one out-of-position match, but you don't know which positions are which. That ambiguity is what makes the game hard.
Cheat-proof validation. A pure verifyFinalDeduction function replays the entire history against the full no-repeat permutation space (6 colours, 4 pegs, no duplicates · 6P4 = 360 codes). If your chosen code is the unique survivor · the only code consistent with every row of feedback · the answer is correct. The validator is the sole oracle, so the only way to win is to actually deduce.
Pure deduction, no luck. The generator only adds history rows that actually prune the candidate space, so you never see redundant information · every row narrows the possibilities. Every round is a real reasoning problem with a provable unique answer. The classic algorithm for solving Mastermind in the fewest guesses · Donald Knuth's minimax strategy from 1976 · guarantees a solve in at most 5 turns; in Deduce mode you're not playing the game, you're solving its final position, which is purely logical.
Part of the PlayMemorize family of brain-training games. Runs entirely in your browser, works offline as a Progressive Web App.
FAQ
Q: What is Mastermind Deduce?
A free code-breaking deduction game. Each round shows a history of past guesses and their black/white peg feedback. Exactly one candidate code is consistent with every row · pick it to build a streak. Miss once and the run ends.
Q: How is the answer validated?
A pure function called verifyFinalDeduction replays the entire history against the full no-repeat permutation space (6 colours, 4 pegs, no duplicates · 6P4 = 360 codes). If your chosen code is the unique survivor · the only code consistent with every row of feedback · the answer is correct.
Q: What do the black and white pegs mean?
Standard Mastermind rules. A black peg means a peg in your guess is the right colour and the right position. A white peg means a peg is the right colour but the wrong position. The order of the pegs in the feedback does not map to the positions of the guess.
Q: Is every round solvable by pure deduction?
Yes · the generator only keeps history rows that actually prune the candidate space, so the puzzle always narrows to exactly one survivor. No guessing required.
Q: How does my progress save?
Your high streak is stored locally in your browser.