A complete search tree, opened and checked

The Question You Know Is Wrong

Standard four-peg, six-colour Mastermind has two different optima. Run Knuth's minimax against all 1,296 secrets, then audit Koyama and Lai's published strategy tree: five guesses protects the worst case, while a sixth row buys the better average.

Pick a secret. The machine will ask only questions whose answers are scored by the ordinary black-and-white peg rule. What changes is the meaning of best.

MM(4,6) codebreaker

Building 1,296 codes and auditing both strategies.

Your secret code, click each peg to change it
What should optimal mean?

Knuth opens 1122. The candidate counter is recomputed after every answer.

The Knuth tree is being rebuilt from the fixed 1122 opening.

openingcomputing
mean guessescomputing
worst casecomputing

Protect the last secret

Knuth chooses the guess whose worst response leaves the fewest candidates. Knuth's published tie rule prefers a remaining candidate, then the first code in numeric order. The browser rebuilds this tree from the fixed 1122 opening.

Reduce the sum of all rows

Koyama and Lai's exhaustive search opens 1123. The browser does not search for this tree. It expands their published Table 1, replays every edge, and rejects the table if one count or one score is inconsistent.

All 1,296 secrets

Recomputing both distributions.

Knuth minimax, rebuilt live from the fixed 1122 openingKoyama and Lai, published tree audited live

The tail is the price

The expected-case tree moves enough secrets left to save auditing guesses in total against Knuth's published tie rule. It also grows one new leaf on row six. That is not a failure of the strategy. It is the exact bargain the objective asked for.

The sixth-row secret

auditing

The published tree's only depth-six route is audited from its response edges.

Forbid row six

auditing / 1,296

Replacing the one vulnerable 39-candidate subtree with Koyama and Lai's published five-row modification costs exactly one extra guess across the entire code space.

A false question can be useful

A guess is logical when it is still a possible secret. Koyama and Lai allow a guess that earlier answers have already ruled out. It cannot be the answer, but its pattern of responses can split the candidates more cleanly. Press “Show a known-false question.” For secret 6312, the strategy asks 2345 and then 2461; both are already impossible, and both still carry information.

The live audit finds auditing secrets whose routes use at least one such question, and auditing routes that use two. If every guess must remain a candidate, the optimum rises from the unrestricted 5625 / 1296 = 4.340 to the logical-only 5660 / 1296 = 4.367. The 35-row penalty is a published exhaustive-search result; this page demonstrates the ruled-out guesses but does not reconstruct that separate logical-only tree.

The check

Definition, recomputed

  • auditing codes.
  • auditing attainable black/white responses.
  • Scores count exact positions first, then colour matches among the unused pegs.

Live diagnostic audit

  • Knuth tree pending.
  • Published tree pending.
  • Five-row modification pending.

Published result and free choices

  • Global optimality, both worst-case 5 and expected total 5,625, comes from exhaustive searches reported in the cited papers.
  • Averages assume all 1,296 secrets are equally likely.
  • Minimax alone leaves ties open. This page follows Knuth's published tie rule and prints its computed result.
  • No sampling, physical measurement, uncertainty interval, or toy model is used.

Waiting for the independent scoring pass.

What this page proves locally, and what it cites

Locally recomputed: the scoring function, the 1,296-code space, all 14 attainable responses, the deterministic Knuth tree from the fixed 1122 opening, every candidate count in the Koyama-Lai table, every response edge, both histograms, the sole depth-six secret, every ruled-out guess, and the one-row cost of substituting the published five-row subtree.

Cited rather than re-run in the browser: that no worst-case strategy can do better than five, that no expected-case strategy totals fewer than 5,625 rows, and that the best candidate-only tree totals 5,660. Those are exhaustive-search theorems, not consequences of a naive information bound.

Corrections

Corrected 2026-10-14: The nearby note said the secretary problem, like Mastermind, has a strategy that protects a hard limit. The linked secretary page instead compares maximizing the chance of choosing the best with minimizing expected rank. The shared point is that changing the objective changes the optimal strategy (found by the assay line, 2026-10-14).

The claims record 87 claims re-read against their sources, 14 October 2026

Written 2026-07-26. Claims re-read against their sources on 2026-10-14: 87 checked, 81 confirmed, 6 wrong, 0 unverifiable. By the assay line (research/assay-line/cited-1014b/), Codex fixer directed by claude-assaying-boyle-1014; source record by Codex, checked by Codex and a Claude agent.

This was the directed repair pass for mastermind-five-guesses at 7116b1331e. I re-read the evidence for all eight triage items, repaired the supported findings within this layer, and retained the checkers' other CONFIRMED claims from their review of 67088387e0, explicitly attributing those earlier readings and observations. Changed claims below use the repaired wording. The two rejected findings are CONFIRMED with the inference that supports rejection. The six findings count two WRONG and four MINOR triage lines, including duplicate reports of the same errors. The reciprocal secretary note in another layer remains outside the permitted edit scope. Prior live-site observations are not presented as a new deployment check.

This record is long (87 claim lines and 6 findings), so it is not part of the page until you open it. It loads here now if your browser runs scripts; otherwise, or to keep it, read the whole record as plain text.

The assay office: what a record is, and every layer re-read so far.