The CrossWord Puzzle Generator
You may download and install the CrossWord Puzzle Generator by clicking on the link below. To run it, unzip the file to your computer, and click on CrossWords.exe. Then follow the Instructions on this page.
Note: this program is stored and downloaded from a secure server location. Nevertheless, you, the user, assume all risks in downloading, installing, and running the program on your computer.
The CrossWord Puzzle Generator attempts to solve a crossword puzzle using words in a dictionary file for reference. You specify the puzzle size, generate the initial grid either automatically or manually, optionally enter letters and words in cells as seed values, and start the puzzle generation process. The CrossWord Puzzle Generator produces an initial solution, usually with 60% to 75% of puzzle words correct. You can update to find a better solution. You can make additional manual changes to the puzzle at any point.
Instructions (with Examples)
Click the various buttons in the steps below to observe how the CrossWord Puzzle Generator attempts to solve the sample puzzle grids at left).
Step 1: Specifying Puzzle Setup ParametersClick the CrossWord Puzzle Generator icon to launch the application. The initial screen gives you the opportunity to define the puzzle layout and other settings.
Step 2: Setting the Puzzle LayoutOnce the initial grid layout is presented based on your Setup inputs, you can make some to the grid layout. You can toggle a square between white and black by clicking in the small grey area at the top of each square. You can enter letters that you want to remain fixed throughout the puzzle generation process. If you enter an entire word, that word stays fixed, whether the word is in the puzzle dictionary or not. For example, you may input a multi-word combination, or an acronym not recognized by the dictionary, to force the CrossWord Puzzle Generator to count your word as valid.
Once the initial layout has been defined, click the button to set the puzzle grid, with any fixed letters/words. The status area at the bottom of the puzzle displays the number of valid words (green box), the number of invalid words (red box), and the total number of words (blue box) in the puzzle. The Puzzle score is calculated by summing the lengths of every word in the puzzle. The maximum score attainable is displayed in the total score area (blue box).
Step 3: Generating An Initial Puzzle SolutionNow click the button. The CrossWord Puzzle Generator attempts to generate the best initial solution, based on your seed letters and dictionary words that fit the blank squares. On the first attempt, a solution is displayed. Each successive attempt (up to the MAX Initial Attempts Setup value) that results in a higher score updates the puzzle grid and score settings. At the end of the generation process, the highest score solution is displayed in the puzzle grid. The number of valid and invalid words is updated, and the current score (white box) is displayed.
In the Random Grid example at the top, 49 out of a total of 68 words are valid; the rest will need to be corrected either manually or by Updating the result, as explained in the next step. In the Black Grid example on the bottom, a complete solution was achieved on the first try (all 16 puzzle words are valid). In this example, words from the Custom Dictionary have been used (OCEANICRIDGE, MIDOCEANRIDGES); the Standard Dictionary has been used to complete the puzzle).
Step 4: Updating A Refined Puzzle SolutionIn nearly all cases the Generation process results in a puzzle that contains invalid words. These words are displayed in red. The Update process attempts to revise any invalid words while retaining as many existing valid words as possible. Before each Update, you can make manual changes to puzzle words, as described in Step 5, or you can click the Clear button to clear all generated letters and start over (Step 3).
Click the Update button to start the Update. Calculations are performed in the background, so you will not see any puzzle updates until a higher score has been found. The checkerboard icon spinner to the right of the action buttons is highlighted during the search process. In the following example, the Random Grid puzzle at the top shows the result of the first update - 57 words are now valid. The Black Grid puzzle below shows the result of clicking the Clear button and Generating a completely different solution:
If the puzzle is not complete, as in the Random Grid example, continue to refine it by clicking the Update button, and waiting for the CrossWord Puzzle Generator to find (59 words are valid) and (61 words are valid) solutions.
Step 5: Making Manual InputsMost of the time, you will need to intervene to manually update invalid words to get to a solution. You can do this when an update has completed, or you can the update by clicking on the spinning checkerboard icon. You make manual inputs by overtyping letters (including black letters, red letters, or those squares colored green that contain fixed letters you have entered previously). Your letter entries are shown with a blue background.
After making manual changes to the puzzle, click the button again. The CrossWord Puzzle Generator updates the scores based on your changes, then continues to look for a more refined solution. In the top example, Across words 5, 9, 14, 16, and 17, along with Down words 10 and 11 were changed manually. (The valid word count is now 64).
Squares containing manually entered letters will remain fixed on successive updates unless overtyped with a blank. If you overtype an entire word, that word is treated as valid, whether it is in a Dictionary or not. In the bottom example, several manual changes are being made to the puzzle (squares with a blue background). Letter entries that you made on previous Updates are highlighted in green.
Step 6: Finalizing the SolutionAs you get closer to a complete solution (a perfect score), the search algorithms take longer to find it. This may seem counter-intuitive, but is a result of the fact that small changes ripple through the puzzle, and usually create more invalid words, resulting in a lower score. The CrossWord Puzzle Generator discards these solutions, of course. Also, the dictionary search may only find a limited number of valid words (candidates) that meet the puzzle constraints, resulting in repetition in the puzzle iterations. The CrossWord Puzzle Generator uses some more drastic techniques to find a better solution, but in the end may run out of updates, and give up.
Sometimes you can figure out a simple fix to complete the puzzle; in the example, changing 22 Down CHEF to CALF and 23 Down ALGA to AREA results in a solution.
Interrupting the Generator
CastingYou can use the Cast button to mark the valid words in the puzzle. Each marked square is treated as fixed by the CrossWord Puzzle Generator, and is displayed with a green background. A fixed square is not eligible for update unless you clear it by deleting the letter in the square. Casting is useful if you want to "lock in" the current puzzle state, so that the CrossWord Puzzle Generator works on only the squares that are not in valid words. Note that this may limit the possibility of a successful update, since there will be fewer word options to consider. Clicking the Cast button again turns off the previous Cast operation; the button acts as a toggle.
Clearing or Resetting a PuzzleYou can start over with the current puzzle parameters by clicking the Clear button, or regenerate an entirely new grid, by clicking the Reset button.
The CrossWord Puzzle Generator can search for words in text files and Excel Spreadsheet files, provided the files conform to a specific format. I've used two source word lists in the CrossWord Puzzle Generator.
See the Technical Details page for a discussion of how the application was developed, along with a link to the software documentation, and a list of known issues.
Comments, New Bugs, etc.
Please direct all comments, bug findings, etc. to email@example.com