Steve's Wordsearch Puzzle Maker. By [1]Steve Baker Introduction. Find the following words in the grid below: A, C++, COMPILER, IS, NEEDED, IN, ORDER, TO, COMPILE, THIS, PROGRAM, BUT, IT, SHOULD, RUN, ON, ALMOST, ANY, COMPUTER, OR, OPERATING, SYSTEM, INCLUDING, LINUX, MICROSOFT, WINDOWS, IRIX, AND, SOLARIS, ============================================ H N I D A G S M R P N + S E N I + R R C H Y S X S C H E N X E N Q S I A N M H I H N W S + E R C N F X N S B O M S L X N P S S L P I Y D E O U O N Y N M A H T U C G N T A E L T N O S H P M E D S G R I H A D A O H T T S E D I O C O M P I L E R U S G E I S N O + S T E F S H D I M N P M S G O + W E E H S N E A S I N M D S C C O M P U T E R L X N R O A N W S D A C H S G M U C E R O I E M I N S R O O O N S N M + X O E G U I O U R M I C R O S O F T A L N W I P G L L M G + M M T U S S N O P E R A T I N G F R P S F This program makes wordsearch puzzles like the one above. Unfortunately, it doesn't show you the answer! Installation: ./configure make make install If you are running Windoze or something that can't run configure scripts and makefiles, don't sweat it. There is just one C++ source file - no special options or libraries. No, I won't provide a binary version, project files and such. License: This program is offered under the terms of the GNU Public License (GPL). Instructions: This program reads uppercase words (one per line) from standard input and hopefully emits a wordseach puzzle containing those words to stdout. eg: wordsearch < words The program usually manages to fit between 30 and 45 longish words into a 16x16 grid (which is the default). Since its search for places to put words is somewhat random, it may take many tries to fit them all in. Obviously, you shouldn't use words that are larger than the grid size. If it takes more than a minute or so to finish then it's probably never going to find a setup that - so kill the program, delete a word or two and try again. I usually start with about 35 words and add more or take some away until they all fit after a couple of minutes run time. However, if you really need to get every word of your company's mission statement into the puzzle, you can let it run overnight - who knows you might just get lucky! Hints: The program tries to maximise the overlap between words - so that the wordsearch will be as tangled as possible. It also prefers to fill up the unused spaces in the grid from letters taken from elsewhere in the grid. That makes it all harder because there tend to be more locations that look like they might be words. However, it does toss in some totally random letters. Try for some nice long words - seven and eight letter words pack in quite nicely. If you have too few words and/or a grid that's too large, it makes it easy to find all the words once you have located one of them. You don't have to stick with uppercase A through Z, you can add other printable characters (like the '+' signs in the example above). However, since the program always adds in a bunch of random uppercase characters, this isn't truly ideal. However, if you are really into such things, you can make 'NumberSearch' and 'RandomGarbageSearch' puzzles. Changing the Parameters: Sorry - I'm too lazy to make command line parameters for such a simple program, so to change it's setup, you have to recompile it. At present, the program is hardwired to generate a 16x16 grid. However, you can edit the GRID_SIZE definition in the source code to change that. Also, by default, the program is set up so it won't put the words into the grid backwards (ie running from right to left) of diagonally backwards and up or down). This behaviour is determined by the constant 'HARDNESS'. Set hardness to 1 and all the words will run strictly from left to right with no diagonals or anything. Increasing hardness to values up to and including 8 will make the words run in increasingly harder to spot directions. Hardness Possible word directions. 1 EAST 2 EAST,SOUTH 3 EAST,SOUTH,SOUTH_EAST 4 EAST,SOUTH,SOUTH_EAST,NORTH_EAST 5 EAST,SOUTH,SOUTH_EAST,NORTH_EAST, NORTH 6 EAST,SOUTH,SOUTH_EAST,NORTH_EAST, NORTH,WEST 7 EAST,SOUTH,SOUTH_EAST,NORTH_EAST, NORTH,WEST,NORTH_WEST 8 All Directions. The default hardness is 6 which prevents words from coming out backwards. References 1. mailto:sjbaker1@airmail.net