NPuzzle solver implemented in Haskell