The Let's Play Archive

EXAPUNKS

by Carbon dioxide

Part 4: TRASH WORLD NEWS - Tutorial 3

Part 4 - TRASH WORLD NEWS - Tutorial 3

megane posted:

A way to save a cycle (without using any new operations) is SUBI X F F.
Of course. :doh:



We can use the exact same trick that saved a COPY operation at the beginning to have the subtraction step write directly to the file. Remember, reading F moves the file pointer forward so the write happens at the end of the file



Which nets us the best solution anyone found. Anyway, where were we?



Adding the votes in both threads together, one vote for Nothing is free and two for Does it matter?

Does it matter? I don't have a choice.

That's true.
Your agency is severely constrained by your situation.
Interesting.
This is good data.


Data? What kind of data are you collecting?
Anyway, while we were busy the folks in the chat were discussing that wardialer business.



Hah, yeah. Might make for a bit of a show.

Our next assignment is TRASH WORLD NEWS - Tutorial 3. I see only four tutorial pages in the Zine so hopefully this tutorial nonsense is over soon. I want to get to work already.



One vote for What? and two for Why all the questions? this time.

Why all the questions?

I am collecting data.
It will help me formulate future actions and responses.
In other words, I'm curious, that's all.
Recalibrating.
Let's continue.


Okay, whatever. Let's dive into it.


OST: Getting Started

A slightly more complicated network this time.



So, the file we need to copy data from is sitting in the SECRET host at the top left. And my EXA can't just carry it out. The link to SECRET is one-way only, since it has no ID on the SECRET side. We're going to need something new. Let's see what Ghast has to say.



No solution to copy anymore. Instead Ghast explains some new instructions. I'll build something with them and explain during the test run.



XA will go up to the SECRET host and send the file data over the 'M' communication register, while XB will read from there and write it to a new file.



As always, let's first get the EXAs to the right place.





XA grabbed the file, while XB used the MAKE command to create an empty file.
Next, XA sends the first entry in the file (the word ECHO) to the M register.

M has two modes, which you can set for each EXA: GLOBAL and LOCAL. I like to think of them as radio broadcast frequencies. If you write a value to the M register, the EXA will completely pause until some other EXA reads from it. If you try to read a value from the M register and nobody is broadcasting, that EXA will pause until it can receive something.

EXAs in GLOBAL mode can communicate across hosts, but EXAs in LOCAL mode can only communicate if they're in the same host. Importantly, and this is where the frequency analogy comes in, an EXA listening in GLOBAL mode cannot receive a message from an EXA in the same host that's sending in LOCAL mode. It can receive messages from an EXA in the same host that's also broadcasting in GLOBAL mode though.

As you can see, XA is sending, and XB is already ready to receive so it will get the message the very next cycle.



Since I need to swap the order of the entries in the file, I decided to buffer the first entry in the X register, then copy the second one directly into the file, and then copy the buffered value into the file.

Words act exactly the same as numbers except you can't use any of the arithmetic instructions with them.



The file info was copied, XA ran WIPE as its last instruction, which deletes the file it's holding. Next, as they run out of instructions, both EXAs self-destruct and the assignment is complete.



The EXODUS simulator shows an EXA wiggling with static around it if you pause the simulation in the cycle before it self-destructs, which is a nice touch.



As usual, we can do better.

The first improvement is both incredibly simple and a bit stupid.



All we do is swap the instructions of XA and XB. That's easy enough - the game allows you to select text with your mouse and copy-paste with ctrl+c/x/v. This drops the cycle count by one. But why does this work?

Well, every cycle, every EXA will attempt to execute one instruction. However, only one EXA can traverse a specific network link at a time, so XA and XB can't both cross from RHIZOME into INBOX during the same cycle. Since both start with the LINK 800 instruction, who wins?

Turns out the game has some hidden ordering of EXAs which determines this.

In the original solution, the receiving EXA wasted a cycle reading from M while the other wasn't sending yet. This caused the sending EXA to also waste a cycle waiting for the other one to accept the message. Both still finished at the same time, but both wasted a cycle. By switching who arrives first, the receiving EXA starts reading at the same cycle the other EXA sends the data, and they can both save the waiting cycle. Yeah, sometimes this kind of meta gaming is necessary in EXAPUNKS to get the high score.



The histograms show that for this assignment it is also possible to get a lower (=better) activity score. As the game explains it, Your activity score is the number of times EXAs you control execute LINK or KILL instructions. Well, we haven't even seen the KILL instruction yet. We do four LINKs total to get the EXAs to the right places. Reducing that is possible, but not with the instruction set we know about right now. I'll get back to this puzzle a bit later.


Oh, while I was leafing through the Zine I noticed there's some stuff in the back that's not related to programming. For instance there's a recipe!



Anyone up for some dumpster donuts?

Anyway, let's submit my solution and see what Ember has to say.

How do you feel about it now?
You're closer to the goal.
Any change?




And also the intro dialogue for the next assignment:

Yes. You can do it!
This is positive encouragement.
It is designed to increase activity in your prefrontal cortex.




As usual, please vote for both questions.