Bulls and Cows is a code-breaking game with numbers, like Mastermind with digits. A number is hidden; after each guess you learn how many digits are in the right place (bulls) and how many are in the number but in the wrong place (cows). Find it in as few guesses as you can.
The secret number has 3, 4 or 5 digits, all different. Any digit from 0 to 9 can be used, and the number may start with 0.
Type a guess with the same number of different digits. The game answers with bulls and cows: a bull is a right digit in the right place, a cow is a right digit in the wrong place. Digits that are not in the number are not counted.
When every digit is in its place (4 bulls in a 4-digit game), you win. Your score is the number of guesses you needed.
Say the secret number is 4271:
A few habits make the clues add up faster.
Every day (UTC), everyone gets the same 4-digit number. Press Start when you are ready: the timer runs until you find it, even if you leave the page, and you have up to 30 guesses. The leaderboard ranks the fewest guesses first, then the fastest time. The number is kept on the server, so the page does not know it until you finish.
The game is also called Cows and Bulls, 1A2B in China and Taiwan, Hit & Blow in Japan and number baseball (숫자야구) in Korea. It was played with pencil and paper long before the board game Mastermind, which uses the same idea with coloured pegs.
Yes. As in most versions, 0 can come first, so 0123 is a valid number.
No. The secret number and every guess use different digits.
A bull is a right digit in the right place; a cow is a right digit in the wrong place. If the number is 4271 and you guess 1234, the 2 is a bull and the 1 and 4 are cows.
With 4 digits, most players need 6 to 10. With the best strategy, a computer never needs more than 7.
It is the same idea with digits instead of colours. Mastermind is a trademark of its owner and is not connected with this site.
No. An anonymous cookie remembers your player number; no account or email is needed.