Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(6 edits)

Great stuff! Would be nice if the “Next Level” button consistently scrolled to the “Level Goal” paragraph. Currently it sometimes scrolls all the way up and sometimes doesn’t at all, and I couldn’t find any regularity.

Edit: I’m almost done, and on the final two levels limit on the test simulation is not enough. I had to add redundant fractions for moving hundreds of exponents because moving 765 of them one by one (for the 2^567 reversal) exceeded step limit.

Edit2: It can’t be just the limit, as the 2^1234 case terminates within 1000 steps but the test case reports a loop:

My current reversing program (first rule to make 2^567 terminate in time):

3^100*11/7^100*11, 3*11/7*11, 5*11/2^10*11, 7*19/2*11, 13/11, 7*19/2*19, 17/19, 7^10*17/3*17, 2*17/5*17, 11/17

A loop is also reported when I cheat and enter a rule 3^4321*13/2^1234*11, suggesting it may have something to do with number sizes. Is the source for this available?

(+1)

I second this, the 2^1234 test in the reversal level always reports loop, even when the only instruction is 3^4321*13/2^1234*11

Thanks! Nearly everything is stored in terms of prime factorizations, except the loop detector uses their calculated values as javascript numbers. All of these large numbers 2^1234*11, 3^4321*13, 2^1134*31 evaluate to infinity, which we've seen before, so the loop detector thinks we're in a loop. And, yes, the maximum step limit is also too small. This should be an easy fix. The interactive is just an html file in an iframe, so you can just view its source directly. I didn't apply any compilation or obfuscation to the code.

(+1)

I believe I have fixed the loop detector to correctly handle terms that evaluate to infinity. I've also added a "Max Iterations" input box so you can increase the number of iterations before the simulation gives up.