It is a game with numbers that may date back a century or more, and a probable inspiration for Mastermind. It is played by two opponents. The game can also be played with 3 digits instead of 4.
On a sheet of paper, the players each write a 4-digit secret number. The digits must be all different. Then, in turn, the players try to guess their opponent's number who gives the number of matches. If the matching digits are on their right positions, they are "bulls", if on different positions, they are "cows". Example:
The first one to reveal the other's secret number wins the game. As the "first one to try" has a logical advantage, on every game the "first" player changes. In some places, the winner of the previous game will play "second". Sometimes, if the "first" player finds the number, the "second" has one more move to make and if he also succeeds, the result is even.
The secret numbers for Bulls and cows are usually 4-digit-numbers, but the game can be played with 3 to 6 digit numbers (in every case it is more difficult than with 4).
The game may also be played by two teams of 2-3 players. The players of every team discuss before making their move, much like in chess.
Because the game has simple rules, while it is difficult and entertaining, there are many computer variants; it is often included in telephones and PDAs.