Bulls and Cows

Last updated

4digits, an open source version of Bulls and Cows. This software uses "A" to denote "bulls" (digit in the correct position) and "B" to denote "cows" (digit in the wrong position). 4digits 0.4 screenshot.png
4digits, an open source version of Bulls and Cows. This software uses "A" to denote "bulls" (digit in the correct position) and "B" to denote "cows" (digit in the wrong position).

Bulls and Cows (also known as Cows and Bulls or Pigs and Bulls) is a code-breaking mind or paper and pencil game for two or more players. The game is played in turns by two opponents who aim to decipher the other's secret code by trial and error.

Contents

Bulls and Cows predates the commercially marketed board game version, Mastermind and the word-based version predates the hit word game Wordle.[ citation needed ] A version known as MOO was widely available for early mainframe computers, Unix and Multics systems, among others.

The numerical version

The numerical version of the game is usually played with 4 digits, but can be played with any number of digits.

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. The digits of the number guessed also must all be different. If the matching digits are in their right positions, they are "bulls", if in different positions, they are "cows". Example:

The first player to reveal the other's secret number wins the game.

The game may also be played by two teams of players, with the team members discussing their strategy before selecting a move.

Computer versions of the game started appearing on mainframes in the 1970s. The first known version was written by Frank King at the Cambridge Computer Laboratory sometime before the summer of 1970. [1] This version ran on Cambridge's multi-user operating system on their Titan machine. It became so popular the administrators had to introduce systems to prevent it from clogging the system. [2] In 1972, the original Cambridge MOO was ported to the Multics operating system at MIT, [1] and early Unix at AT&T. [3]

A version called BASIC MOO was published in the DECUS Program Library for PDP computers and another was available through the DEC Users Society, both dating from 1971. [4] [5] A version written by Lane Hauck in the language FOCAL for the PDP-8 later served as the basis for the handheld game Comp IV by Milton Bradley. [6] [7]

These programs maintained a league table of players' scores, and protecting the integrity of this league table became a popular case study for researchers into computer security. [8]

It is proved that any number can be solved within seven turns. The average minimal game length is 26274/5040 ≈ 5.21 turns. [9] [10]

The word version

This version is usually played orally, but is easier to play if each player (or each team) keeps written notes. It is exactly like the numerical version, except instead of 4-digit numbers, 4-letter words are used. They must be real words, according to whatever language or languages you are playing the game in. Alternative versions of the game can be played with 3-letter or 5-letter words, but the 4-letter version remains the most popular one.

The game play for the word version is as follows.

For example, if the secret word is HEAT, a guess of COIN would result in "0 Bulls, 0 Cows" (none of the guessed letters are present); a guess of EATS would result in "0 Bulls, 3 Cows" (since E, A, T are all present, but in the wrong positions from the guess), and a guess of TEAL would result in "2 Bulls, 1 Cow" (since E and A are in the right positions, while T is in the wrong position). The game continues until one of the Guessers scores "4 Bulls" for guessing HEAT exactly.

The word version of Bulls and Cows is similar to Wordle, a popular web-based word game released in 2021. Players have six attempts to guess a five-letter word.

See also

Related Research Articles

B is a programming language developed at Bell Labs circa 1969 by Ken Thompson and Dennis Ritchie.

<span class="mw-page-title-main">Hangman (game)</span> Word game

Hangman is a guessing game for two or more players. One player thinks of a word, phrase, or sentence and the other(s) tries to guess it by suggesting letters or numbers within a certain number of guesses. Originally a paper-and-pencil game, there are now electronic versions.

<span class="mw-page-title-main">Multics</span> Time-sharing operating system

Multics is an influential early time-sharing operating system based on the concept of a single-level memory. Nathan Gregory writes that Multics "has influenced all modern operating systems since, from microcomputers to mainframes."

<span class="mw-page-title-main">PDP-7</span> Minicomputer introduced in 1964

The PDP-7 is an 18-bit minicomputer produced by Digital Equipment Corporation as part of the PDP series. Introduced in 1964, shipped since 1965, it was the first to use their Flip-Chip technology. With a cost of US$72,000, it was cheap but powerful by the standards of the time. The PDP-7 is the third of Digital's 18-bit machines, with essentially the same instruction set architecture as the PDP-4 and the PDP-9.

MAD is a programming language and compiler for the IBM 704 and later the IBM 709, IBM 7090, IBM 7040, UNIVAC 1107, UNIVAC 1108, Philco 210-211, and eventually IBM System/370 mainframe computers. Developed in 1959 at the University of Michigan by Bernard Galler, Bruce Arden and Robert M. Graham, MAD is a variant of the ALGOL language. It was widely used to teach programming at colleges and universities during the 1960s and played a minor role in the development of Compatible Time-Sharing System (CTSS), Multics, and the Michigan Terminal System computer operating systems. The original version of the chatbot ELIZA was written in MAD-SLIP.

The Honeywell 6000 series computers were rebadged versions of General Electric's 600-series mainframes manufactured by Honeywell International, Inc. from 1970 to 1989. Honeywell acquired the line when it purchased GE's computer division in 1970 and continued to develop them under a variety of names for many years. In 1989, Honeywell sold its computer division to the French company Groupe Bull who continued to market compatible machines.

TYPSET is an early document editor that was used with the 1964-released RUNOFF program, one of the earliest text formatting programs to see significant use.

<span class="mw-page-title-main">General Comprehensive Operating System</span> Operating system from General Electric

General Comprehensive Operating System is a family of operating systems oriented toward the 36-bit GE-600 series and Honeywell 6000 series mainframe computers.

<span class="mw-page-title-main">Jotto</span> Logic-oriented word game

Jotto is a code-breaking pen and paper word game for two players. Each player picks and writes down a secret word and attempts to guess the other's word first during their turn.

<i>Mastermind</i> (board game) Board game

Mastermind or Master Mind is a code-breaking game for two players invented in Israel. It resembles an earlier pencil and paper game called Bulls and Cows that may date back a century.

<i>Lingo</i> (American game show) American television game show

Lingo is an American television game show with multiple international adaptations. In it, contestants compete to decode five-letter words given the first letter, similarly to Jotto, with each correctly guessed word earning number draws to attempt filling in a Bingo card.

Moo or MOO may refer to:

<i>Space Travel</i> (video game) 1969 video game

Space Travel is an early video game developed by Ken Thompson in 1969 that simulates travel in the Solar System. The player flies their ship around a two-dimensional scale model of the Solar System with no objectives other than to attempt to land on various planets and moons. The player can move and turn the ship, and adjust the overall speed by adjusting the scale of the simulation. The ship is affected by the single strongest gravitational pull of the astronomical bodies.

<span class="mw-page-title-main">History of Unix</span>

The history of Unix dates back to the mid-1960s, when the Massachusetts Institute of Technology, AT&T Bell Labs, and General Electric were jointly developing an experimental time-sharing operating system called Multics for the GE-645 mainframe. Multics introduced many innovations, but also had many problems. Bell Labs, frustrated by the size and complexity of Multics but not its aims, slowly pulled out of the project. Their last researchers to leave Multics – among them Ken Thompson, Dennis Ritchie, Doug McIlroy, and Joe Ossanna – decided to redo the work, but on a much smaller scale.

Letter frequency is the number of times letters of the alphabet appear on average in written language. Letter frequency analysis dates back to the Arab mathematician Al-Kindi, who formally developed the method to break ciphers. Letter frequency analysis gained importance in Europe with the development of movable type in 1450 AD, where one must estimate the amount of type required for each letterform. Linguists use letter frequency analysis as a rudimentary technique for language identification, where it is particularly effective as an indication of whether an unknown writing system is alphabetic, syllabic, or ideographic.

Lingo is a British game show based on the American programme of the same name, the original iteration of the programme was made by Thames Television and Action Time for ITV, running for a single series with host Martin Daniels from 12 May to 14 July 1988. A revived version has also aired from 1 January 2021 hosted by Adil Ray.

<i>Beagle Bag</i> Apple II game collection

Beagle Bag is a collection of video games for the Apple II family of computers published in 1982 by Beagle Bros Software. In common with their other titles, the Beagle Bag software was released in unlocked and unprotected form, and is now in the public domain.

Mainframe computers are computers used primarily by businesses and academic institutions for large-scale processes. Before personal computers, first termed microcomputers, became widely available to the general public in the 1970s, the computing industry was composed of mainframe computers and the relatively smaller and cheaper minicomputer variant. During the mid to late 1960s, many early video games were programmed on these computers. Developed prior to the rise of the commercial video game industry in the early 1970s, these early mainframe games were generally written by students or employees at large corporations in a machine or assembly language that could only be understood by the specific machine or computer type they were developed on. While many of these games were lost as older computers were discontinued, some of them were ported to high-level computer languages like BASIC, had expanded versions later released for personal computers, or were recreated for bulletin board systems years later, thus influencing future games and developers.

Wordle is a web-based word game created and developed by Welsh software engineer Josh Wardle. Players have six attempts to guess a five-letter word, with feedback given for each guess in the form of colored tiles indicating when letters match or occupy the correct position. The mechanics are similar to the 1955 pen-and-paper game Jotto and the television game show franchise Lingo. Wordle has a single daily solution, with all players attempting to guess the same word.

Josh Wardle is a Welsh software engineer who developed the viral web-based word game Wordle. The New York Times Company acquired Wordle from Wardle in late January 2022. Wardle lives in Brooklyn, New York.

References

  1. 1 2 Grochow, Jerrold (July–September 1972). "MOO in Multics". Software: Practice and Experience. 2 (3): 303–304. doi:10.1002/spe.4380020313. S2CID   62558113.
  2. Aleph-Null (April–June 1971). "Computer Recreations". Software: Practice and Experience. 1 (2): 201–204. doi:10.1002/spe.4380010210. S2CID   222193478.
  3. Ritchie, Dennis (June 2001). "Ken, Unix, and Games". ICGA Journal. 24 (2): 67–70. doi:10.3233/ICG-2001-24202.
  4. Steele Jr., Guy L. (3 March 1971). "BASIC MOO". DECUS Program Library.
  5. Johnston, L. (1971). ""MOO" or "BULLS and COWS"". Decuscope. 10 (1): 29.
  6. DeWyze, Jeannette (12 July 1982). "San Diego's Gremlin: how video games work". San Diego Reader .
  7. Smith, Keith (25 September 2015). "The Golden Age Arcade Historian: The Ultimate (So-Far) History of Gremlin Industries Part 2". The Golden Age Arcade Historian. Retrieved 19 July 2022.
  8. Ritchie, Dennis; Thompson, Ken (July–August 1978). "The UNIX Time-Sharing System". Bell System Technical Journal. 57 (6): 1905–1929. doi:10.1002/j.1538-7305.1978.tb02136.x.
  9. "Optimal algorithms for bulls and cows game". slovesnov.users.sourceforge.net.
  10. Liu, Chao-Lin. (2001). "Mathematics, Computer Science, and Number Games" (PDF). Science Monthly (in Chinese). 32 (3): 250–255.