How many tries would it take to guess three different digits a friend has picked in their head? Guessing digits at random and narrowing them down one clue at a time by logic lead to completely different results. Number baseball (known abroad as Bulls and Cows) turns this exact process of deduction into a game.

Here's the rule. The other player (or the computer) picks a secret number made of all-different digits. When you say a guess, you're told how many digits are both correct and in the right position — that's a strike — and how many are correct digits in the wrong position — that's a ball. For example, if the secret number is [3, 7, 2] and you guess [3, 2, 7], the 3 is in the right position (1 strike), while 2 and 7 are the right digits but in the wrong positions (2 balls).

Secret number 3 7 2 My guess 3 2 7 1 strike 2 balls
Right digit in the right spot is a strike; right digit in the wrong spot is a ball

Where real skill separates people in this game is the ability to record and combine clues. For example, if your first guess of [1,2,3] comes back 1 strike, 2 balls, that means all three digits are somewhere in the secret number. Then, on your second try, just swap around the arrangement and watch whether the strike count goes up — that lets you nail down which digit belongs in which position, one at a time. This way of narrowing the range of possible answers by piling up several pieces of information at once is called logical elimination.

Interestingly, there's a mathematically optimal strategy for this game. A field called information theory studies "how many possibilities a single question can rule out," and a well-chosen first guess narrows down the answer far faster than a poorly chosen one. Computer scientists actually apply a similar principle to "binary search," a technique used for hunting down bugs in software.

This game is played with numbers, but the real point isn't calculation — it's the ability to form and test a hypothesis. Forming a hypothesis like "this digit is probably in there," then checking on the next try whether it holds up and revising accordingly, is exactly how a scientific experiment works. That's why kids who are good at this game often show similar strengths in scientific inquiry and math problem-solving too.

When playing with kids, start with 3 digits to get a feel for the game, then move up to 4 digits once they're comfortable. Writing down every guess by hand and marking off certain information one piece at a time — "this digit is definitely in there," "it's definitely not in this spot" — makes finding the answer far more satisfying than guessing at random.

On our activity page, you can choose between 3-digit and 4-digit difficulty, and every guess you submit builds up a running record of strike and ball clues. Use that record to logically plan your next guess.