I tried to use aider
to build a crossword generator in Python.
Even with a preselected set of words, this proved difficult.
Or perhaps the preselected set of words was why it was difficult.
Either way, the AI model doesn’t really understand the concept of word overlap in the context of a crossword.
That seemed solvable.
Instead, I had it write code to precalculate word overlap from the word list, then use that to place the words.
The program seemed to hang indefinitely.
Adding debug statements revealed extensive looping and attempts to place words that likely couldn’t fit within the constraints of the puzzle.
I had selected a group of words around the theme “celestial bodies” without considering their potential for overlap.
It was probably impossible to place them all.
I came away from this experience with a deeper appreciation for the complexity of working within the constraints of a crossword. The fact that the AI model struggles in this area seems quite understandable. The tool Crosswyrd further demonstrates how tight these constraints can be. When I placed a few words in various spots within a puzzle template, I quickly discovered that there were only a few very specific options that could fit in certain slots.