random-state.net

Nikodemus Siivola

<< next | top | previous >>

Solving Einstein's Riddle with Screamer #
hacking, November 6th 2010

I added it as an example to the Screamer manual, seeing as it is a popular demo for these kinds of things:

It's completely unoptimized, but still about 20% faster on SBCL than eg. Edi Weitz's solution.

As you can see it's not nearly as declarative as a typical Prolog solution, though: Screamer's backtracking is much more explicit.

Apropos: do go and take a look at the Edi's solution if you've never seen it! In about the same line-count as I use to solve the riddle he first implements a generalized riddle-solver and then solves this riddle with it. "Cool" doesn't even begin to describe it.