Crossword Generator
From dandi08
Contents |
[edit] X-TREME CROSSWORD GENERATION: 2 THA MAXX
X-Treme Crossword Generation: a crossword puzzle generator written in Python.
[edit] History of X-Treme Crossword Generation
At first we wanted to generate an entire crossword puzzle at the touch of a button (probably the mouse button) but we have now decided that this goal will have to remain in the "future developments" category, at least for now.
[edit] X-Treme Crossword Generation: the Present
So, we are coding a way for a person to make a crossword puzzle with some help from the computer.
The program will prompt for a word, then prompt for a hint for that word.
As the user continually enters words, the program will fit all the words entered so far into a crossword-puzzle-type grid. It will try to do this in the most X-Treme way possible (i.e. that way which is most crossword-y). When the user enters a new word the whole crossword puzzle that exists so far might change! The reason for this is, sometimes when you get a new word it won't really fit into the existing grid, and hence, the grid must change. Also, if having the new word in the mix creates the possibility for the existing words to fit together in more optimal way (i.e. there would be less non-letter-containing boxes), then that possibility should be X-ploited 2 tha maxx.
After the user has entered as many words/hints as s/he feels/thinks is appropriate/necessary, then the program will display the blank grid along with the hints.
For three weeks of work, this degree of crossword generation seems sufficiently X-Treme.
However, there are always ways to be more X-Tremer, which brings us to...
[edit] X-Treme Crossword: The Next Generation
We hope to one day implement a feature where the program can produce a image file of the generated crossword, suitable for printing.
Also, imagine having your BFF type in a crossword puzzle, and then you get to try and solve it, right there on the computer, no printing required. The way this will work is, BFF will enter in the crossword as described in the steps above, and then you would sit in front of the computer (the same one your BFF was at, obviously) and you will enter a number and direction, e.g. 12 across. The program prints out the hint for that word, and then you get to guess at it as many times as you can stand. If you get it right, the program will update its display of the grid to include that word.
Another great feature we have fantasized about is using WordNet to produce a hint for a word.
We could get a hypernym for a given word (let's call that word W) and then use a template to produce a hint, like so:
print W, "is a type of", hypernym-of-W
We could also do templates for hyponyms, etc.