Solving the Xenophage puzzle, with MATH
So me and my roommate nerd sniped each other into finding a generalized solution for the Xenophage puzzle, and it turns out there's some pretty cool math involved.
I might do a full writeup later if people are interested, but for now I've packaged all the math and my highly mediocre web design skills into a very simple page that you can just enter any puzzle state into, and it will tell you the solution (assuming one exists at all).
Here it is. Enjoy.
The source code is open, so if you want to look at the math yourself, or make a less shitty UI, you're more than welcome to do that.
Edit: the write-up is still happening, I'm still pretty sick so not in the headspace to do it today, but will update eventually.
Posted Aug 3, 2020, 7:05 PM UTC Ā· edited
r/raidsecrets might enjoy this
Will definitely post there once I have the math writeup done. It's not particularly complicated, but I want to write it in a way that doesn't require (much) background in math to understand.
You may find this post useful
It has some code, and the intro was the same! Lol
I did see it, yes. The approach we've taken is somewhat different and gives solutions faster though.
I'd love to see the math. Mine was definitely not the optimal algorithm, I was more interested in just solving the general problem. So once I figured out how to find all solutions to all puzzles, I didn't bother optimizing it. I did run some brute forcing code to make sure I found all the ones
I don't see any of the math taking a quick look through the code. It looks like it's generating a giant lookup table of all solutions, unless my glances at 3am aren't doing it justice XD
I was more interested in a technique that would scale to an arbitrary sized puzzle, where taking exponential space isn't quite feasible.
Hah. I was about to mention that :p