EXAPUNKS

EXAPUNKS

View Stats:
the true solution challenge.
hello fellow exapunks. over the past few months I have discovered an interesting pattern amongst level solutions: the most optimized solutions for any level will have a size less than half of the target size, and, the size will be an even number. this has led me down a rabbit hole of redesigning my solutions and even led me to a new style of solution design that i call: mobius looping. mobius looping is a method where you create an open ended loop that lets the control flow feed into another loop seamlessly using REPL instructions. the results of using this method are truly fascinating and i'm curious to see how many solutions can actually meet this challenge.
< >
Showing 1-6 of 6 comments
can you post some code examples?
so my first solution that used mobius looping was the library level. my original solution was 72 lines but then i came up with this idea of using REPL to create a loop. so the program starts by skipping past a label that begins the loop, it grabs file 300, copies the first value into X then deletes that value out of the file. then it drops the file and clones itself so the clone will start at the beginning of the code. once the file runs out of values the last clone will simply terminate itself because it has nothing to read. completing the loop. however because of the open-ended nature of this the control flow feeds into the travel loop where it travels to the target host. doing this and a couple other optimizations helped me slim it down to 36 lines, then i redid the return loop to get it down to 34.

MARK START
GRAB 300
COPY F X
SEEK -1
VOID F
DROP
REPL START
LINK 800
MAKE
SWIZ X 3 T
MARK TRAVEL
LINK 800
SUBI T 1 T
TJMP TRAVEL
SWIZ X 421 T
ADDI T 200 T
REPL CLONE
MARK COPY
COPY M F
SEEK -1
TEST F = 1
FJMP COPY
SEEK -1
VOID F
MARK RETURN
LINK -1
JUMP RETURN
MARK CLONE
GRAB T
MARK PLAGERIZE
COPY F M
TEST EOF
FJMP PLAGERIZE
COPY 1 M

this second solution is my personal favorite use of this concept, this is for the first bank level. the program uses a mobius loop by creating a stopping condition with the T register. it travels to the target host and starts the clone loop. because the T register is already true it will only skip to the loop label when the subi commands eventually set T to false. the REPL command makes a clone which will attempt to make the same evaluation while the original travels the link specified by T and because it's open-ended the control flow feeds into, well, the LOOP loop; where it'll bleed the ATMs dry and then promptly terminate itself because it has nothing left to do. it's all very efficient because all of this processing is happening simultaneously. and it's only 14 lines compared to my orignal 40 that my first version of this solution was.


COPY 807 T
@REP 3
LINK 800
@END
MARK CLONE
FJMP LOOP
SUBI T 1 T
REPL CLONE
LINK T
COPY #CASH T
MARK LOOP
COPY 20 #DISP
SUBI T 1 T
TJMP LOOP

will this solve every puzzle? probably not. but it's helped me with a few of them. i hope it helps you or anyone else that wants to partake in the challenge
interesting solutions, have to compare them to mine
And here i was tampering with MODI and DIVI instructions to get the proper host and book numbers and i didn‘t know Swizzle could do that much more easily.

Regarding your moebius concept i am not sure i understand it well but it seems to me it is mostly useful for multiple targets puzzle (like library or bank as you pointed out).

Your bank solution seems pretty short and efficient (using T to count down is a neat optimization)
For the library my best solution uses 37 lines (317/37/71) with my «unskilled random guy» approach so not far form your moebius design.

Have you found application for Trash World News for example ? In this case i am not sure how generating Clones would help.

Interesting approach none the less !
the idea behind mobius looping is that you're exploiting the games' mechanic of "if an EXA tries to perform an action that isn't available it'll error out and die". normally you'd have 1 EXA to perform a set of actions in a loop, but this may involve that EXA dropping files or jumping to other sections of code. with mobius looping you can cut out some of this unnecessary code by having one EXA perform one set of instructions and then handing the workload off to another EXA until you can reach a specified stopping condition. for the purposes of the challenge reducing lines is important so any means of doing so will be helpful; take for instance this solution for the baseball level. the stopping condition here is actually the end of the file but uses X to get there. the max size for this level is 100, so half would be 50. the normal solution of dropping a file and then jumping to the COUNT label is 49 lines where as using this method is 48 which meets the condition of the challenge.

XA
LINK 800
MARK COUNT
GRAB 199
SEEK X
ADDI X 1 X
TEST EOF
FJMP CALC
COPY -1 M
MARK CALC
COPY F T
DROP
GRAB T
COPY 0 M
COPY F M
ADDI F F T
ADDI F T T
DIVI T 3 M
MULI F F T
DIVI T F M
SUBI F F T
MULI T 20 M
REPL COUNT


XB
MAKE
COPY 0 F
COPY 0 F
MARK LOOP
TEST M = -1
FJMP ALLSTAR
SEEK -1
VOID F
HALT
MARK ALLSTAR
COPY M F
ADDI M T T
ADDI M T T
ADDI M T X
SEEK -2
TEST F > X
FJMP LESSER
VOID F
JUMP LOOP
MARK LESSER
SEEK -2
VOID F
VOID F
SEEK 1
COPY X F
JUMP LOOP

you could also take this example for the redshift level. instead of having to rely on MRD instructions and figuring out whether you've broken the lock you can use mobius looping to efficiently try a passcode and attempt to link. doesn't work? well that's ok you already have another exa doing the same thing with a different code. and the whole program is only 20 lines, so less than half max size and even number.

LINK 800
MAKE
REPL DECRYPT
COPY M X
@REP 3
SWIZ X @{-3,1} F
@END
COPY M F
KILL
LINK -1
MARK DECRYPT
SUBI X 1 X
@REP 3
SWIZ X @{-3,1} #PASS
@END
REPL DECRYPT
LINK 800
GRAB 199
COPY X M
COPY F M
for the trash world news level i haven't found a solution that meets the challenge, but it is 19 lines
< >
Showing 1-6 of 6 comments
Per page: 1530 50