Four-symbol secret code: rules and printable materials
Infer a hidden four-symbol order using exact-position and wrong-position feedback.
Suggested group
2–8
Plan for
15–25 minutes
Bring
A–F code sheet, screen and guess log
Choose a legal secret
One codemaker writes four different letters selected from A, B, C, D, E and F, in an ordered row. No letter repeats in the secret or in a guess. Hide the secret behind folded paper. The other player or team has up to eight guesses to discover the same four letters in the same order. The codemaker checks legality before taking the first guess and never changes the secret during a game.
Give two feedback numbers
For every legal guess, report how many letters are in their exact positions and how many additional letters appear in the secret but in different positions. These categories do not overlap. Do not tell which individual letters earned the feedback. Because letters do not repeat, the total number of shared letters minus the exact matches is the misplaced count. A guess earns no extra information from the codemaker’s gestures.
Worked feedback
Let the secret be A–B–C–D. Guess A–C–F–E has one exact match, A, and one misplaced match, C: record 1 exact and 1 misplaced. Guess B–C–D–A contains all four secret letters, but none is in the correct position, so record 0 exact and 4 misplaced. Guess A–B–C–D receives 4 exact and 0 misplaced and ends the game successfully.
Record and reason
Write each complete guess in its own row before feedback. The codemaker privately checks against the same secret, then says both counts clearly. If a guess repeats a letter or contains a letter outside A–F, ask for a corrected guess without consuming a row. If feedback was calculated incorrectly, correct it visibly and allow one replacement guess for any later row that relied on the mistaken information; do not silently rewrite history.
Roles, hints and ending
At four exact matches, reveal and check the secret. After eight legal guesses without success, reveal it and replay the feedback to learn from the pattern. Swap codemaker and solver so both roles get a turn. For groups up to eight, have one codemaker and a small discussion team, or use separate pairs; everyone can propose a reasoned guess. A gentle version uses only A–D, still four distinct letters, reducing the task to ordering. Announce that variant before choosing the secret. The printable sheet is a manual host tool, not an automated code checker.
Printable materials
Preview before printing at 100% scale; turn off browser headers and footers. Keep host answers separate. This is a manual tabletop kit, not computer opposition or an automatic judge.
Filter complete candidate codes after feedback
A worked deduction sheet adds two fixed feedback rows, candidate checks and one discriminating third guess. It makes exact/misplaced accounting usable rather than merely defining it. The secret and guesses still use four distinct letters from A–F, with an eight-legal-guess maximum.
Four-symbol secret code · Solver log
Use four different letters from A–F. Eight legal guesses. Exact and misplaced counts do not overlap.
Guess
Four letters
Exact
Misplaced
1
__ __ __ __
____
____
2
__ __ __ __
____
____
3
__ __ __ __
____
____
4
__ __ __ __
____
____
5
__ __ __ __
____
____
6
__ __ __ __
____
____
7
__ __ __ __
____
____
8
__ __ __ __
____
____
A
B
C
D
E
F
Codemaker sheet · hide this page
Secret (four distinct letters A–F): __ __ __ __
Shared letters minus exact matches = misplaced matches. Illegal repeated/out-of-range guesses do not consume a row.
Example secret
Guess
Exact
Misplaced
ABCD
ACFE
1
1
ABCD
BCDA
0
4
ABCD
ABCD
4
0
Optional player practice · 25 October
Guess
Exact
Misplaced
ACFE
1
1
BCDA
0
4
Find all remaining complete codes. Predict the response to ADBC for each, then ask the host for the third feedback.
Candidate
Fits row1?
Fits row2?
ADBC feedback
________
________
________
________
________
________
________
________
________
________
________
________
________
________
________
________
________
________
________
________
Practice key · keep separate
Candidate
ADBC exact
ADBC misplaced
ABCD
1
3
ADBC
4
0
ADCB
2
2
There are360 legal codes,48 after row1,3 after both rows. Host secret ABCD gives third feedback1 exact/3 misplaced, leaving only ABCD. An identity guess still uses a legal-guess row.
Reject Impossible Code Feedback Before Deducing
Set up the independent audit
Code-breaking tutorials do not all use the same rules. In this four-symbol secret-code activity, both the secret and every legal guess contain four different letters from A through F. Repeated letters are illegal. Feedback consists of two totals: exact positions and additional shared letters in different positions. It does not label individual slots. Before a solver spends another guess on a puzzling clue, the codemaker should check that the clue could occur under these rules at all.
Suppose a row says three exact and one misplaced. Three positions already match their corresponding secret letters. Only one guessed position and one secret position remain unaccounted for. If the remaining letters match, they occupy that same final position and the result is four exact. If they do not match, they contribute no additional match. There is no other unfilled position into which a misplaced match could go. The proposed three-plus-one feedback is therefore impossible. The codemaker can catch this without telling the solver which three positions were correct.
Trace the example and its failure case
For a host-only rehearsal, choose secret A–B–E–F. Guess A–B–E–C gives three exact and zero misplaced. Guess A–B–F–E gives two exact and two misplaced. Guess F–E–B–A gives zero exact and four misplaced. Guess A–B–C–D gives two exact and zero misplaced. Keep these examples hidden during a real round unless everyone is doing a separate open demonstration. They illustrate different accounting outcomes; they are not additional hints about an unrelated secret currently being played.
Any two four-letter subsets of a six-letter alphabet share at least two letters: together their sizes total eight, while their union contains at most six. Therefore, for legal no-repeat rows here, exact plus misplaced cannot be zero or one. This is specific to four distinct letters drawn from A–F. Do not carry it into a game with more available symbols, a shorter code or repeated letters. For this rule set, feedback such as zero exact and one misplaced is a warning to recheck legality and counting, not a difficult clue to solve around.
Finish, check and adapt
A–A–B–C is not a legal guess in this activity, so it receives a request for correction rather than feedback and does not consume a guess row. A legal guess with incorrectly recorded feedback is a different problem. Recalculate that row privately against the unchanged secret, show the corrected pair and follow the existing replacement-guess rule for later reasoning affected by the mistake. Do not change the secret to fit a bad clue or quietly alter a historical row after someone has used it. A visible correction preserves the discussion record.
Passing these quick checks does not guarantee that every recorded row can be true together. Two individually possible answers may contradict one another when applied to the same hidden code. After checking each row's arithmetic, compare complete candidate codes against all retained feedback, using the existing deduction exercise if helpful. Conversely, do not reject a row merely because its two feedback numbers are written beside particular slots: they remain aggregate counts, not slot labels. Keep the headings exact and misplaced clearly attached to their numbers when copying a log.
The Dagstuhl report's Mastermind discussion identifies the impossible three-exact, one-misplaced outcome in the broader four-position game. Our additional minimum-overlap check depends on this site's narrower no-repeat alphabet. Neither source nor this note makes the printable log an automated judge. Use the classroom library to choose a different task if maintaining a hidden code and a feedback ledger is too demanding for the current group; treat mistakes as things to audit, not a ranking of ability.
Code-breaking tutorials do not all use the same rules. In this four-symbol secret-code activity, both the secret and every legal guess contain four different letters from A through F. Repeated letters are illegal. Feedback consists of two totals: exact positions and additional shared letters in different positions. It does not label individual slots. Before a solver spends another guess on a puzzling clue, the codemaker should check that the clue could occur under these rules at all.
Suppose a row says three exact and one misplaced. Three positions already match their corresponding secret letters. Only one guessed position and one secret position remain unaccounted for. If the remaining letters match, they occupy that same final position and the result is four exact. If they do not match, they contribute no additional match. There is no other unfilled position into which a misplaced match could go. The proposed three-plus-one feedback is therefore impossible. The codemaker can catch this without telling the solver which three positions were correct.
Trace the example and its failure case
For a host-only rehearsal, choose secret A–B–E–F. Guess A–B–E–C gives three exact and zero misplaced. Guess A–B–F–E gives two exact and two misplaced. Guess F–E–B–A gives zero exact and four misplaced. Guess A–B–C–D gives two exact and zero misplaced. Keep these examples hidden during a real round unless everyone is doing a separate open demonstration. They illustrate different accounting outcomes; they are not additional hints about an unrelated secret currently being played.
Any two four-letter subsets of a six-letter alphabet share at least two letters: together their sizes total eight, while their union contains at most six. Therefore, for legal no-repeat rows here, exact plus misplaced cannot be zero or one. This is specific to four distinct letters drawn from A–F. Do not carry it into a game with more available symbols, a shorter code or repeated letters. For this rule set, feedback such as zero exact and one misplaced is a warning to recheck legality and counting, not a difficult clue to solve around.
Finish, check and adapt
A–A–B–C is not a legal guess in this activity, so it receives a request for correction rather than feedback and does not consume a guess row. A legal guess with incorrectly recorded feedback is a different problem. Recalculate that row privately against the unchanged secret, show the corrected pair and follow the existing replacement-guess rule for later reasoning affected by the mistake. Do not change the secret to fit a bad clue or quietly alter a historical row after someone has used it. A visible correction preserves the discussion record.
Passing these quick checks does not guarantee that every recorded row can be true together. Two individually possible answers may contradict one another when applied to the same hidden code. After checking each row's arithmetic, compare complete candidate codes against all retained feedback, using the existing deduction exercise if helpful. Conversely, do not reject a row merely because its two feedback numbers are written beside particular slots: they remain aggregate counts, not slot labels. Keep the headings exact and misplaced clearly attached to their numbers when copying a log.
The Dagstuhl report's Mastermind discussion identifies the impossible three-exact, one-misplaced outcome in the broader four-position game. Our additional minimum-overlap check depends on this site's narrower no-repeat alphabet. Neither source nor this note makes the printable log an automated judge. Use the classroom library to choose a different task if maintaining a hidden code and a feedback ledger is too demanding for the current group; treat mistakes as things to audit, not a ranking of ability.