MOO - the May 1999 POTM MOO is a word-guessing game. The original form of the game was found in /usr/games on old UNIX systems - the player would guess a word and the program would tell them how many letters were in the correct position (a "BULL") and how many were in the word, but incorrectly positioned (a "COW"). Hence the name: MOO. In September of 1989, the game was turned into a POTM contest by T. Scott Kennedy (in those days it was the winner's responsibility to run the next contest). Scott won the first-ever POTM and created this one as the second-ever POTM. The current POTM doesn't use "cows" and "bulls" as defined above, but your program WILL need to guess an English word in a similar fashion. These are the long rules for the latest POTM. I have tried to be as clear as possible but if there are any questions please ask them as soon as possible so I can correct errors in the weekly FAQ mailings. My goal is to eliminate loopholes - if you have a question about wording, I probably meant the statement to have the simplest possible interpretation. ****** MOO - The MayDay POTM ****** (deadline is 11:59 PM EST Saturday May 1, 1999) ================== T H E L O N G R U L E S ================= I. YOUR PROGRAM AND YOUR TASK IN SUMMARY a) Your program will play a game called "MOO" which will try and guess an English word. (The word will be "SKUNK" for this example, but you won't know that until your program deduces it!) b) On the initial execution, I'll tell you how many letters are in the word I'm thinking of. Your program will then output a string of that length as your guess. As an example, your program reads standard input and discovers the number 5 meaning that the word I'm thinking of is 5 letters long. Your program outputs the string "SSSSS" and exits. Before exiting, you may store temporary data in a file for use on your next execution. c) On subsequent executions, your program reads three things from standard input: Your previous guess (SSSSS in this example); and the number of HITS and the number of MISSES. A "HIT" occurs when a letter in your guess is in the correct position with the target A "MISS" occurs when a letter is not in the target word at all. Your program can also read any information you left behind in the temporary data file in order to determine your next guess. After applying your algrithm, your program outputs another 5 letter string. d) When you guess the word (5 HITS in this case), you are done. Your score is the number of guesses you took. II. A SAMPLE GAME - THE TARGET WORD IS "SKUNK" GUESS HITS MISSES NOTE ===== ==== ====== ========================== SSSSS 1 0 since there is an S, there are no misses but only the first S is a HIT AAAAA 0 5 no A, so all 5 are misses ABCDE 0 5 all misses KKKKK 2 0 note there are 2 Ks in SKUNK SKIPS 2 2 I,P are the misses, first S,K are hits SHARK 2 3 H,A,R are the misses GUPPY 0 4 The U is NOT a miss, but it's out of place KUSSN 0 0 no misses, but nothing in right position SPUNK 4 1 all correct except for the P SKUNS 4 0 so close ... no misses since S is in target SKUNK 5 0 at last ... you got it! III. THE TARGET WORD a) will be 4 or more letters long b) will be less than 10 letters long (thus wordlength = 4,5,6,7,8, or 9 letters) c) will be an American English word selected at random and spell-checked using a standard UNIX spell-checker d) may contain repeated letters (or may not) e) may be a plural or conjugated verb form, proper name, or anything else that spell-checks f) will NOT contain apostrophes, dashes, or anything besides the upper case letters A through Z g) will be all upper-case (capitalization is not an issue) IV. SCORING AND WINNING - SYSTEM TESTING and THE FINALS a) Your score will be the number of guesses you take (including the final correct guess). Low score is good - just in case you couldn't guess. b) For the finals, three different words will be used and your score will be the sum of the scores for each of the words. c) In the event of a tie after three words, those entries that are tied (and ONLY those entries) will be subjected to another three word playoff. Ties will continue to be broken in this manner until there is a single winner or the POTM-master gets tired of running tiebreakers. d) If an entry takes more than 10 seconds sys+user time to make a guess, it will receive a score of 999 for that round and will not be allowed to continue on this word. Note that this is a PER GUESS restriction, not a per game restriction. e) If an entry makes more than 100 guesses and still has not deduced the target word, it will receive a score of 999 for that word. V. PROGRAM DETAILS a) INPUT TO YOUR PROGRAM 1) Your program must read input from standard input 2) If only a single number is presented to your program, the number will be the number of letters in the target word. Call it N. N will be presented ONLY on the initial execution of your program. 4