Algorithmically Generated Crosswords: Building something 'good enough' for an NP-Complete problem
Photo by Sigmund on UnsplashGenerating crossword puzzles is NP-Complete. Every cell where two words intersect creates a constraint that both words must satisfy, and those constraints multiply across the grid into a combinatorial explosion. There’s no efficient algorithm that guarantees a solution—but with the right heuristics, you can build something that works surprisingly well.
In late 2021, deep in lockdown, my NYT Crossword obsession turned into a side project. I wanted to build a crossword app, realized I needed puzzles, tried making them by hand, found that tedious, and wondered: could I generate them algorithmically? Earlier this year, I finally shipped Crosswarped on iOS and Android — a crossword game powered by the generator I’ll describe here.
Read more →