Solving method

Number Baseball (Bulls and Cows) strategy: a worked game

Number Baseball gives you ten tries to find four different digits. Each answer tells you little, but together they close in fast if you read them in the right order: first which digits, then which places.

Read the total first

Strikes plus balls is how many of your four digits are in the answer; the places come later. A good opening spends two tries on eight different digits, such as 0123 and then 4567. The answer has four digits, so whatever those two totals leave out must come from 8 and 9.

A worked game

Say the hidden number is 6194. The table shows each try, the answer it gets, and how many of the 5,040 possible numbers still fit everything seen so far.

TryNumberAnswerStill possible
101231S 0B480
245670S 2B168
304580S 1B37
451791S 1B5
556931S 1B1
661944S 0B1

The two opening tries total 1 and 2, so three of the answer’s digits are among 0 to 7 and exactly one of 8 and 9 is in it. Every try after that is the lowest number that agrees with all the answers so far. Take 0458: had it been the hidden number, 0123 would have scored 1S 0B and 4567 would have scored 0S 2B, exactly as they did. After the fifth answer only 6194 still fits.

Pin the places

A try with no strike rules each of its digits out of the place it stood in. In the game above, 4567 scored no strike, so 4 is not first and 6 is not third. When you reuse a digit you believe in, move it to a place it has not tried. Once a try totals four you hold all four digits and only the order is left: 2S 2B leaves 6 possible orders, 1S 3B leaves 8 and 0S 4B leaves 9.

The rule that always works

From the third try on, type only numbers that fit every line in your list: a number that contradicts an earlier answer cannot be the answer. Before you press ✓, test it against each earlier try as if it were the hidden number. We replayed all 5,040 numbers with nothing but this rule, always taking the lowest number that fits, and none needed more than nine tries; 4,154 were found within six.

Tries first, then time

The board ranks fewer tries first and uses time only between records with the same number of tries, so a minute of thought is always cheaper than one more try. Marks on the memo pad are not tries: use ○ for digits you are sure of and × for digits that are out. A mistyped digit is a spent try once you press ✓, so read the four slots first.

More solving methods