Regular Expression Crossword Puzzle
gregable.com
gregable.com
The default puzzles are a bit basic, but there's a large amount of player-created puzzles that are great.
http://www.mit.edu/~puzzle/2013/coinheist.com/rubik/a_regula...
The Haskell code is also on GitHub
Perhaps converting each regex into a DFA, but there are too many dependencies with all the other regexes. Any ideas on how to avoid brute forcing it?
One method of solving a CSP is to keep a set that initially contains all of the variables. On each iteration you choose a variable from the set and remove all values in its domain that are impossible given the constraints containing the variable and the domains of the other variables in those constraints. Then you add all of those other variables to the set because they are now restricted more than before. You keep doing the above until you get stuck (which may or may not happen). You then start guessing. There are a bunch of heuristics about how you should choose which variable to guess (eg the variable with the smallest domain). Once you have made your guess, you then add all of the variables back to the set. If you find out the puzzle is impossible, you backtrack to the last guess you made. I believe there are ways you can determine which guess was the problem and immediately backtrack to there.
[1] http://www.amazon.com/Principles-Constraint-Programming-Krzy...
https://github.com/ekmett/ersatz/tree/master/examples/regexp...