Skill Games › Puzzles › Bulls and Cows

Русский

How to play Bulls and Cows

Crack the secret code from bulls and cows - right digit, right place or wrong place. Solo against the attempts or a duel with the computer.

Bulls and Cows on skill.games

Bulls and Cows is a code-breaking game played with pencil and paper for generations. One player thinks of a secret code made of different digits; the other tries to guess it. After every guess the answer comes back as a number of bulls and cows: a bull is a right digit in the right place, a cow is a right digit in the wrong place. From those two small numbers you narrow the possibilities down until only the secret is left.

There is no luck in reading the answers - only in what the first guesses happen to hit. A careful player who writes down what each answer rules out can crack a four-digit code in five or six guesses. On skill.games the computer keeps the score honestly, the notepad keeps your guesses in order, and a grid lets you mark what you have worked out.

How to play on skill.games

When you open the game, the settings popup appears. Choose a mode - Solo or Duel - and a difficulty - Easy, Normal, Hard or Crazy - and press PLAY. Your choices are remembered for next time.

  • Typing a guess: tap the digits on the pad at the bottom of the screen. A digit you have already used in this guess is greyed out, because every digit in a code is different. The backspace key removes the last digit.
  • Sending it: when every place is filled, the GUESS key turns green. Tap it and your guess is written into the notepad with its answer: a red badge with horns counts the bulls, a yellow badge with ears counts the cows. A faded badge means zero.
  • On a computer you can type the digits on the keyboard, delete with Backspace and guess with Enter.
  • The notepad lists every guess with its number. When it fills up, it follows your newest line; drag it (or scroll with the mouse wheel) to look back at earlier guesses.
  • The grid under the notepad is yours to mark - the game never fills it in. Its top row holds the digits 0 to 9: tap a digit once to cross it out (not in the code), again to circle it (in the code), and a third time to clear it. The rows below are the places in the code, first to last: tap a square to cross out that digit in that place, again to mark it as the right place, again to clear. A digit you crossed out also shows struck through on the pad.

On a phone held sideways the notepad moves to the left and the grid and pad to the right. The menu button in the top-left corner pauses the game, starts a new one or switches the sound on or off. The game is saved after every key you press, so if you close the page you can press CONTINUE and carry on with the same code, the same guesses and your marks.

Rules

The code. A secret code is a row of different digits from 0 to 9. A code may start with 0. In Solo the length depends on the difficulty; in Duel every code has four digits.

The answer. Each guess must have the same length as the code and no repeated digit. It is compared with the secret place by place: - every digit that is in the code and in the same place is a bull; - every digit that is in the code but in a different place is a cow; - digits that are not in the code are not counted at all.

For example, if the secret is 4271 and you guess 1234, the 2 is a bull (same place), the 1 and the 4 are cows (in the code, wrong place), and the 3 counts for nothing: one bull, two cows. All bulls means the code is cracked.

Solo. You try to crack the computer's code within a limited number of attempts. Crack it and you win; use up the last attempt without cracking it and you lose - the code is shown at the end either way.

Duel. Before the duel starts you choose your own secret four-digit code on the pad and press OK. Then you and the computer take turns: you guess its code, it guesses yours, and each guess is answered automatically. You always guess first. When you crack the computer's code, it still gets its guess in that round, so both sides have had the same number of tries: if it cracks yours with that last guess, the duel is a draw; if not, you win. If the computer cracks your code first, you lose. Its guesses and their answers are shown in the right-hand column of the notepad, next to the code they are aimed at.

Strategy tips

  • Open with codes that share no digits. With four digits, 0123 and then 4567 together test eight of the ten digits. The total bulls plus cows of each answer tells you how many of the code's digits are in that group - and the two digits you haven't tried make up the rest.
  • Bulls plus cows first, places second. Work out which digits are in the code before worrying about where they go. A guess that answers "0 bulls, 0 cows" is a gift: cross out all its digits in the grid at once.
  • Use the zero bulls. A digit from a guess that scored no bulls is not in that place. Cross it out in its row of the grid even when you know it is in the code.
  • Change one thing at a time. Swapping a single digit, or the positions of two digits, between guesses shows exactly what the change was worth.
  • Every guess should fit every answer. Before you press GUESS, check your code against each earlier line: would it have produced the same bulls and cows? A guess that can't be the code still tells you something, but one that could be the code might also win.
  • Count what's left. Late in the game, write out the codes that are still possible. If only two or three remain, pick the guess that tells them apart.
  • In a Duel, mind the clock. The computer at Hard and Crazy usually needs five or six guesses for a four-digit code. Taking a riskier guess that could split the remaining codes faster can be worth it when you are behind.

Difficulty levels

Solo - the difficulty sets the code length and the attempts you are given: - Easy: 3 digits, 12 attempts. - Normal: 4 digits, 12 attempts - the classic game. - Hard: 5 digits, 13 attempts. - Crazy: 6 digits, 14 attempts.

Every limit leaves room to spare: a player who always guesses a code that fits all the answers so far cracks the code well within it.

Duel - the code always has four digits; the difficulty sets how well the computer guesses yours: - Easy: the computer only remembers its last three answers, so it wastes guesses - about seven on average. - Normal: every guess fits all its answers so far, picked at random among them - about five and a half guesses. - Hard: it picks, among the codes still possible, the guess whose worst answer leaves the fewest codes - about 5.35 guesses, at most seven. - Crazy: it considers every possible code as a guess and picks the one that leaves the fewest codes on average - about 5.27 guesses, at most seven, and seven only about once in sixty duels.

The results screen shows how many attempts you used (Solo, with your best at that difficulty) or how many guesses each side needed (Duel), along with both codes. Your statistics - wins, losses, draws, win rate and streaks - are kept separately for each mode and difficulty.