The Let's Play Archive

EXAPUNKS

by Carbon dioxide

Part 23: Valhalla Hacker Battle

Part 23 - Valhalla Hacker Battle

=== Trash World Inbox ===

GuavaMoment posted:

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
Ah, I was wondering if something like this was possible but didn't quite figure it out. The trick is to start LINKing from 800 and then use a combination of REPL and increments of the LINK id to go in every direction. But if you get that wrong the EXAs will keep looping forever.

GuavaMoment also shared this 24 cycle solution:

GuavaMoment posted:

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.
Those RIGHT2 and RIGHT1 jumps where you end up further down the code if you need to do fewer LINKs are a quite neat solution.

Next, both silentsnack and GuavaMoment posted 23-cycle solutions. They are similar in the sense that they each use two EXAs, one to handle the back rows and one to handle the front rows. That's apparently very slightly faster than using a single EXA.

For the sake of brevity I'll only post silentsnack's solution here but I want to mention that GuavaMoment's solution has an EXA priority quirk, where depending on what EXA's code you paste in first, it runs at either 23 or 26 cycles.

silentsnack posted:

code:
;XA
GRAB 300
COPY F M
SEEK -1
COPY F X
LINK 800
REPL NORTH;B20-B30
LINK 801
MARK NORTH;B21-B31
REPL SOUTH
LINK 800
REPL HERE
WIPE;CRASH

MARK SOUTH;B10,B11
REPL HERE
LINK 802
MARK HERE
GRAB 200
TEST F = X
TJMP YES
SEEK 5
TEST F = X
DIVI T T T
MARK YES
COPY F X
@REP 4
COPY X F
@END

;XB
LINK 800
LINK 801
COPY M X
REPL NORTH
LINK 801
REPL N1;B22-B32
LINK 801
MARK N1;B23-B33
REPL S1
REPL HERE
LINK 800
JUMP HERE

MARK S1;B12,B13
LINK 802
JUMP HERE

MARK NORTH;B41-B43
REPL SOUTH
LINK 800
LINK 800
REPL EAST
MARK WEST;B00,B40
REPL HERE
LINK 803
JUMP HERE

MARK SOUTH;B01-B03
LINK 802
LINK 802
REPL WEST
MARK EAST
LINK 801
REPL HERE
LINK 801

MARK HERE
GRAB 200
TEST F = X
TJMP YES
SEEK 5
TEST F = X
DIVI T T T
MARK YES
COPY F X
@REP 4
COPY X F
@END
23/73/25
Very optimized, but also quite hard to read with the many REPLs.

Finally, silentsnack has a 22-cycle solution which sadly doesn't fit into the size limit.

silentsnack posted:

code:
;XA
GRAB 300
COPY F X
REPL WEST_X
COPY X M
MARK SEND
COPY X M
COPY X M
HALT

MARK NORTHWEST;B30-B40
LINK 800
REPL HERE
LINK 800
JUMP HERE

MARK WEST_X;B20-B21
REPL SEND
LINK 800
REPL NORTHWEST
REPL SOUTHWEST

REPL HERE
LINK 801
JUMP HERE

MARK SOUTHWEST;B10-B00

LINK 802
REPL HERE
LINK 802

MARK HERE
GRAB 200
TEST F = X
TJMP YES
SEEK 5
TEST F = X
DIVI T T T
MARK YES
COPY F X
@REP 4
COPY X F
@END

;XB
REPL SOUTH
LINK 800
LINK 801
REPL MID_3
LINK 800
COPY M X
;B31-B41
REPL HERE
LINK 800
MARK HERE
GRAB 200
TEST F = X
TJMP YES
SEEK 5
TEST F = X
DIVI T T T
MARK YES
COPY F X
@REP 4
COPY X F
@END
HALT

MARK MID_3;B22
NOOP
NOOP
LINK 801
COPY M X
JUMP HERE

MARK SOUTH;B11-B01
LINK 800
LINK 801
LINK 802
COPY M X
REPL HERE
LINK 802
JUMP HERE

;XC
LINK 800
LINK 801
LINK 801
REPL NORTHEAST
LINK 801
COPY M X
REPL SOUTHEAST
;B33-B43
LINK 800
REPL HERE
LINK 800
GRAB 200
TEST F = X
TJMP YES
SEEK 5
TEST F = X
TJMP YES
HALT

MARK SOUTHEAST;B1X-B0X
LINK 802
REPL HERE
LINK 802
GRAB 200
TEST F = X
TJMP YES
SEEK 5
TEST F = X
TJMP YES
HALT

MARK EAST_X;B23
LINK 801
JUMP HERE

MARK NORTHEAST;B32-B42
COPY M X
REPL EAST_X
REPL SOUTHEAST
LINK 800
REPL HERE
LINK 800
MARK HERE
GRAB 200
TEST F = X
TJMP YES
SEEK 5
TEST F = X
DIVI T T T
MARK YES
COPY F X
@REP 4
COPY X F
@END
22 cycles, 125 lines (so it doesn't count for statistics)
Without going into the nitty gritty, the easiest way to understand this is by running it and seeing which EXA grabs which file.



As you can see labour is now divided among 3 EXAs.

I didn't really try but I can imagine getting this under the 75 size limit is impossible. It's easy to make the code (a bit) smaller, but not without having it be slower as well.


=== Valhalla ===

Oh.
Apparently, that Last Stop location is getting mobbed.
Processing.
People are choosing to believe the guide even when it's obviously wrong...
Why would they think Last Stop has actual good food?
And why did the guide change their behavior, but not the highway sign?




Everyone seems to be agreeing that the signs were vague. Yeah, that's always the problem with astrology, isn't it?

The signs were vague.

Hmm...
I guess it's easier to care about food than an abstract problem.


Nothing more to say about that, Ember? Well, ok.





Next up, a hacker battle against =plastered.

Time for the next opponent.
Are you ready?




These unanimous votes make it easy for me to keep count.

What, you're my coach now?

Would that be a bad thing?
That extreme baseball book you found me was full of interesting information.
Go on, champ, get out there and win.


I think I just threw up into my mouth a little bit.


OST: Getting Started

It's much the same as before. I first have to beat =plastered before I can play against other people.

The assignment reads:
To win this battle you must control a majority of the hosts for as long as possible.
To take control of a host, write any value to its #CTRL register. Reading from a #CTRL register will tell if you (1) or your opponent (-1) controls the host.
- Gain one point every cycle you control more hosts than your opponent.
- Lose one point every time one of your EXAs executes a KILL instruction.
For more information see "Hacker Battle Domination" in the second issue of the zine.


There's a 10 EXA limit, a 100 size limit, and each battle runs for 100 cycles.



Take note of the layout of the grid. It's basically linear, but both me and the opponent connect into the one-but-last position on our sides.

If I just let it run without doing anything, =plastered sends a single EXA in that first goes to the right (the end of the line), activates that node, and then goes down the path, activating each node in turn. Once it reaches my end it turns back and repeats its pattern.

As usual, hacker battles are kinda trivial to win.

I can actually just replicate =plastered's code one to one, like so:

code:
LINK 800
LINK -1

MARK START
@REP 8
COPY 1 #CTRL
LINK 800
@END

@REP 8
COPY 1 #CTRL
LINK -1
@END
JUMP START
The odds seem to be on my side because doing this, I win 52 out of 100 battles, which counts as an overall win. It's a C, though. I'm sure I can do at least a bit better.

Since =plastered doesn't bother REPLicating anything, I can just take the single-point loss of executing a well-timed KILL and win every battle with about 90 points.

code:
;XA

NOOP
LINK 800
LINK -1

MARK START
@REP 8
COPY 1 #CTRL
LINK 800
@END

@REP 8
COPY 1 #CTRL
LINK -1
@END
JUMP START

;XB

@REP 6
LINK 800
@END
KILL




Since the enemy EXA is gone after XB has done its thing, I don't even need the loop anymore. XA could set every #CTRL register once and die, and the rest of the cycles I just rack up points for free.

If you don't want to use a KILL, another solution is to just REPL an EXA into every host and have them set #CTRL in a small loop. Because the enemy can only set a single host at once and I overwrite it the next cycle, it'll never hold a majority of the hosts.

code:
LINK 800

REPL SOUTH
MARK NEXT
REPL SET

LINK 800
JUMP NEXT

MARK SOUTH
LINK -1

MARK SET
COPY 1 #CTRL
JUMP SET
Either way, this gives me an easy S+.

Do you like it? Winning?



And that brings us to our first vote already.




To be fair, any chump could've beaten you, =plastered.




Anyway, there's someone at the door. Sounds like my neighbor, Isadora.

To anyone keeping track, the game's opening cut scene took place on Saturday, October 4th, 1997. It's now Tuesday, November 4th, so exactly one month has passed in-game. The previous cut scene with Isadora was on October 8th.



Hey...
Sorry I haven't been in touch.
Things are a little crazy at work right now.
They promoted me to a new position, and... well there's just a lot going on.


I didn't notice this before but Isadora is actually wearing somewhat more formal clothes than in her previous cut scene. A nice touch.

Isadora offers me a plastic bag with something inside of it.
It's moderately heavy.
Maybe a couple books or something?

You like puzzle games, don't you?
I remember you being a fan.
I used to play games with my sister sometimes, but she moved to Japan a few years ago.
She sent me this game, but I guess I can't play it because of the region lock.
Looks fun, though.
I thought maybe you could get it working.
You always were good at that kind of thing.


Isadora sighs.

I have to go.
So much work to do... really hope this job doesn't eat me up.
Okay, bye for now.


Speaking of puzzles, the last page of the second zine has some nonograms, also known as Picross or paint-by-numbers puzzles. Here's the instructions and the first puzzle.



Since there's not much for the thread to do with these hacker battles, why not do one of these? If you want to share your result please use spoiler tags so other people get a chance to solve it for themselves too.

We'll check out Isadora's video game later. First things first - I can barely hold a controller right now since the Phage seems to be acting up in my left hand.

First it was your arm... now it's your hand.



And that brings us to our second vote.