EXAPUNKS

EXAPUNKS

View Stats:
Unknown Network 1 - Identifying EXA
I'm having trouble figuring out how to branch out at the end of the network.

So far I'm asking each EXA to replicate itself twice, send one through 800 and the other through 801, and then it dies from lack of instructions. This repeats until I reach the end nodes.

Now I'm aware that I can just ask all EXAs to kill and then grab the file if there's any, but herein lies my problem. If I try grabbing a file first, my starting bot terminates without replicating, due to there not being a file to grab. If I replicate first, the EXA that's in the same host as the EXA with the file, gets stuck as it can't replicate itself due to lack of space.

Now if I could use a form of if/else in the form of testing for something, I could choose which of the two to do. But I don't see anything possible for testing for, the only obvious choice would be the host names for the end node but they differ along the row.

So what am I overlooking?
< >
Showing 1-5 of 5 comments
I'd say you're overlooking two things.
First, why are you replicating twice, instead of repurposing the EXA? This isn't going to help with your actual problem, but just efficiency.

Second, you can check to see if you're at the end of the network because there is something about the network you can tell your EXAs. It's not something you can ask the network though.
Hint: How many levels deep is the network?
The task is obviously meant for recursion, and thus replicating EXAs. Repurposing an EXA just leads to a ton of spaghetti code.

But you're right about your solution, I was thinking more along the lines of something akin to isLeaf() if this was coded as a graph instead. So it never occured to me to use a hack like that.
Yeah, if this was a proper programming and computing environment we wouldn't have to resort to little hacks, and what likely amounts to a bit of metagaming.
ugh. I was trying this exact method and was so stuck because I didn't realize I could use that to figure out when to grab the file. I had them replicating twice and then attempting to get the file, since they'll suicide if it's not there.
Now I'm aware that I can just ask all EXAs to kill and then grab the file if there's any, but herein lies my problem. If I try grabbing a file first, my starting bot terminates without replicating, due to there not being a file to grab. If I replicate first, the EXA that's in the same host as the EXA with the file, gets stuck as it can't replicate itself due to lack of space.
If you don't want to metagame, why not send out a wave of (self-replicating) killers first, then a wave of (self-replicating) grabbers, just on a short delay?
< >
Showing 1-5 of 5 comments
Per page: 1530 50