Bulls and Cows (called Hit & Blow in Japan) is a game where you use the hits and blows you get with each guess as clues to narrow down the candidate answers. Here are tips for solving it in fewer guesses, shown through a real game.

An example game (3 digits)

The answer is a row of 3 all-different digits from 0 to 9. At the start, there are 10 × 9 × 8 = 720 candidates.

#1012HIT 0BLOW 1#2345HIT 0BLOW 2#3134HIT 0BLOW 2#4403HIT 3BLOW 0Answer403

In this game, it was solved on guess 4. Here is how many candidates were left after each guess.

GuessClueCandidates left
Start-720
0120 hits, 1 blow252
3450 hits, 2 blows18
1340 hits, 2 blows3
4033 hitsSolved

By guess 2, the 720 had dropped to 18. The tips are packed into that.

1. Test different symbols in your first 2 guesses

For guesses 1 and 2, guess only different symbols. In the example, we used 0, 1 and 2 first, and 3, 4 and 5 second. This shows you how many of the answer’s symbols are in each group.

2. Read the total of hits and blows

The total of hits and blows is “the number of the symbols you guessed that are in the answer.”

  • Guess 1 (012) has a total of 1. One of 0, 1 and 2 is in the answer.
  • Guess 2 (345) has a total of 2. Two of 3, 4 and 5 are in the answer.
  • That makes 3. The answer has 3 digits, so none of the remaining 6, 7, 8 and 9 is in it.

At this point, you can put ✗ in the memo on the four symbols 6 to 9 (How to Use the Memo).

#1012HIT 0BLOW 1#2345HIT 0BLOW 2Answer???Memo0123456×7×8×9×

3. 0 hits is a clue about places

If there are 0 hits, none of the symbols you guessed is in that place. In the example, guess 2 (345) had 0 hits, so the 1st slot of the answer is not 3, the 2nd is not 4, and the 3rd is not 5. Once you know the symbols, use this when you settle the places.

4. Pick guesses that do not contradict the clues

From guess 3 on, the basic rule is to choose from rows that do not contradict the clues so far (rows that could still be the answer). Such a guess might be right, and even if it is wrong, the candidates shrink.

Guess 3 in the example, 134, was one of the 18 rows that did not contradict the earlier clues. The result was 0 hits, 2 blows, which left 3 rows, 403, 423 and 451, and guess 4 solved it.

Using the same rules as the app and repeating “pick one row from those that fit the clues,” the average number of guesses to solve it came out to about 5.2 for 3 digits and about 5.5 for 4 digits (results from trying 10,000 games for 3 digits and 10,000 for 4 digits with random answers).

5. Swap just one symbol and compare

If you swap just one symbol from the last guess, the change in hits and blows shows you clearly what the swapped symbols do. If the total goes up by 1, the new symbol is in the answer and the one you took out was not. If it goes down by 1, it is the other way around. If the total stays the same, either both are in it or both are out.

6. Mark ✗ and ○ in the memo

In the app, you can long-press a key (or switch to “Memo” and tap) to mark symbols with ✗ and ○. Marking symbols you know are not in the answer with ✗ and symbols you know are in it with ○ makes it easier to think about your next guess.

7. Write out the candidates when few are left

When the candidates are down to a handful, write them all out and check each against the clues one by one. Before guess 4 in the example, 3 rows were left.

The app’s target number

The app “Bulls and Cows” has a “target number” for each length (digits plus 3), and if you solve it within that, the clear coins are multiplied by 1.5. That is 6 for 3 digits and 7 for 4 digits. With the tips above, you can aim for the target number with room to spare.

To check the rules, see How to Play and the Rules of Bulls and Cows. For how to solve each length, see 3 digits, 4 digits and 5 to 7 digits. For how to choose your 1st guess, see What Should You Guess First?. To try it right away, go to the playable board page.