Monday, November 9, 2015

Spirits of Elduurn puzzle solver

For a good long while now I've been working on a solver for Spirits of Elduurn puzzles.  The one I had a while ago was good for the easier puzzles, but I would run out of RAM on more difficult puzzles.  I figured it was good enough, but a twitter user, @fifteencharworld, was having trouble solving a few problems.  Peter tried solving them (since he's better at the game than I am), but he wasn't able to get them down as low as we had written down as the best move count.

I ended up working on it for a few weeks.  I'd put it down, and pick it up again a day later.  Made slow progress and finally got one of the hard levels solved after 3.5 hours of running and looking at 9.5 million concurrent paths.  Later that night in the shower I thought about how I could trim that down when I realized that there was no way I would have 9.5 million unique and useful paths.  Removed all the paths that were in the same position and had removed the same map elements and I solved that level again, but in only 2.5 seconds instead of 3.5 hours!  Tried a worst case scenario, unsolvable level with free energy in every slot except for the spirits and demon.  Took ~8 seconds.

This got me excited.  If we could have a puzzle solver that works so fast, we could put a level editor in the actual game and let people play a lot more levels!  So that's what I did.

Basic editor in action.  Still haven't asked Peter for new art.

Clearly it needs an art upgrade.  I just used the Japanese language flag button for the new buttons.  I'm working on a GUI that will let you name levels, save, load, upload, and create an account.

Peter's made a lot of changes to Siphon Spirit as well.  Lots of art and story have been added in, and I can't wait to release the demo!

No comments:

Post a Comment