[Spoiler, no Solution] 'Expert' #25 (acrostic puzzle generator)
Rod Adams <[email protected]> Sun, 10 Oct 2004 21:54:42 -0500
| Newsgroups | gmane.comp.lang.perl.qotw.discuss |
|---|---|
| Message-ID | <[email protected]> |
Mark Jason Dominus wrote: >You will write a program to generate double-acrostic puzzles. > >A double-acrostic puzzle is a little like a crossword puzzle, except >that the words don't cross. The goal of the puzzle is to determine >the contents of a secret quotation. The solver receives a list of >crossword-style clues. The solution to each clue is a word or a short >phrase. Each letter in a clue answer is transferred to corresponding >labeled spaces in a grid. When all the spaces in the grid are filled >in with the correct letters, the grid will contain the secret >quotation. > Ordinarily, this is the type of QotW I would jump on. Unfortunately, Real Life is consuming all my time, so I can't work on it. However, I will add some comments that might direct someone else in the right direction. This Quiz could be interpreted as "Pick a Random Quote, and then generate an Anagram of it, then do some minor tests and some custom printing of the results." Speedy anagram generation is not obvious. By far, the fastest implementation I've seen (and I've looked) is the wordplay program, written in C by Evan Criswell : http://hsvmovies.com/static_subpages/personal/wordplay/ Ron Coscorrosa has done a translation of this into Perl: http://coscorrosa.com/programs/cgi/anagram/ I would start from one of these sources, and modify it into the exact specs of this QotW. -- Rod Adams