Sabtu, 18 September 2010

Cheating game with grep + random.org WORDZ

Did I see my child have a headache at the computer. When I see, it turns out he was playing the game Wordz.
This game is quite unique. Like Scrabble. But all the letters already on the screen, and randomized. So that tends to be confusing. Also does pretty good for the brain teaser and forcing children so often open the dictionary, he he.
Having arrived at the 18 level, also sorry to see him dizzy dizziness so:)Finally I showed the trick: Project Gutenberg grep.
Project Gutenberg is a project of digitizing the books were expired copyright, and was already in public domain. There is a lot of classical literature on this project site, very interesting. I used to love reading classic science fiction novel that provided by this project. 20 000 leagues under the sea, Journey to the center of the earth, and so on. How nice.
Well, including one of them is in HTML format Webster dictionary:)This will help us in the game WORDZ.
OK, let's download the dictionary once. Which can be seen in http://www.gutenberg.org/etext/673.I then downloaded from the mirrors in Taiwan, making it very fast finish.
After that, unzip the file pgwht04.zip. Will appear pgwht04.txt fileThen rename it to (eg) Webster-dictionary.txt
WORDZ return to the game, the game displayed a few letters of a word has been fixed, and there are also a few letters we exchange-rates. Example: F__C__O__Y, where the right answer is "factory"
In this example, we can find the word, in Webster's dictionary we had been downloaded, with great ease. Use the grep! :)
In this example, the command is:
Webster paint-dictionary.txt | grep-o "fcoy"
Signs point to the grep command is a letter which means we do not know. Well, so then grep will show all the words that have a pattern F__C__O__YSo in a trice only time you will immediately find the answer, namely FACTORY:)
When I showed this trick, my child's eyes immediately widened. "Wahhhh great computer!"So I deh grin, he he
Furthermore, the two of us to continue the game WORDZ together. In the not too distant future, we've been up to level 25. He he. Much fun playing this game with these kids. They kept a scene when the words are difficult problems can be discovered by "computer dada" within a short time: D
Until then my wife reminded - that it was time for him to do his homework. Apparently it got to do homework together with their parents.So. parents make about, and the child made answer.
What questions must I make? Apparently, the questions form the root of three. I need to select three pieces six-digit number, which will be searchable by the roots of his three children.
More fun:)
I said to my son, "Eh, let the numbers selected by the sky just yaa". His eyes grew wide again.Grinning I opened RANDOM.ORG, and within a short time the fruit appears three 6-digit numbers to be about her homework.
He later his homework cheerfully.
Mission accomplished! : D

Tidak ada komentar:

Posting Komentar