anu(e)scape
raves, rants, reflections
|
|||
Master Mind - How ToThe GoalThe goal of this game is to guess the secret number generated by the computer. You can press the 'Cheat' button anytime to take a peek at the secret number! Hey, it's just a game! The CluesWith every guess you make, the computer will give you clues to how well your guess matches the secret number. The clues are in the form of how many cows and bulls are in your guess. The RulesThe computer generated secret number and your guess follows some simple rules:
For example, 49863, 873, 0463 and 8377 are all invalid. Cows?!A cow is a digit, in the number you guessed, that is also in the secret number, but not in the right place. The computer will tell how many cows your guess has. For example, if the secret number is, say, 9518, and you guessed 4890, you have 2 cows. The digits 8 and 9. The computer won't tell you which digits are cows. You have to figure that yourself by making more guesses, intelligently. Bulls??!A bull is a digit, in the number you guessed, which is also in the secret number, and it is in the right place. The computer, again, will tell you how many bulls your guess has, but not the particular digits. For example, if the secret number is, say, 9518, and you guessed 4810, you have 1 bull. The digit 1. In this case, you also have 1 cow. The digit 8. The Goal RevisitedWhen you have 4 bulls, you have guessed the number right. As you may have noticed, the sum of cows + bulls for a guess can never be more than 4. StrategyLet's discuss some strategy. Let's say the secret number is 1234 and you got 3 cows and 0 bulls. Then you guessed 5678 and got 0 cows and 1 bull. From these clues, you can be sure that the digits 9 and 0 are not in the secret number. Your first guess matched 3 digits of the secret number and your second guess matched one more. Since the secret number has exactly 4 digits, all the four digits of the secret number has been accounted for. Using this process of logical reasoning and elimination, with each guess, you will get nearer to the secret number. Your goal - 0 cows, 4 bulls. DisclaimerYes, it is a game for nerds! Give it a try. Beware, once you get the hang of it, the game becomes quite addictive. PlayIt's here. |
|||
|
Copyright © 2003 Anupriyo Chakravarti. All rights reserved.
|
|||