EXAPUNKS

EXAPUNKS

View Stats:
Can people without algorithm knowledge solve the last level ???
Exapunks is a programming game and until the last level I never felt there was a need to know algorithms, of course there are things like recursion and forks, but those can be learned through experimentation, but in the last level I think there aren't many ways to avoid dfs or bfs to explore the network, and some sort of sorting algorithm. I used a dfs and Bubblesort . Bubblesort is not efficient but it's easy to implement. I also feel that the game might not be intended to play it this way because sometimes i was annoyed at the incapability of using functions, and don't justify it with "is assembly" I programmed functions on mips. If there are others way let me know. Of course i could just be limiting my vision because I know algorithms and as someone that has practiced a little bit of competitive programming I might be more inclined to think this way.
< >
Showing 1-8 of 8 comments
a little follow up on the difficulty of the game, if you are a programmer the game reminds me of the first programs I had to do, my teacher also limited us on our programming assignments so this takes me back to those days, some problem had even been solved previous to playing the game. The game is fun but it's not challenging, but also not trivial I would say it has the right difficulty for a game at least for programmers or compared to cp, but for someone without this sort of knowledge how would they be able to progress on the game.
As someone who has very little knowledge of sorting algorithms (I know they exist, and I know there are different approaches): yes, it's solveable without any formal knowledge.

I remember a similar challenge in the game "Human Resource Machine", there you can actually store references (positions in a file) quite easily, and I learned that it's smarter to store the reference than the value.

(this was after being interested why others had such better scores than I did)

It makes sense if you think about it. If you store "10 is the biggest number", then you still have to find that number later, if you want to delete it. It might be the first, it might be the last, it might be somewhere in between and depending where it is, finding will take a long time.

While if you store "the 3rd number is the biggest", you can just jump there when you need it.

I tried to apply that little tidbit of information to this level: and horribly failed. There is really no great/efficient way to store references within Exapunks.

So in my solutions I just solve it pretty straighforward: find the smallest number, copy that, find it again, delete it, rinse, repeat. Is that a (formal) sorting algorithm? Probably. Do I have any idea what's it called? No, but the name will probably make sense. Do I have any idea what that means about the resolution time if the data set expands linearly. If I look it up somewhere, maybe, otherwise, I really don't have a clue. I still have my solution, though!

As for exploring the network

dfs and bfs are "depth" and "breadth" first search? I just make sure my exa's spread everywhere, in all directions with a lot of REPLs. I don't really "search" in any linear fashion, the spread happens as much "parallel" as possible.

We're imitating a virus, after all, not an intelligence!
Well I think i just couldn't resist seeing my exas simulating a dfs after all, I love seeing algorithms graphically, and it would solve easily the issue of conflicts over the network. For the sorting algorithm the algorithm you use is fine, it's a naive approach, but functionality first efficiency later also given the limitations most algorithms aren't even feasible. Good job. Although I can't imagine how you dealt with conflicts over the network given that you parallelized so much, I don't usually think of my exas as a virus all I see is concurrency and synchronization problems basically operating system problems, I actually used repl most of the time to synchronize tasks and communication so I ended most of the time with one exas with multiple little programs like an OS with ordered program execution, I guess most people played this way seeing that repl basically imitates fork() as it copies even the current state of the exa. I wouldn't say they aren't intelligent as I saw myself using recursion to do exhaustive search while replicating other exas, filtering, terminating other programs upon finishing, synchronizing exas for example abusing the M register to imitate a lock,etc. But this could just be because of my cs background, I guess I carry this curse so everytime someone says hello to me I think of a tcp handshake. The hack matches were pretty fun and I can see my exas as a virus there, it's just a shame there aren't many Never played human resource machine, it has references I guess you can make some sort of classes or objects, most programming games don't touch that I guess, I might take a lot.
See below for my "viral code". It isn't pretty, but it works, 0 chance of collisions. The broadcaster bit can also do other stuff of course.

How do I know that I'm done searching? I just give it a little bit of time and then TEST MRD.

(In fact, I could even make what happens there conditional I realize, and so truncate my code, Now I just copy the code for different purposes (Getting host name, or getting the value of the #nerv)


; NERVEXPLORER
LINK 800
JUMP FIRSTRUN

MARK EXPLORER1
LINK 1
MARK FIRSTRUN
REPL EXPLORERN3
REPL EXPLORER1
REPL EXPLORER3
JUMP BROADCASTER

MARK EXPLORERN1
LINK -1
REPL EXPLORERN3
REPL EXPLORERN1
REPL EXPLORER3
JUMP BROADCASTER

MARK EXPLORER3
LINK 3
REPL EXPLORERN1
REPL EXPLORER1
REPL EXPLORER3
JUMP BROADCASTER

MARK EXPLORERN3
LINK -3
REPL EXPLORERN3
REPL EXPLORERN1
REPL EXPLORER1
;JUMP BROADCASTER

MARK BROADCASTER
COPY #NERV X
HOST M
This exploration is parallel, but it doesn't enforce any kind of data synchronization, I suppose that you have a reader at the start node, I am interested on how do you manage to synchronize the exas given that he M register is shared between all of them shouldn't a race condition quickly emerge, the only way I can imagine that not happening is that the order of communication is First Come First Served that way with enough delay I can imagine this strategy being a viable solution, but even then in this case if an exa replicates top and left the cycle difference is only one between those replicated exas and a race condition would emerge in case both of them had a #nerv register. But there aren't enough details on communication to determine that. (A race condition is when the result is dependent on the order of execution of parallel tasks.)
Sorry if I sound a bit technical, but I had to design some parallel algorithms in real life and some design practices just stuck with me.
I think you're talking about syncing up the "HOST" and "NERV" values. And my solution is: I don't.

In the first wave, I sent out the little Exa's, and they just sent back the host. (Host M)

I do a little bit of NOOP and TEST MRD, since I don't know the number of nodes with a NERV. Technically, if there was a level with an enormous corridor, it would fail, but there isn't. (A workaround could be to have them send "I'M ALIVE" notices after every link transition and just discard those, I guess)

Suppose there's 8 nodes. Now, I have a list of 8 unsorted nodes, and no associated NERV values.

So, I look for the smallest node in the list (using the method described above) and copy that to the X register.

This time, we send out a wave of Exas again, but with the target nodename in the register.
And instead of doing HOST M, they will do

HOST T
TEST T = X
FJMP DIE
COPY #NERV M
MARK DIE
;HALT


I will always get one answer. Which once I got it, means it's safe to send out the next wave.

Rinse and repeat for every node in ascending order. A maximum of 600 cycles later, we're done.

[ed.]
Technically, it's 601.

But at least it's a *LOT* faster than my other solution. There I send out the EXA's and they just send out the nodename as many times as the negative value of the NERV.

Basically, if the hostname is AR755919, and the NERV is -48, then the EXA will just send the hostname value 48 times.

All you have to do on the receiving end is count :D.

That resolves in give or take 20k cycles.
I've recently completed the game and i don't think knowledge of algorithms is necessary. For the last level, I considered a sorting algo for a split second but there's truly no need in order to pass the level. I realise this conversation is old, but the last couple of levels are a step up in difficulty and I think others considering the game, should know that no formal understanding of algorithms is necessary. I also didn't use depth first or the wave approach mentioned above. My solution is not amazing but it got the job done in tenth percentile for cycles.

https://imgur.com/a/0tU8KVm
< >
Showing 1-8 of 8 comments
Per page: 1530 50