ASP level generation autoplay

Now with animation

This demo repeatedly generates and autoplays levels for the dungeon crawler toy domain at the end of the the previous post, which was in turn adapted from Chapter 8 of our PCG textbook.

It uses clingo running in the browser via clingo-wasm to generate the levels. The level generation logic ensures that the level is solvable and obeys stylistic constraints (see the previous post for details). Some Javascript code then animates the shortest path through the level.

The source code to this page is all un-obfuscated; feel free to borrow or adapt anything you find useful.

Initializing WebAssembly...