Skip to content

Instantly share code, notes, and snippets.

@boxmein
Created April 21, 2015 00:31
Show Gist options
  • Select an option

  • Save boxmein/594135db55f2f8ef868b to your computer and use it in GitHub Desktop.

Select an option

Save boxmein/594135db55f2f8ef868b to your computer and use it in GitHub Desktop.
A description of a number game

Some number game

It's a very easy game that isn't particularly easy on humans - but, as @mniip has demonstrated, is easy for computers. Describing it here because I need node-irc-bot to describe it to people but it's not good at long articles.

Requirements:

  • Paper, pen / text editor (you'd probably want to take notes)
  • At least two participants

Start of the game

The first player thinks of a four-digit number with no repeating digits. (For example, 1234).

The second player must now guess that number.

Gameplay

The second player tells the first player a guess (For example, 4932).

The first player must then respond with:

  1. The amount of numbers that the two numbers share (eg 4932 and 1234 both contain 2 and 3)
  2. The amount of numbers that share a position (eg there's a 3 in both numbers at position 3)

For example, the response for guessing 4932 will be 3, 1, while the response for guessing 5674 will be 1, 1.

The gameplay repeats from this point.

Winner

The winner is the player who can find out their opponent's number in the least amount of guesses.

Multiplayer

I usually play it with friends in that everyone makes up a number and everyone guesses the number of the person to their right. This allows for potentially infinite players, while not making it too easy by allowing anyone to guess one player's number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment