EXAPUNKS

EXAPUNKS

View Stats:
So, what is the intended way to do a success check in the failing drives bonus puzzle? (Mild spoiler)
I just got done with x10x's bonus puzzle in the postgame and honestly I really don't like it lol. The main issue was, obviously, the connections going in and out at random times, with no clear rules for when or how long they are allowed to be on/off, without which the puzzle would be trivial.

My first solution to figure out whether the "reader" EXA has made it into the drive or not was fairly simple: Spawn a reader, wait a tick for it to
LINK
, then
TEST MRD
. This mostly worked… Until test case 5, where the link closed just as soon as I did the
TEST MRD
, and opened immediately after, causing an unneeded EXA to be spawned and block up the solution.

So, to work around it, I decided to do several tests in a row:

TEST MRD TJMP SUCCESS TEST MRD TJMP SUCCESS TEST MRD FJMP TRY_SPAWN MARK SUCCESS

And that worked… Until test case 90, where a link closed for 5 steps in a row, going over my entire block of tests and causing the originator to assume the EXA got through.

So I raised it to 5, but later in the test case 90, the link stayed dead for long enough to overwrite THAT. The ultimate solution I used was 7 sequential
TEST MRD/TJMP SUCCESS
copy/pastes, and though it beat the puzzle for me, I just feel like there must be something I'm missing.

For the entire game so far, I've used this "Spawn Exa, have it LINK to a maybe-there host, and then use TEST MRD to determine if it succeeded" method, and it's worked, but this puzzle seems like it was trying to make me learn a different way to do it, and I brute forced past it without learning anything. An EXA can't report a failure if it's dead; The failure report should be that the EXA isn't sending back a signal.

Is there a more elegant way, or is this really just the intended solution?
< >
Showing 1-5 of 5 comments
I solved this by putting the REPL that spawns the EXA that probes the link and the TEST MRD to query whether it succeeded in a loop. If the link goes down immediately after the probe EXA has successfully traversed it, the parent EXA will indeed spawn more probe EXAs, but they don't cause a deadlock because the first thing a probe EXA does after traversing the link is to grab the file, and extra probe EXAs after the first successful one will terminate no later than that point because the first successful one has already grabbed the file.

... # At this point X register holds file ID and T register holds link ID. MARK TRYLINKLOOP REPL TRYLINK NOOP NOOP TEST MRD FJMP TRYLINKLOOP ...

... MARK TRYLINK LINK T # Next instruction terminates this EXA if it wasn't first to traverse link. GRAB X ...
I could see how that would work, yeah. The reason it didn't work in my solution was because I relied on only sending one exa to each drive (cutting down on the number of try/fails that need to occur), and then messaging it the file IDs to pick up, only having it end when it's read the data off from all 6 files.
, and opened immediately after, causing an unneeded EXA to be spawned and block up the solution.
Why would it not just crash while the first EXA is holding the file and trying to communicate?

I see that I have a bit of a 3-'tiered' system.
'central dispatch' holds the file list and per file spawns a 'filemaster' (in the controller host)
It waits for the local ok from the filemaster.

The filemaster is an ugly beast, that has 3 repeated bits hardcoding for the 3 drives, sending out a 'copier', that messages the entire contents of the file. First time, all is copied, second and third, only write whatever value is not 'FAIL'. Kinda ugly, but hey.

I make sure to a nice END TRANS value (all 'real'-values are 4-digit).

A complicated way of saying: I just did the TEST MRD route (I wait 2 ticks: one to cross the link, one to grab the file.), but only to check the first arrival of the EXA. The comms itself is ended with an unambiguous end signal.

85 lines / 5027 cycles, room for improvement in these loops.
Originally posted by thewifiwhisperer:
Why would it not just crash while the first EXA is holding the file and trying to communicate?
I don't remember exactly why the solution softlocked, but it softlocked. Something to do with the way the EXAs were communicating.

As I recall, my original solution was basically: Send out a "reader" EXA to Drive 1. The "reader" will send a 1 once it crosses the link, telling the "sender" that it made it; if not, another is spawned to try again. From that point, the "reader" EXA will
- receive one of the file numbers over global M
- grab that file
- read all the data from the file and pass it to the "writer" over global M
- then drop the file and return to the first step.

If there are no files left, it would get passed a purposely invalid file number, crashing the EXA. Then a new EXA would get sent to Drive 2, and do the same thing as the first; Then one for Drive 3. At that point all the gaps would be filled.

When a second EXA got spawned, though, what I seem to remember happening is that the second exa would jump into the single available space in the drive once the first EXA grabbed a file; Then the first EXA couldn't drop its file, softlocking the solution. Something like that. I've deleted the faulty solution since solving the puzzle, so I couldn't tell you why.
Grim, I'm annoyed with you :-p

Reminding me of this puzzle, made waste about half a day futzing around finding new solutions to this puzzle.

My basic approach is still: copy the file fully from drive 1, then fill in the gaps with data from drive 2 & 3, by going through the copies there.

I got to about 4500 cycles, but that was simply by noticing that files are always a multiple of 6, so in the initial copy, I only do a test EOF every 6 messages.

My next approach was to play around recording the offset, so that after the initial copy I would only request the data in the positions with a fail. It didn't really make much difference, because I'm still basically going through the full file three times.

The problem is that with the unreliability of the drives, it's very hard to parallelize work.

While writing this, I just thought of a new approach, which should let me go through the file only twice...

Damn, you just cost me another evening!
< >
Showing 1-5 of 5 comments
Per page: 1530 50