Skip to main content

Mastermind Deduce

Crack the secret code from past guesses and peg feedback. Pure deductive reasoning, cheat-proof validation

FAQ

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.

The opposite move. Deduce works forward · given constraints, find the one answer they force. For the reverse direction · reasoning backward from evidence to its most likely cause · try Inference, the abduction counterpart to this game.

Part of the PlayMemorize family of brain-training games. Runs entirely in your browser, works offline as a Progressive Web App.

How to master

FAQ