Skip to content
RuleShelfGames

Game rules

Bulls and Cows Rules


Bulls and Cows needs nothing but paper, a pencil, and two people willing to think a few steps ahead — one player picks a secret number, the other tries to deduce it purely from feedback, and the entire game is a small, self-contained logic puzzle rather than a contest of luck.

Setting the secret

One player, the codemaker, privately writes down a secret number of an agreed length — four digits is the standard, though some tables play three or five for a shorter or longer game — using digits 0 through 9 with no digit repeated. That no-repeat rule is essential to how the feedback works cleanly; without it, the "cows" count below becomes ambiguous.

Guessing and scoring the feedback

The other player, the codebreaker, guesses a number of the same length. The codemaker responds with two counts, never revealing which specific digits they refer to:

  • Bulls: how many digits in the guess are the correct digit in the correct position.
  • Cows: how many digits in the guess exist somewhere in the secret number, but in the wrong position.

A guess that's entirely correct scores all bulls and no cows, which ends the round. Otherwise, the codebreaker uses that feedback to refine their next guess, and play continues, round after round, until the secret number is fully deduced.

Winning, and counting the guesses it took

There's no fixed win condition beyond eventually solving it — most tables track how many guesses it took the codebreaker to crack the code, comparing that count if players take turns being codemaker across several rounds. A well-played four-digit game is typically solvable in well under ten guesses by a codebreaker using genuine logical elimination rather than random guessing.

Strategy: what a good opening guess actually does

A strong first guess deliberately uses several different digits to maximize the information the feedback returns, rather than trying to guess the actual answer outright — a first guess like "0123" tells you far more about which digits are even present in the secret number than a guess chosen to "feel likely." From there, systematically testing which digits belong and narrowing their positions with each subsequent guess is the entire skill of the game; strong players track candidate numbers explicitly, eliminating any candidate that couldn't produce the bulls-and-cows count just returned.

Bulls and Cows as a word game

A well-known variant swaps digits for letters and words: the codemaker picks a secret word with no repeated letters, and the codebreaker guesses whole words of the same length, scoring bulls for letters in the correct position and cows for correct letters in the wrong position. This version is sometimes called "Jotto," and it demands genuine vocabulary alongside the same positional logic the number version uses.

Origins: an old pen-and-paper puzzle with no fixed inventor

Bulls and Cows has no single documented inventor or publication date — it's a genuine folk puzzle, played with pencil and paper for generations before any commercial version existed, and its exact origin is untraceable the way a lot of simple logic games are. Its real historical significance is what it led to: in 1970, Mordecai Meirowitz adapted the same bulls-and-cows feedback mechanic into a physical peg-and-board game, licensed and released as Mastermind, which became one of the best-selling puzzle games of the decade and is the version most people encounter first today, even though the underlying logic is identical to the much older paper game.

The arguments this game actually produces

New players trip most often over whether a digit that appears in the guess but not in the secret number at all should be reported as anything — it shouldn't; a digit is simply absent from both the bulls and cows counts if it doesn't appear anywhere in the secret number. The second is whether the codemaker is required to keep their secret number fixed for the entire round rather than changing it partway through if the codebreaker seems to be closing in — the number must stay fixed once chosen; changing it mid-round to dodge a correct guess is the one real way to actually cheat at this game, since there's no other hidden information for either player to manipulate.

Questions that come up mid-round

Can the codebreaker guess a number with repeated digits, even though the secret can't have any? Yes — the no-repeat rule applies only to the secret number the codemaker chooses; a guess with a repeated digit is legal, though it generally wastes information since it can't test two different candidate digits in the same guess.

Is there a maximum number of guesses allowed before the round ends in a loss? Not by default — the round simply continues until the codebreaker solves it, though some groups agree on a guess limit in advance (commonly ten) purely to keep a session moving if a round is dragging.