Stan Chesnutt's Word-Find Puzzle Generator

WordFind

As a kid, I delighted in word-search puzzles. For a while, I would publish my own puzzles in the school newspaper, so writing a computer program to generate them was one of the first programs I wrote when personal computers first became affordable.

Here is an implementation in C, which uses simple terminal I/O for input and output. To run this, you will have to compile the program using your C compiler, then run it as follows:

solve list-of-words

so, if you wanted to make a puzzle that included the names of the nine planets, enter this:

solve mercury venus earth mars jupiter saturn uranus neptune pluto

As noted in the comments, the program can sometimes get "stuck" if you enter a large number of words or a particularly difficult set of words. In that case, you'll have to kill the program and restart.

Here's what happened when I ran the program using the above list of planets:

shell$  solve mercury venus earth mars jupiter saturn uranus neptune pluto 
Words:

MERCURY JUPITER NEPTUNE URANUS SATURN EARTH VENUS PLUTO MARS 



Puzzle:

 Y G D F K L W Y D A P O Q A C O
 E M P N M Z U S S P U L R I N K
 S R K Z R E T I P U J V U P J I
 L J L M A S R B O C R R U T O H
 I P B A H S A C W B A B K L O V
 B W U Y N E P T U N E H L F H Z
 R S N R W D T N U R T Y S H U I
 Z Y I G Q E J S T R Y U Q X P U
 T L U G T B S R A M N H K W W B
 U A U J A D E E I E C E S L W W
 U Q P R H J M U V D V N H C Z F
 Z A B B W K B C Q L E U D R R B
 M J Q F S B U O H P C O T D V U
 E W V C G Y E X J J T M C K O O
 V G W P I Q E P H I F A L A V R
 W S U E R Y B A J V N M H D C F



Solution:

 . . . . . . . . . . P . . . . .
 . . . . M . . . . . . L . . . .
 . . . . R E T I P U J . U . . .
 . . . . . S R . . . . R . T . .
 . . . . . . A C . . A . . . O .
 . . . . N E P T U N E H . . . .
 . . . . . . . . U R T . S . . .
 . . . . . . . S . R Y U . . . .
 . . . . . . S R A M N . . . . .
 . . . . . . . E . E . . . . . .
 . . . . . . . . V . . . . . . .
 . . . . . . . . . . . . . . . .
 . . . . . . . . . . . . . . . .
 . . . . . . . . . . . . . . . .
 . . . . . . . . . . . . . . . .
 . . . . . . . . . . . . . . . .

It took 44 placement attempts.
words randomly placed: 1, words meshed 8, random misses 0
The code can be found here.

return to Stan Chesnutt's webpage

$Header: /home/cvs/htdocs/stan/solve.html,v 1.3 2006/01/03 16:02:43 chesnutt Exp $