The Basic Deduction Problem

An exploration into the fundamental mechanics of code-breaking puzzles

Prototyped with Gemini

Behind games like Mastermind, Wordle, Minesweeper, and Guess Who? lies a single, elegant mathematical structure. This demo strips away all visual themes to expose the raw engine of binary deduction.

Imagine cracking a secret code made entirely of 1s and 0s.

When you guess, the system won't tell you which numbers are right. It only gives you a score showing how many numbers are in the correct spot. Your goal is to deduce the secret code in as few tries as possible.

Example Walkthrough

Let's say the code is 3 digits long, and the secret target is 000.

Notice the pattern: every time you change a '0' to a '1', your score drops. That proves every single '1' is a mistake. The only logical answer is that the code is all zeros. You guess 000, receive a 3/3 match, and solve the puzzle!

Interactive Simulator

Grab a pen and paper. Use logic to eliminate possibilities in as few moves as possible.

Related Concepts & Further Reading