Generate puzzles for Alcazar or hand-craft your own variations.

Created by Kathleen Tuite and Adam Smith.


Create your own Alcazar puzzles and test them out. Good luck figuring out the quirks of the input format; it took us a while. You might just want to use the puzzle generator. If you do master it, try making fun diagonal walls or super-thick long-distance walls. We're not sure what to do with those.

Alcazar is made by The Incredible Company.


Pick a grid size and customize the random seed. Then invoke our puzzle generator. It is written using a constraint-programming technology called answer set programming (ASP). In particular, it uses a version of the Potassco tools (Gringo and Clasp) compiled from C++ into JavaScript using Emscripten.

Puzzles are designed with a few interesting requirements:

  • There is exactly one solution to the puzzle
  • No more than a third of all possible walls are placed
  • Alternate solutions that include closed loops are also considered when evaluating solution uniqueness (they are completely valid from a generation perspective, but they never occur in the official puzzles).

If you have some answer set programming experience, try using the "reveal generator" link to access -- and modify -- the formulation used during live generation. The answer set solver simply runs whatever program is in that textarea. The javascript-based solver technology has a huge startup overhead and slow execution speed. A monster 16x16 puzzle should be generatable in a fraction of a second if you run a native version of the solver.

The maximum puzzle size is set at 10x18 in our interface because larger puzzles seem to blow over Emscripten's default heap size. We weren't particularly tempted to modify it because the solver is made out of about 5MB of nasty machine generated JavaScript right now.

Published Nov 18, 2014
CategoryGame mod