Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Code breaker

Crack the secret code: guess a row of numbered colours and use the clues (right place, wrong place) to find it in as few tries as you can.

Secret code

    How to play

    1. The computer hides a code: a row of symbols, each a numbered colour with its own shape.
    2. Build a guess by pressing symbols (or number keys), then press Guess (or Enter).
    3. Each guess gets clues: ✔ for every symbol in exactly the right place, and ↔ for every right symbol in the wrong place. Clues never say which ones.
    4. Use the clues to narrow it down and crack the code before you run out of tries.
    5. Share the game number with a friend: the same number and settings give the same code.

    Keyboard and touch

    1 to 8Add that symbol to your guess
    BackspaceRemove the last symbol
    EnterMake the guess
    Tap a symbolAdd it; tap Remove to take one back

    Tips

    • A good first guess with 4 pegs and 6 symbols uses two pairs, like 1 1 2 2: it tests two symbols at once.
    • Watch the count of codes that still fit: a guess that cuts it down most is usually the best next guess, even if it cannot be the answer.
    • Every 4-peg, 6-symbol code can be cracked in at most 5 guesses with perfect play (Donald Knuth showed this in 1977).
    • The Hint fills in a code that fits all clues so far, a safe but not always clever choice.
    • Turn repeats off for an easier start, or use 6 pegs and 8 symbols for a real challenge.

    About this game

    Code breaker is a guessing game of logic in the tradition of the old pencil game bulls and cows. Clues follow the usual rule: first count symbols in the exact place, then, among the rest, count symbols that appear in both the guess and the code (each symbol counted as often as it appears in both). The count of possible codes checks every code of the chosen size against all your clues. New games get a random number; the code comes from that number and the settings, so it can be replayed. Everything runs in your browser.

    See you tomorrow!

    A fresh daily puzzle every morning, and new tools added every month.

    Browse every product