Teachers' guide
Teach reasoning with Bulls and Cows
Bulls and Cows is a classic number-deduction game and the ancestor of Mastermind. Students use feedback, bulls for a right digit in the right place and cows for a right digit in the wrong place, to work out a secret 4-digit code. It's a natural fit for reasoning, patterns and efficient search.
Run a live game with your whole class
Classroom mode puts one secret code in front of everyone at once. You create a class, put the class code on the board, and students join from any device at bullsandcowsgame.com/class using a first name or nickname. Your board shows every student's guesses and clues as they come in, so you can see who is reasoning carefully and who is guessing at random. Then reveal the code and talk through the best strategies together.
No accounts, no emails, nothing to install. Guesses are checked on our server so the code can't be peeked at, and each class is deleted automatically after 7 days. You can set the code yourself to target a particular idea, or let the site pick one.
Curriculum links
- Logical reasoning and argumentation
- Number sense and place value
- Combinatorics and search strategies
- Data interpretation: using feedback to guide choices
Classroom setups
How to play (quick)
- Enter a 4-digit guess with no repeated digits.
- Read the feedback: bulls (right digit, right place) and cows (right digit, wrong place).
- Rule out what's impossible and refine your next guess.
- Reach 4 bulls to win.
Effective solving strategies
- Cover more ground early. Start with four distinct digits, such as 1 2 3 4, to learn as much as possible.
- Eliminate digits fast. A result with no bulls and no cows removes all four digits at once.
- Localise positions. With 2 cows, rotate those digits to test positions systematically.
- Control variables. Near the end, change only one or two digits per guess so the feedback is clear.
- Record attempts. Keep a simple grid of digits and positions. The board on screen does this for you.
- In Bull Rush, use all five clues together. They're designed to narrow down to a single code.
Teach with pencil and paper
Bulls and Cows works beautifully as an unplugged activity with no devices at all. Students can play in pairs or small groups.
- Choose a secret number. One student writes a 4-digit number with all different digits.
- Make a guess. The other student writes a guess, also 4 different digits.
- Give feedback. The host counts bulls and cows and tells the guesser.
- Refine and repeat until the guesser reaches 4 bulls.
Tip: give students a tracking grid so they can mark which digits and positions are still possible.
Under the hood: how Bull Rush builds a unique daily puzzle
Bull Rush makes sure every learner sees the same daily challenge and, with careful reasoning, can deduce one unique answer.
- Daily seed. The date acts like a recipe, producing the same secret code for everyone that day.
- Clue creation. The game tests sets of five example guesses and keeps a set only if those five lines together leave exactly one possible code out of all 5,040.
- Uniqueness check. If more than one code fits, the set is rejected and another is tried until there's a single provable solution.
- Persistence. A small record on the device lets students revisit that day's puzzle and see the same clues and result.
Classroom win: two different classes, or home and school, can discuss the same puzzle and compare strategies.
History
Bulls and Cows began as a pen-and-paper code-breaking pastime whose exact origin is murky, but it is often traced to at least the early 20th century. It spread under different names: "Bulls and Cows" in English, быки и коровы across the USSR, and "Hit and Blow" in Japan. The core idea of counting correct digits in the right place versus the wrong place predates the board game Mastermind by decades. Word-based cousins such as Jotto (1955) show how the same deduction loop moved between numbers and letters.
The game jumped to computers in the late 1960s as MOO. A version on Cambridge University's Titan (1968) inspired early ports for Multics (1970), Unix and DEC systems, making it a fixture on timesharing computers. Around the same time a lighter three-digit variant, Bagels, circulated widely and appeared in 101 BASIC Computer Games (1973), helping cement the mechanic in programming culture and classroom labs.
In Bagels, "Fermi" means a right digit in the right place, "Pico" a right digit in the wrong place, and "Bagels" means none of the digits appear. The names were a joke: pico from the scientific prefix, Fermi after the physicist Enrico Fermi, and bagels for "zero, nothing there". Because the numbers are short, it's a good warm-up before the full four-digit game.
Mastermind (1970) turned the pencil-and-paper logic into coloured pegs and sold widely, bringing the idea to a mass audience. Bulls and Cows has lived on in classrooms, puzzle books and apps, and its deduction loop echoes in TV formats like Lingo and today's daily word puzzles.
References (APA)
- Bulls and cows. (2025, August 16). Wikipedia. Retrieved October 14, 2025.
- Grochow, J. M. (1972). Comment: MOO in Multics. Software: Practice and Experience, 2(3), 303–304.
- AT&T. (1983). MOO(6): Guessing game [Unix System V manual page].
- Ahl, D. H. (1973). 101 BASIC computer games. Digital Equipment Corporation.
- Mastermind (board game). (2025, September 26). Wikipedia. Retrieved October 14, 2025.
- Jotto. (n.d.). Wikipedia. Retrieved October 14, 2025.
- Lingo (American game show). (2025, August 11). Wikipedia. Retrieved October 14, 2025.
- Ritchie, D. (2001). Ken, Unix, and games. ICGA Journal, 24(2), 67–70.
Connect and motivate
Encourage students to share their emoji results and check the global leaderboard to see how they compare with players around the world.