Comment by bills-appworks
Comment by bills-appworks 5 days ago
Author here — I built this app with Svelte.
Its simplicity and the straightforward reactivity model fit the kind of UI updates this game needs.
Interestingly, one of the beta users already derived a closed-form solution for the puzzle (I still don’t know the details myself).
Because the game only shows Euclidean distances rounded to two decimals, very large coordinate ranges (e.g., 3‑digit values) introduce enough rounding error that an exact solution becomes impossible in some cases.
For an easy strategy, guess all zeros at first. Call resulting distance E1 and let S1 = E1 × E1.
Now guess with X = 1, rest still zero, obtaining S2. We can calculate X = (S1 - S2 + 1)/2.
Now guess (X, 1, all zeroes). Do the same calculation as above to obtain Y, except use S1 - X × X in place of S1.
You can repeat as needed for the other coordinate(s). However, the last coordinate requires no guessing since it's a known straight line distance from an extremal point. So you can calculate it directly (e.g., W = sqrt(S1-X×X-Y×Y-Z×Z) for 4D).
This guarantees you can solve any 4D in 5 guesses.
For the case you mention with rounding, I'm pretty sure it's still possible. If your probing guess for each coordinate uses the maximum value instead of 1 (e.g., 999 for 3 digits), it'll ensure that at least one guess is 500 away from the correct value, making at least one of them very sensitive to the exact distance. Then you do something like X=(S1 - S2 + 999×999)/(2×999). This likely breaks down in high enough dimensions (guessing 100+) due to distance being less sensitive on average to wild perturbations in any one coordinate. There might also be issues with intermediate rounding while calculating the distance if using doubles or similar.