Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
GuavaMoment
Aug 13, 2006

YouTube dude
Do you have the physical version of this game?

Good luck getting through all the levels! There's one in particular at the end only 3 of my steam friends have beaten.

Adbot
ADBOT LOVES YOU

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

As it turns out, this is actually the best solution possible for this assignment.

It's not, you can do it in 12 cycles. It's complicated. Glancing at my code it has something to do with storing two values of your order, using the CHEESE that's always there in the file, then transmitting the last two values. The rest is an exercise for the reader. :)

You wouldn't hack your own body?

GuavaMoment
Aug 13, 2006

YouTube dude
You get used to it
This is a lovely haiku
This is so silly

Quackles posted:

There is a way to be very clever here: it turns out EXAs have built-in clamping functionality. If a number goes above 9999 or -9999, it is set to 9999 or -9999. Integer division also truncates, making a multiply/divide ideal for clamping.

124 / 14 / 6.

My best is 123/14/6 by adding and subtracting 9949 (and then subtracting and adding 9879) to every number. However, some of my wizard steam friends have scores of 36 cycles - that's about how fast you could simply feed numbers from one location to the other, so I imagine there's some kind of state-machine-esque solution here.

Carbon dioxide posted:

Interesting. I attempted this but couldn't make it work. You could start with an EXA that stores the first two values in X and T, then REPLs, write those two into a file, and meanwhile another EXA grabs the "Cheese" from file 280. But no matter what I tried it would take more than 13 cycles.

OK, there's some really slick M register copying and timing going on here, but you do have to store "Cheese" from the original file first.

code:
X1:

LINK 800
GRAB 200
SEEK 2
COPY F X         ***(stores CHEESE)
SEEK 9999
COPY M F
COPY M F
COPY X F
COPY M F
COPY M F


X2:

GRAB 300
COPY F X
COPY F T
REPL SEND2
VOID F
COPY F X
REPL SEND1
NOOP
NOOP
COPY F M
HALT

MARK SEND2
COPY X M
COPY T M
HALT

MARK SEND1
COPY X M

GuavaMoment
Aug 13, 2006

YouTube dude

GuavaMoment posted:

My best is 123/14/6 by adding and subtracting 9949 (and then subtracting and adding 9879) to every number.

Oh, I can get 96/50/6 by unrolling some loops, I guess I never went back to this one to try advanced concepts.

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

If there are further improvements possible, I don't know them.

Unroll the loops! Instead of FJUMPing to the start of the loop you're going to have to TJUMP to an end condition (which is SEEK -1, VOID F). This will get you 27 cycles.

You can save one more cycle by not having the line COPY M X and testing over M every time. One exa grabs file 300 and constantly sends PEANUTS over M. But how does that exa know when to stop? It doesn't. You have a third exa wait exactly 21 cycles and KILL your transmitting exa. Five cycles later you complete the level, worst case scenario. 26/45/3


There's a really good pun over the name Snaxnet but that should come into play in the next Snaxnet level.

GuavaMoment
Aug 13, 2006

YouTube dude

silentsnack posted:

For whatever reason, the distribution of file lengths and position of the target line make the longest solution faster to find by jumping to the end and searching backwards, even with the added time to get the file pointer into the right position this one runs 55/50/4.

Huh. I'd never done that, so I modified my fastest solution, and got 54 cycles. Then I realized I could again test over M every time, and that saved one more cycle. You have to perfectly time a kill command once again, but that exa has nothing but time to set that up. 53/41/7

code:
XA

LINK 800
GRAB 200
SEEK 9999
SEEK -3
TEST M = F
TJMP TRUE
MARK LOOP
SEEK -4
TEST M = F
FJMP LOOP
MARK TRUE
COPY F M
COPY F M
SEEK -2
COPY 0 F
COPY 0 F


XB

GRAB 300
COPY F X
REPL SENDY
WIPE
LINK 800
GRAB 201
LINK 801
SEEK 9999
COPY #DATE F
COPY X F
COPY 0 X
LINK -1
LINK -1
MARK WAIT
ADDI 1 X X
TEST X = 10
FJMP WAIT
KILL
COPY M F
COPY M F
LINK 800
HALT

MARK SENDY
COPY X M
JUMP SENDY

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

93/43/3

I have to say, this feels pretty optimized. But I said that about other assignments too and you came up with something I hadn't even thought of. So let's see!

You can have one exa feeding in the row data:
code:
LINK 800
MARK LOOP
DIVI X 9 #DATA
ADDI 1 X X
JUMP LOOP
One feeding in the column data:
code:
NOOP
LINK 800
MARK LOOP
MODI X 9 #DATA
ADDI 1 X X
JUMP LOOP
One feeding in data from the file
code:
GRAB 300
NOOP
LINK 800
MARK LOOP
COPY F #DATA
TEST EOF
FJMP LOOP
WIPE
and one to kill everything at the end
code:
NOOP
NOOP
NOOP
LINK 800
COPY 25 X
MARK LOOP
TEST X = 0
SUBI X 1 X
FJMP LOOP
KILL
KILL
86/30/6, still one cycle off top percentage though...

GuavaMoment fucked around with this message at 23:00 on Jan 22, 2022

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

code:
GRAB 300
LINK 800

MARK LOOP

DIVI X 9 #DATA
MODI X 9 #DATA
COPY F #DATA
TEST X = 26
TJMP DONE
ADDI X 1 X

JUMP LOOP

MARK DONE
WIPE
Just check if X is 26, because at that time the sign is full and we're done. Then jump out of the loop and WIPE the file. It works - but it does add two cycles to every loop.

Also here you can just test for EOF instead of X, then change TJMP DONE to FJMP LOOP. Remove the ADDI and JUMP lines to get a 10 line solution.

GuavaMoment
Aug 13, 2006

YouTube dude

I've also got an 83 cycle solution now. Sending file 300 data over M saves a cycle from not having to wipe the file. I have a bunch of killer exas though and the solution is entirely dependent on exa ordering (which I found from trial and error) so the right exas get killed at the right times to save the last two cycles. It's clunky but it works.

Carbon dioxide posted:

Your suggestion is basically equivalent to the 10-line solution I show in my update, right?

Yes, whoops, I missed it. :P

GuavaMoment
Aug 13, 2006

YouTube dude
My fastest solution is fundamentally identical to yours, I've just found a few cycles to squeeze out of some places, and I squoze one more cycle out from the seek 124 trick; I was previously seeking to the end and going backwards through the files. 89/70/7

code:

XA:

LINK 800
LINK 800
LINK 800
COPY M X
REPL TEST
LINK 800
LINK 800
REPL TEST
LINK 800
LINK 800
MARK TEST
HOST T
TEST X = T
FJMP TX
GRAB 200
SEEK 124
COPY M X
MARK SEARCH
SEEK 2
TEST F = X
FJMP SEARCH
COPY F X
COPY F T
COPY T M
SEEK -999
SEEK X
@REP 14
COPY F M
@END
SUBI T 14 T
MARK TX
COPY F M
SUBI T 1 T
TJMP TX


XB:

GRAB 300
COPY F M
COPY F M
DROP
MAKE
COPY M T
@REP 14
COPY M F
@END
SUBI T 14 T
MARK TX
COPY M F
SUBI T 1 T
TJMP TX

Carbon dioxide posted:

Part 12.5 - ПАСЬЯНС

Russian is difficult, but Cyrillic is rather easy when you're dealing with nouns or english loanwords, it only took me like a week of vacation immersion to pick up the letter substitutions.

П is the symbol for Pi, so is a P
A is A
C becomes S in Cyrillic
Ь can pretty much be ignored, it does some kind of modifier to the previous letter I don't understand?
Я can be replaced with "ya"
H becomes N

which makes this word PASYANS, and if you say that in a thick Russian accent you can see how it's supposed to be 'patience".

GuavaMoment fucked around with this message at 18:42 on Feb 5, 2022

GuavaMoment
Aug 13, 2006

YouTube dude

silentsnack posted:

And you don't necessarily have to find the correct host since the filename is unique.

Oh yeah, completely remove that part of the code and the files in the wrong host die on their own. That saves 4 cycles.

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

And that's where I'll stop. The top percentile is 218 so let me know what further improvements are possible.

My 216 solution is not elegant. Mostly identical to yours, but I run 21 lines of "Copy 75 F", until X < 2500, where I run 9 lines of "Copy 75 F" until X < 750, then keep alternating between copying 75 and testing every time until X is zero.

Next assignment: I do something very similar.

Your suggestion got UC Berkeley down to 84 cycles, thanks!

GuavaMoment
Aug 13, 2006

YouTube dude
So first off you can get a 12 line, 10 activity solution with this by combining some tricks:

code:
LINK 800
LINK 800
LINK 800
COPY 807 X
MARK CLONE
MODI -1 X X
REPL CLONE
LINK X
MARK CASHGET2
COPY 20 #DISP
DIVI 999 #CASH X
JUMP CASHGET2
Yeah, you create 807 exas, but it works! MODI -1 0 X kills the exa.

For getting things fast, you need lots of loop unrolling, so I populate the exas differently that doesn't need a killer. It's a tiny bit slower to do that task but saves a bunch of lines, making things overall faster. Why giant loops of 21 and 8? No idea, ask me years ago when I did this by trial and error until it worked. Why do I test for #CASH > 29 even at a time when I know it's not? No idea, but it's faster! 1102/50/10

code:
LINK 800
LINK 800
LINK 800
COPY 806 X

MARK CLONE
REPL CASHGET
SUBI X 1 X
TEST X = 800
FJMP CLONE

MARK CASHGET
LINK X

MARK SPILL
@REP 21
COPY 20 #DISP
@END
MARK TENS
@REP 8
COPY 20 #DISP
@END
TEST #CASH > 29
TJMP SPILL
TEST #CASH > 8
TJMP TENS

MARK CASHGET2
COPY 20 #DISP
DIVI 999 #CASH X
JUMP CASHGET2

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

The top percentile value is 24 so further improvement is possible but I'm not sure what.

23 Lines by having a main EXA send out AVN and SAN pairs. In pairs, the first value (AVN) is -70, then two 40 values (SAN then AVN), then -70 until you're done. AVN and SAN exas die graciously by trying to link to a non-existent node or just by running out of code. And a swizzle for style points.

code:
LINK 800
COPY -70 X

MARK COPY
SWIZ #NERV 2 T
ADDI 1 T T
REPL AVN
COPY 40 X

MARK REPL
REPL SAN
REPL AVN
COPY -70 X
ADDI 1 T T
TJMP REPL
REPL SAN
JUMP COPY

MARK SAN
LINK 1
LINK 1
COPY X #NERV

MARK AVN
LINK 3
LINK 3
COPY X #NERV
My low cycle solution was much worse than what you did.

Late edit: As pointed out a few posts below, change REPL SAN and JUMP COPY lines with REPL COPY to save one more line.

GuavaMoment fucked around with this message at 22:54 on Feb 26, 2022

GuavaMoment
Aug 13, 2006

YouTube dude
This level is pretty straightforward without any neat tricks.

code:
XA:
GRAB 300
MARK LOOP
COPY F X
REPL REPL
COPY F M
JUMP LOOP
MARK REPL
LINK 800
LINK 799
GRAB 212
MARK LOOP2
TEST F = X
FJMP LOOP2
SEEK -1
COPY M F

XB:
LINK 800
GRAB 200
LINK 800
Find a keyword, make a copy to go change that keyword, repeat. 18 lines, saving 3 over yours. Sorry about naming my copies REPL all the time.

code:
XA:
GRAB 300
COPY F M
LINK 800
COPY F M
COPY F M
LINK 799
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F X
WIPE
COPY X M
KILL

XB:
NOOP
LINK 800
GRAB 200
LINK 800

XC:
LINK 800
LINK 799
GRAB 212
MARK LOOP
COPY M X
MARK LOOP2
TEST F = X
FJMP LOOP2
SEEK -1
COPY M F
SEEK -999
JUMP LOOP
Loop unrolling and transmitting data as fast as possible. The search takes the most time and it's hard to speed up. 540/32/7 a one cycle improvement (which I think comes from knowing how many keywords there are and wiping before transmitting the final keyword?)

GuavaMoment
Aug 13, 2006

YouTube dude
Hacker battles are a neat idea, buh ehh.....it's seemingly impossible to make a robust solution. It's like trying to optimize rock paper scissors, you're always going to be vulnerable to one tactic when using another.

GuavaMoment
Aug 13, 2006

YouTube dude
Huh, you know I tried searching backwards for the keywords at one point since I noticed the same issue - one test has all the keywords near the end. It didn't work out for me. I'm shocked it works at all, the search is 50% slower due to the extra SEEK command.

GuavaMoment
Aug 13, 2006

YouTube dude
Start at 967 in X, make a new exa, subtract one from X and make another new exa forever. The new exa inputs the code stored in X and attempts to go into the secret node. It either makes it or fails and dies. Nothing terribly fancy, 2880/28/10

You can make a 19 line solution, again no real tricks...

code:
LINK 800
MARK REPL
ADDI X 1 X
SWIZ X 1 #PASS
SWIZ X 2 #PASS
SWIZ X 3 #PASS
REPL REPL
LINK 800
GRAB 199
COPY F T
DROP
MAKE
SWIZ X 1 F
SWIZ X 2 F
SWIZ X 3 F
COPY T F
LINK -1
KILL
LINK -1
...aside from leaving incorrect files in your home node, but as long as one of them is correct it works. I played the entire game naming my REPLs as REPL. I wonder if there is a fancy MODI command to cycle through every number and have that exa die on it's own at some point instead of using ADDI X 1 X. That would save the need for the KILL command.


Edit: You have the bog witch's approval, complete the rite of passage!

GuavaMoment fucked around with this message at 18:32 on Mar 19, 2022

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

By the way I didn't want to bring it up in the update but I'm wondering how you managed to count down from here while silentsnack's solutions hardcode a check up till 990. Or do those do the digits in different orders? :thunk:

No idea. Spacechem has different properties on different platforms, so maybe he's not on windows?

GuavaMoment
Aug 13, 2006

YouTube dude
Ok, I see I swizzle in the order 1, 3, 2 from 976, so I input 796, 696, 596....096, 995, 895...
Why do I do this? I don't know, but it works. I guess I'm a real computer engineer!

GuavaMoment
Aug 13, 2006

YouTube dude
My fastest was 251 cycles, so you've done better. My lowest size was 31 but was functionally identical to your 26 line solution, it only required a tiny bit of tweaking. I was still checking if my exas were in the correct place instead of YOLOing trying to grab non-existent files. So I have nothing to add.


Never ask an indie musician why their parents names are blue on wikipedia.

GuavaMoment
Aug 13, 2006

YouTube dude

silentsnack posted:

code:
ADDI F 2000 X

Huh? The heck is this for?

code:
SWIZ X 421 X
Oh, that's really clever!

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

Since I spent a lot of time getting the cycles down to 122, I'll leave the low size optimization to the threads.

Seeking back 6 and copying over the last six entries is a good trick and that got me down to 122 also. I only had a 32 line solution so thanks for the help on that one too silentsnack!

I'm really looking forward to the next level as I liked it a lot, and spent a lot of time on it. I'm still chasing down one cycle I know is possible, so maybe you all can help?

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

This clocks in at 47/27/20. I'll leave the further improvement to the top percentile size of 25 lines to the threads.

25 lines? How about 18.

code:
GRAB 300
COPY F X
WIPE
COPY 800 T
MARK MAIN
LINK T
REPL MAIN
GRAB 200
ADDI T 1 T
REPL MAIN
MARK TEST
TEST F = X
FJMP TEST
COPY F X
COPY X F
COPY X F
COPY X F
COPY X F
Floods the entire map and checks every node. EXAs die when there isn't an 800 or 804 node to go to, or the file is held by a previous exa.

As for speed, 24/46/31:

code:
GRAB 300
COPY F X
LINK 800
MARK MAIN
REPL TOP3
REPL TOP2
REPL TOP1
REPL RIGHT2
REPL RIGHT1
REPL LEFT2
REPL LEFT1
WIPE
JUMP EDDY
MARK TOP3
LINK 801
MARK TOP2
LINK 801
MARK TOP1
LINK 801
REPL RIGHT2
REPL LEFT2
REPL RIGHT1
REPL LEFT1
JUMP EDDY
MARK RIGHT2
LINK 802
MARK RIGHT1
LINK 802
JUMP EDDY
MARK LEFT2
LINK 800
MARK LEFT1
LINK 800
MARK EDDY
GRAB 200
TEST F = X
TJMP STARS
SEEK 5
TEST F = X
FJMP EDDY ; this kills the exa when it's in the wrong node
MARK STARS
COPY F X
COPY X F
COPY X F
COPY X F
COPY X F
The farthest nodes need directed EXAs as soon as possible, so I create the farthest east EXA first, then furthest south, then north. All the outer nodes get checked first (cycles 11 and 12), and 10 central nodes all get checked on cycle 13. I know faster times are possible but I just cannot figure it out. I don't know if I can fill the grid faster, and I don't know actually using the coordinates of the correct Eddy's could help.

GuavaMoment
Aug 13, 2006

YouTube dude

silentsnack posted:

"depends on which cycle you mean" and/or "maybe you can figure the rest of this mess out" because 23 is feasible with a bit of effort and paying attention to order of operations, so i'm blaming you for this one:

I'm not picky, it could have been any cycle. :) If one exa is filling the map it's the same speed to read and wipe the file, or travel first and have another exa transmit over M. But I see now if you have two exas receiving M data, one can fill the three eastern columns and one can then fill the first north column, and this is one cycle faster. There is an order of operation issue to make the three column exa get the M data first, but this just squeaks it out.

23/75/30
code:
;xb
LINK 800
LINK 801
COPY M X
REPL TOP2
REPL TOP1
REPL RIGHT2
REPL RIGHT1
REPL LEFT2
REPL LEFT1
JUMP EDDY
MARK TOP2
LINK 801
MARK TOP1
LINK 801
REPL RIGHT2
REPL LEFT2
REPL RIGHT1
REPL LEFT1
JUMP EDDY
MARK RIGHT2
LINK 802
MARK RIGHT1
LINK 802
JUMP EDDY
MARK LEFT2
LINK 800
MARK LEFT1
LINK 800
MARK EDDY
GRAB 200
TEST F = X
TJMP STARS
SEEK 5
TEST F = X
FJMP EDDY
MARK STARS
COPY F X
COPY X F
COPY X F
COPY X F
COPY X F

;xa
NOOP
LINK 800
COPY M X
REPL RIGHT2
REPL RIGHT1
REPL LEFT2
REPL LEFT1
JUMP EDDY
MARK RIGHT2
LINK 802
MARK RIGHT1
LINK 802
JUMP EDDY
MARK LEFT2
LINK 800
MARK LEFT1
LINK 800
MARK EDDY
GRAB 200
TEST F = X
TJMP STARS
SEEK 5
TEST F = X
FJMP EDDY
MARK STARS
COPY F X
COPY X F
COPY X F
COPY X F
COPY X F

;xc
GRAB 300
COPY F M
SEEK -1 
COPY F M
Right at the 75 line limit. I actually have a MARK MAIN line in my first solution I posted that was legacy code and isn't needed. If I had room for another NOOP then I wouldn't have to worry about timing issues, but eh, I got my cycle.

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:



Anyway, this runs at a nice score of 37/70/19.

Very easy to tweak this to save two cycles - have XA do a file copy of 7 length instead of 14, replicate an exa to do it again, and transfer 7 digits over at a time. It's a little faster because now you have two exas who can read and copy values at the same time instead of one doing everything. 35/56/21

I have a 24 line solution that has two exas cycling between the nodes on the left and right, transmitting (or receiving) one value before moving to the next node. 155/24/115

silentsnack continues to otherwise kick my rear end.

GuavaMoment
Aug 13, 2006

YouTube dude

silentsnack posted:

TBF quite a few times you've posted solutions better optimized than mine, in one stat or another, and it might not have been obvious but in going back through the game I've used some tricks derived from your posts, which I probably never would have thought up on my own. :v:

I completely understand. When I did the Spacechem LP, often times rather average middle of the pack solutions had a really clever idea inside it, just not perfectly optimized. It was always fun to find those and show them off.

This level was one I knew there were way better solutions, I just couldn't get there. I'm feeling pretty good about my solutions for the next level, even before I go off one more time to see if I can improve (first I have to figure out what the hell I did since I never annotate anything).

GuavaMoment
Aug 13, 2006

YouTube dude
Major speed tips - the files are always multiples of 12, so unroll files into 12 long loops. I transmit the files, then go back through and replace the SSEA code. There's a third timing exa IN LOCAL MODE that exas in the buffer must communicate with first so that long files get done before short files.

code:
XA
LINK 800
COPY 8 #AUTH
COPY 0 #AUTH
COPY 3 #AUTH
COPY 2 #AUTH
COPY 7 #AUTH
COPY 1 #AUTH
COPY 0 #AUTH
COPY 4 #AUTH
COPY 9 #AUTH
COPY 5 #AUTH
COPY 1 #AUTH
COPY 2 #AUTH
COPY 5 #AUTH
COPY 2 #AUTH
COPY 6 #AUTH
LINK 801
MARK BEGIN
GRAB M
MARK LOOP
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
COPY F M
TEST EOF
COPY T M
ADDI X 11 X
FJMP LOOP
COPY X M
DROP
COPY 0 X
JUMP BEGIN

XB
GRAB 300
COPY F X
LINK 800
DROP
MARK NEWONE
MAKE
COPY #TRAK M
MARK LOOP
COPY M F
COPY M F
COPY M F
COPY M F
COPY M F
COPY M F
COPY M F
COPY M F
COPY M F
COPY M F
COPY M F
COPY M F
COPY M T
FJMP LOOP
SEEK -999
REPL NEWONE
COPY M T
LINK 800
MODE
COPY T M
MARK LOOP2
TEST F > 0
TJMP LOOP2
SEEK -1
COPY X F
JUMP LOOP2

XC
NOOP
LINK 800
LINK 800
MARK SIGNAL
COPY M T
MARK LOOP
SUBI T 1 T
TJMP LOOP
JUMP SIGNAL
2669/83/37

Your low line was better than mine, I never tried going back through a file as I'm writing it to check for the region code.

GuavaMoment
Aug 13, 2006

YouTube dude
The only way I found to get 100000 hackmatch points in a reasonable timeframe was to download a lua file (I think) that played for you and ran it overnight. Essentially hacking the hacking game to win a different hacking game. I found it appropriate.

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

So, I will stop here and wait to see how you got a better cycle count than 25 and a smaller size than 28.

18 cycles!

code:
GRAB 300
COPY F X
COPY F T
LINK 800
REPL TOP3
REPL TOP2
REPL TOP1
REPL RIGHT2
REPL LEFT2
REPL RIGHT
REPL LEFT
WIPE
REPL TESTT
HOST T
TEST T = X
FJMP DIE
COPY 0 #POWR
MARK TOP3
LINK 801
MARK TOP2
LINK 801
MARK TOP1
LINK 801
REPL RIGHT2
REPL LEFT2
REPL RIGHT
REPL LEFT
REPL TESTT
HOST T
TEST T = X
FJMP DIE
COPY 0 #POWR
MARK RIGHT2
LINK 802
MARK RIGHT
LINK 802 
REPL TESTT
HOST T
TEST T = X
FJMP DIE
COPY 0 #POWR
MARK LEFT2
LINK 800
MARK LEFT
LINK 800
REPL TESTT
HOST T
TEST T = X
FJMP DIE
COPY 0 #POWR
MARK TESTT
HOST X
TEST T = X
FJMP DIE
COPY 0 #POWR
MARK DIE
Put the two hosts in X and T, fill the east column, then fill every square north and south with TWO exas - one will put the HOST in X, the other in T, before testing. I know 17 cycles is possible though.

My lowest size is 25, and I know 21 is possible.

code:
GRAB 300
COPY F X
LINK 800
LINK 802
LINK 802
REPL TEST1
COPY F X
WIPE
MARK TEST1
REPL TOP
MARK TEST
REPL LEFT
HOST T
TEST T = X
FJMP DIE
NOOP
NOOP
COPY 0 #POWR
MARK TOP
LINK 801
JUMP TEST1
MARK LEFT
LINK 800
JUMP TEST
MARK DIE
I head to the most southwest node. Fill north and east, and repeat. Noops are needed for some edge cases to prevent a node from turning off before the next exa moves on.

GuavaMoment
Aug 13, 2006

YouTube dude
These two lines:

DIVI 0 T #POWR
SUBI 1 T #POWR

oooh that's nice, that alone might save me lines and cycles, it's very elegant. The first crashes the exa when it's in the wrong place, and the latter does nothing when in the wrong place. I love it!

GuavaMoment
Aug 13, 2006

YouTube dude
Yeah, we're getting to the point where optimization is really really hard. My lowest line is worse than yours at 42 (it significantly uses MODE for what seems like the first time), but I can save a bunch of cycles. I send the score results twice, one to do the testing directly, and again to save/void the data if needed. Probably not optimal but ehhhh I guess it works. 86/47/3. 75 cycles is possible! Hmmm, 11 cycles off, and I send about...11 values over M that I theoretically don't need...

code:
XA:
MAKE
VOID M
COPY M X
COPY M F
JUMP START
MARK STUFF
VOID M
VOID M
MARK START
TEST M > X
FJMP STUFF
COPY M X
SEEK -1
COPY M F
JUMP START

XB:
LINK 800
GRAB 199
MARK START
COPY F T
REPL CALC
NOOP 	*delays the next calculating EXA from coming out too soon*
NOOP
NOOP
TEST EOF
FJMP START
DROP
LINK -1
COPY 4 T 	*a delay loop to slow down the upcoming kill command until everything is done*
MARK LOOP
SUBI T 1 T
TJMP LOOP
KILL

MARK CALC
GRAB T
SEEK 1
ADDI F F X
ADDI F X X
DIVI X 3 X
MULI F F T
DIVI T F T
ADDI X T X
SUBI F F T
MULI T 20 T
ADDI X T M
SEEK -999
ADDI X T M
COPY F M
Really looking forward to the next level! I have the top scores on cycles and lines of all my friends - but I'm going to have questions about activity for the first and only time.

GuavaMoment
Aug 13, 2006

YouTube dude
Alright here we go! Speed time. 28/85/33

code:
XA
GRAB 300
COPY F X
LINK 800
REPL 803
WIPE
REPL 804
LINK 800
NOOP
MARK DEL
GRAB 200
SEEK 2
COPY X F
COPY F T
REPL D2
COPY F T
REPL D2
COPY F T
REPL D2
COPY F T
REPL D2
COPY F T
REPL D2
MARK D2
GRAB T
SEEK 2
COPY X F
COPY F T
DROP
GRAB T
SEEK 2
COPY X F
HALT
MARK 803
REPL 802
REPL 801
LINK 803
JUMP DEL
MARK 804
LINK 804
JUMP DEL
MARK 805
LINK 805
JUMP DEL
MARK 802
REPL 805
LINK 802
JUMP DEL
MARK 801
LINK 801
JUMP DEL

XB
NOOP
LINK 800
REPL 802
LINK 803
KILL
KILL
KILL
MARK 802
LINK 802
KILL
KILL
KILL

XC
LINK 800
REPL 805
REPL 804
LINK 800
KILL
KILL
KILL
MARK 805
REPL 801
LINK 805
KILL
KILL
KILL
MARK 804
LINK 804
KILL
KILL
KILL
MARK 801
LINK 801
KILL
KILL
KILL
All six exas go into their areas simultaneously, then there's a lot of loop unrolling. Create an exa to replace the ID for every file. EXAs die if they reach the end of file, and you only have to check once for sub-sub buildings.


Now for low line - 1623/20/25. So we need each exa to go into rooms numbered around 800, and then grab files in the 200s, right? Start at 806 and count down attempting both! Enter every room from from 0 to 806, grab every file from 0 to 806. After thousands upon thousands of exas die, the countdown reaches 0 and die for good. Weapons have a number in the second file spot, so those get excluded.

code:
GRAB 300
LINK 800
COPY F X
WIPE
COPY 806 T
MARK MANY
MODI -1 T T
REPL MANY
LINK T
KILL
KILL
KILL
MARK COPY
MODI -1 T T
REPL COPY
GRAB T
SEEK 1
TEST F > 0
TJMP MANY
COPY X F
No one on my friends list has a faster time, and one person ties me on lines, so this might be a time I can best silentsnack. There's one catch though - two friends have 24 for activity, and I'm not sure how that's possible. As you've tried to do!

GuavaMoment
Aug 13, 2006

YouTube dude

:sickos::hf: :sickos:

I have done something quite different than you, and I still need to optimize a bit. I'll assume you'll want to wait until you post your solution for me to post mine. I'm around 85 lines right now, but about 4-5x slower.

GuavaMoment
Aug 13, 2006

YouTube dude
I see you at LINES 100 and I thought the amount of lines was going to be the limiting factor in the solution, so I used my really low line filegrabbing solution as the base. 1823/81/24 There's a LOT of timewasting to get everything synced up. I still try to grab a LOT of non-existent files which wastes more time. Lower any of the timewasting values by even 1 and something breaks.

code:
XA LOCAL

COPY 800 T
LINK 800
@REP 5
REPL LINK
ADDI T 1 T
@END
MARK LINK
LINK T

; all six rooms are filled with one exa

COPY 299 T
REPL FILEGRAB
MARK WAIT1   ;create exas grabbing files 299 on down, and begin WAIT1 until that's done. Each fileholder will send '1' over M.
SUBI T 1 T
TJMP WAIT1
COPY 8 X 
REPL SLOWFILL           ;attempt to fill empty spots with 8 exas as CO2 did. Buuuut there's a delay before each filler is made
	;we want to count all the fillers later before another is created
COPY 0 X
COPY 78 T    
MARK WAIT2    ; and wait2 until everything is filled.
SUBI T 1 T
TJMP WAIT2
ADDI X M X
MARK COUNTLOOP
TEST MRD
FJMP VOIDLOOP
ADDI X M X
JUMP COUNTLOOP        ;count the number of alive exas before more than one is created


MARK VOIDLOOP
COPY 16 T 
MARK WAIT3
SUBI T 1 T
TJMP WAIT3    ;void the extra exas created slower than they're made until no more are being replicated
TEST MRD
FJMP KILLS
VOID M
JUMP VOIDLOOP

MARK KILLS
SUBI 11 X T    ;the real number is 11 minus the count not twelve since one extra is created
; I don't know it just works
MARK KILLING
FJMP DONEKILL
KILL
SUBI T 1 T
JUMP KILLING    ;hey idiot, change this to a TJMP and remove the FJMP DONEKILL line you say - 
Well, I'd do that, but it breaks the solution somehow



MARK DONEKILL
MODE
COPY M X   ;grab the file value from XB
COPY 370 T      ;begin grabbing every file from 370 down to 0. Yes, the files start at 299, 
but this also acts to slow things down and make sure everything times out properly
MARK FILEGRAB2
MODI -1 T T
REPL FILEGRAB2
GRAB T
SEEK 1
TEST F > 0
TJMP LINK
COPY X F


MARK SLOWFILL
MODI -1 X X
REPL FILLER
COPY 16 T    
MARK SLOWWAIT
SUBI T 1 T
TJMP SLOWWAIT
JUMP SLOWFILL




MARK FILEGRAB
MODI -1 T T
REPL FILEGRAB
GRAB T
MARK FILLER
COPY 1 M

-------------------
XB GLOBAL

GRAB 300
COPY F X
COPY 5 T
MARK HERE
COPY X M
MODI -1 T T
JUMP HERE

GuavaMoment
Aug 13, 2006

YouTube dude

Carbon dioxide posted:

Also, the TJMP MANY is just a convenient way to make those EXAs that grabbed a weapon harmless.

It may have been said before, but there are just so many times when you want something to die after a conditional, the first thing I do is look over the code to see if jumping somewhere completely unrelated kills the exa in that case. There almost always is one.

I don't have good solutions for this one. I won't have good ones for a while it seems, the difficulty is ramping up.

GuavaMoment
Aug 13, 2006

YouTube dude
I had a 60 cycle solution I was playing with last week, but it's gone? I must have done something and accidentally deleted it. I remade at least it but with more lines somehow? 50 cycles is possible.

60/59/8

code:
XA local
GRAB 301
COPY F M
COPY F T
LINK 800
LINK 800
COPY T M
WIPE

XC local
GRAB 300
COPY F X
SEEK 999
COPY M F
LINK 800
LINK 800
COPY M T
REPL CALLER
MODE
SEEK -1
COPY F X
SEEK -1
MARK BACK
COPY M F
COPY X F
COPY 1 F
COPY 0 F
JUMP BACK
DROP
KILL
KILL
GRAB 199
SEEK 999
COPY 300 F
MARK CALLER
GRAB 199
MARK CALLING
REPL FILEHOLD
COPY F M
NOOP
JUMP CALLING
MARK FILEHOLD
GRAB M
MODE
COPY F M
SEEK 999
COPY X F
COPY T F
COPY 1 F
COPY 0 F

XB
LINK 800
LINK 800
COPY 25 T
MARK WAIT
SUBI T 1 T
TJMP WAIT
NOOP
KILL
KILL
GRAB 199
SEEK 999
COPY 300 F
There's what looks like a clumsy write of CREDIT only to grab it again later, but that exa isn't the bottleneck. I try not to use conditionals since you need registers to store other information; this means I need a timing exa to kill things later.

GuavaMoment
Aug 13, 2006

YouTube dude
852/77/9

The "Area code" (472) is always the same so you can skip some of the digits of phone numbers. That's the only serious change I think, it's a pretty straightforward challenge.

code:
GRAB 300
LINK 800
@REP 11
COPY F #DIAL
@END
REPL LINKS
WIPE
MAKE
VOID M
MARK PASTE
@REP 8
COPY M F
@END
COPY -1 F
SEEK 999
TEST MRD
TJMP PASTE
SEEK -54
ADDI X 1 X
COPY -1 #DIAL
MARK CALLED
SEEK 8
TEST F < 0
FJMP CALLED
SEEK -9
COPY 4 #DIAL
COPY 7 #DIAL
COPY 2 #DIAL
@REP 8
COPY F #DIAL
@END
REPL LINKS
COPY 0 F;INSTEAD OF NOP
TEST MRD
FJMP CALLED
VOID M
TEST X = 7
TJMP END
SEEK -9
JUMP PASTE

MARK LINKS
LINK 800
COPY 999 M
TEST X = 7
TJMP END
GRAB 200
MARK PASTING
SEEK 4
@REP 8
COPY F M
@END
JUMP PASTING

MARK END
WIPE
My low line is terrible. I hope someone has found a way to swizzle their way into powerdailing every number for an obscenely low line solution!

GuavaMoment
Aug 13, 2006

YouTube dude

silentsnack posted:

thought about that but didn't manage to get anywhere with it

Oh well then allow me!

code:
;XA - GLOBAL
GRAB 300
VOID F
VOID F
VOID F
LINK 800
JUMP START

MARK SUCCESS
MODE      ;LAZY HACK
VOID M    ;BUT IT WORKS?

MARK READER
GRAB 200
MARK READ
SEEK 4
@REP 4
MULI F 10 X
ADDI X F M
@END
JUMP READ

MARK MAIN_LOOP
ADDI X 8 X
GRAB 300
MARK START
SEEK X
COPY 4 #DIAL
COPY 7 #DIAL
COPY 2 #DIAL
@REP 8
COPY F #DIAL
@END

REPL MAIN_LOOP
LINK 800
REPL READER
LINK -1
REPL SUCCESS
SEEK 9999
MARK WRITE
@REP 4
COPY M T
SWIZ T 2 F
SWIZ T 1 F
@END
NOOP ; See note 1
TEST MRD
TJMP WRITE

REPL MAIN_LOOP
COPY -1 #DIAL

;XB - LOCAL
LINK 800
@REP 8    ;SUCCESS COUNT
COPY 0 M 
@END

KILL      ;CLEANUP
GRAB 300
LINK 800
KILL
WIPE
Note 1 - This NOOP can be removed if you unroll the entire READ mark and repeat it...six times. You're like 20 lines over the limit but it saves 20 cycles. It has to be 6 because there's one test with six phone numbers in it, and the act of using JUMP READ is enough to slow down things that a TEST MRD reads false a cycle before it would read true, making you miss a number and thus having an EXA fail to die.

685/76/21

Edit: 676/67/21 cycles by deleting the SUCCESS branch and the REPL SUCCESS line, and replacing XB with this:

code:
COPY 334 T
MARK WAIT
SUBI T 1 T
TJMP WAIT
LINK 800
KILL
GRAB 300
WIPE
LINK 800
The entire purpose of which is to dodge a weird end case on test run 43. You can then get 656 cycles by deleting that one NOOP and 6x unrolling READ as noted, but you'll need to carve out 11 lines from somewhere for it to count.

GuavaMoment fucked around with this message at 04:32 on Jul 10, 2022

Adbot
ADBOT LOVES YOU

GuavaMoment
Aug 13, 2006

YouTube dude
After receiving a signal over M, create 5 exas, one for each centrifuge. Test to see if your centrifuge has the highest pressure, otherwise die. Yes, there's only room for 4 exas, but one will die soon enough for the 5th to enter the testing room. Then go turn off your centrifuge and send a done signal. 136/97/22. My low line is, uh, 86, so I don't think I've ever tried very hard at making one. 44 is the best low line among my friends, so good job on that! For all you wizards, get a solution down to 54 cycles. Somehow.

code:
LINK 800
LINK 799
MARK REPLS
VOID M
REPL 1
REPL 2
REPL 3
REPL 4

COPY #ZGC0 X
TEST X = 0
TJMP DIE
TEST #ZGC1 > X
TJMP DIE
TEST #ZGC2 > X
TJMP DIE
TEST #ZGC3 > X
TJMP DIE
TEST #ZGC4 > X
TJMP DIE
REPL REPLS
LINK -1
LINK 798
JUMP DIE
MARK 1
COPY #ZGC1 X
TEST X = 0
TJMP DIE
TEST #ZGC0 > X
TJMP DIE
TEST #ZGC2 > X
TJMP DIE
TEST #ZGC3 > X
TJMP DIE
TEST #ZGC4 > X
TJMP DIE
REPL REPLS
LINK -1
LINK 798
JUMP POWEROFF1
MARK 2
COPY #ZGC2 X
TEST X = 0
TJMP DIE
TEST #ZGC1 > X
TJMP DIE
TEST #ZGC0 > X
TJMP DIE
TEST #ZGC3 > X
TJMP DIE
TEST #ZGC4 > X
TJMP DIE
REPL REPLS
LINK -1
LINK 798
JUMP POWEROFF2
MARK 3
COPY #ZGC3 X
TEST X = 0
TJMP DIE
TEST #ZGC1 > X
TJMP DIE
TEST #ZGC2 > X
TJMP DIE
TEST #ZGC0 > X
TJMP DIE
TEST #ZGC4 > X
TJMP DIE
REPL REPLS
LINK -1
LINK 798
JUMP POWEROFF3
MARK 4
COPY #ZGC4 X
TEST X = 0
TJMP DIE
TEST #ZGC1 > X
TJMP DIE
TEST #ZGC2 > X
TJMP DIE
TEST #ZGC3 > X
TJMP DIE
TEST #ZGC0 > X
TJMP DIE
REPL REPLS
LINK -1
LINK 798
LINK 800
MARK POWEROFF3
LINK 800
MARK POWEROFF2
LINK 800
MARK POWEROFF1
LINK 800
MARK DIE
COPY 0 #POWR
COPY 999 M

XB
COPY 999 M
Snaxnet has been a play on words with stuxnet the entire time, a real life virus made to shut down nuclear centrifuges. I'm sure Zach felt really clever designing this ridiculous challenge for a joke. I enjoyed this recent video about it if you want to know more:

https://www.youtube.com/watch?v=U_7CGl6VWaQ

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply