Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NIO 2003: Lingo (simple challenge)
#1
The game Lingo is the subject of a daily TV Game of ID-TV that is broadcasted by the TROS and other foreign broadcasting companies.
The goal in Lingo is to guess a word of 5 letters. The first letter of the word is always given. De player inputs an existing word beginning with the specified letter. All letters that are on good postion are marked (in this challenge with a "+"), and letters that are in the word, but not on the right position, are marked differently (here with a "/"). Letters that don't occur in the word are marked by a "." (colon, point).
[Image: lingo.jpg]

In this challenge your program's input is the word to be guesed. Also they receive a list with allowed words; these 8179 words are in the file words.dat (DOWNLOAD HERE) with every word on one line. The words are all in capitals, in alphabetic sorting (ascending). They're English words, so that problems with the IJ or Y in Dutch don't occur.

Your programs in the parts A, B and C research the behaviour of a computerplayer that plays according to the following algorithm: All words that, according to the known information, are not valid are left out. The word that is guessed by the computer is the first word in the list of words that are still available.


Example: The word to be guessed is ZYMES
The previously described player plays as follows:
Code:
1: ZAIRE   +.../
2: ZEBEC   +..+.
3: ZONED   +..+.
4: ZYMES   +++++

Input
The to be guessed word is in a file LINGO.IN which consists of 1 line. On this line there is a word of 5 capital letters. This word also occurs in the words.dat file.
Example LINGO.IN: ZYMES

NOTE: This file is used as example input in all problems.


Overview
Code:
Part A: timelimit: 2 sec; outputfile: 1a.out; max points: 16;
Part B: timelimit: 5 sec; outputfile: 1b.out; max points: 24;
Part C: timelimit: 5 sec; outputfile: 1c.out; max points: 27;
Part D: timelimit: 10 sec; outputfile 1d.out; max points: 33;


Problem A
Write a program nio1a that reads from a file LINGO.IN. The program outputs a file 1a.out consisting of one line. On this line is the information the computerplayer gets when it chose the first word from the valid-words-list with the correct beginning letters (in the example this word is ZAIRE).

Output on given example: +.../

Problem B
Write a program nio1b that reads from a file LINGO.IN. The program outputs a file 1b.out consisting of one line. On that line is indicated how many words after the information of Problem A are still valid for a good solution.

Output on given example: 7

Problem C
Write a program nio1c that reads from a file LINGO.IN. The program outputs a file 1c.out consisting of a number of lines. On every line there is a word that is guessed by the computer player. The last line obviously contains the to-be-guessed word. Hereby the computer player plays with the algorithm as defined in the introduction.

Output on given example:
ZAIRE
ZEBEC
ZONED
ZYMES

Problem D
In this problem, you look for a largest collection of words that, except for the beginning letter, have no other letters in common.
Write a program nio1d that reads from a file LINGO.IN. The program outputs a file 1d.out consisting of a number of lines. On every line there is a word from the previously described collection. The words are on alphabetic sorting. The last line of the file is always the word "ready" (lower case).

Output on given example:
ZANZA
ZILCH
ready


Well, this was one of the problems I had to do in the 2nd round of NIO 2003 Wink I didn't score very good on this problem, I scored a total of 16 points for A, B, C and D together (that's very bad). However, I was able to end up 3rd because I scored a massive amount of points on NIO 2003 Problem 2, 3, and 4. (Note that NIO 2003 Problem 3 was the problem "Recognising Letters", which I posted in a topic a while back). (Btw, NO ONE had points for Problems C and D, and I was one of the three people who had 12 points for Problem B).
The timelimit for this complete problem (A, B, C and D together) was about 1 hour, however, you all may take as much time as you like! Big Grin

Have fun! Big Grin (You'll probably all score higher than I did! Tongue)
Reply


Messages In This Thread
NIO 2003: Lingo (simple challenge) - by Neo - 11-23-2004, 07:02 PM
NIO 2003: Lingo (simple challenge) - by RST - 11-26-2004, 01:55 AM
NIO 2003: Lingo (simple challenge) - by Neo - 11-26-2004, 02:26 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)