makepuzz.icn: Program to make find-the-word puzzle

May 2, 2001; Richard L. Goerwitz
This file is in the public domain.
   This program doesn't do anything fancy.  It simply takes a list
of words, and constructs out of them one of those square
find-the-word puzzles that some people like to bend their minds
over.  Usage is:

    makepuzz [-f input-file] [-o output-file] [-h puzzle-height]
       -w puzzle-width] [-t how-many-seconds-to-keep-trying]
       [-r maximum-number-of-rejects] [-s] [-d]

where input-file is a file containing words, one to a line
(defaults to &input), and output-file is the file you would like the
puzzle written to (defaults to &output).  Puzzle-height and width
are the basic dimensions you want to try to fit your word game into
(default 20x20).  If the -s argument is present, makepuzz will
scramble its output, by putting random letters in all the blank
spaces.  The -t tells the computer when to give up, and construct
the puzzle (letting you know if any words didn't make it in).
Defaults to 60 (i.e. one minute).  The -r argument tells makepuzz to
run until it arrives at a solution with number-of-rejects or less
un-inserted words.  -d turns on certain diagnostic messages.

    Most of these options can safely be ignored.  Just type
something like "makepuzz -f wordlist," where wordlist is a file
containing about sixty words, one word to a line.  Out will pop a
"word-find" puzzle.  Once you get the hang of what is going on,
try out the various options.

    The algorithm used here is a combination of random insertions
and mindless, brute-force iterations through possible insertion
points and insertion directions.  If you don't like makepuzz's per-
formance on one run, run it again.  If your puzzle is large, try
increasing the timeout value (see -t above).

Source code | Program Library Page | Icon Home Page