Crossword Puzzle Generators
-
Ever since I first started coding, guided by a 21 Days type guide to Turbo Pascal, back in 1989, I've been fascinated with developing a crossword puzzle generator. It was only much later, when I started doing crosswords regularly that I realised the not inconsiderable complexity implied by their symmetry about two axes, i.e. all quarters have the same layout, rotated 90 degrees from each other. Has anyone else here been down this avenue before, and what can I look for, how can I prepare myself? I used to get high on life until I realized that life was cut with morons - Unknown
-
Ever since I first started coding, guided by a 21 Days type guide to Turbo Pascal, back in 1989, I've been fascinated with developing a crossword puzzle generator. It was only much later, when I started doing crosswords regularly that I realised the not inconsiderable complexity implied by their symmetry about two axes, i.e. all quarters have the same layout, rotated 90 degrees from each other. Has anyone else here been down this avenue before, and what can I look for, how can I prepare myself? I used to get high on life until I realized that life was cut with morons - Unknown
Is it allowed to give a programming answer to a non-programming question? :-D I once started developing a scrabble-playing system, that whilst not exactly the same, does pose similar questions - mostly how to go about finding words that fit into your matrix The easiest algorithm is to construct a tree where each node has 26 branches (1 for each letter of the alphabet, assuming you're not using accented characters) Each node also has a "word end" flag Initialise your tree with a single dictionary head node, and then read in your word list (you can find plenty of text files containing thousands of words, if you do a bit of searching) For each word, simply add nodes that represent the word, marking the final letter of each word with the word end flag So, adding the word "cat"
(head)->c(node)->a(node)->t(node with wordend)
Once you've read in all your words, it's incredibly quick to do brute force searches down the tree to find possible words that match already placed letters in your grid -- Help me! I'm turning into a grapefruit! Buzzwords!
-
Is it allowed to give a programming answer to a non-programming question? :-D I once started developing a scrabble-playing system, that whilst not exactly the same, does pose similar questions - mostly how to go about finding words that fit into your matrix The easiest algorithm is to construct a tree where each node has 26 branches (1 for each letter of the alphabet, assuming you're not using accented characters) Each node also has a "word end" flag Initialise your tree with a single dictionary head node, and then read in your word list (you can find plenty of text files containing thousands of words, if you do a bit of searching) For each word, simply add nodes that represent the word, marking the final letter of each word with the word end flag So, adding the word "cat"
(head)->c(node)->a(node)->t(node with wordend)
Once you've read in all your words, it's incredibly quick to do brute force searches down the tree to find possible words that match already placed letters in your grid -- Help me! I'm turning into a grapefruit! Buzzwords!
benjymous wrote:
Once you've read in all your words, it's incredibly quick to do brute force searches down the tree to find possible words that match already placed letters in your grid
I did this in vb6, but for a word-find puzzle generator My articles BlackDice