I used minizinc to try and generate levels for my puzzle game by encoding the rules.
It worked quite well for the more trivial rules, but as I added more complex rules, it wouldn't solve within reasonable time.
Unfortunately I didn't really figure out how to direct the solver in way that would speed up things.