EXAPUNKS

EXAPUNKS

View Stats:
cycles vs activity vs size... how does it rank?
Personal preferences aside, how does exapunks define this?

The reason I ask is, sometimes I see a friend with a good cycle score and I wonder at their code size but is that the code size that generated that cycle count or is it their best code size which generated a potentially much poorer cycle count?

If it is linked (and not the best of each individually unconnected along the way) which is shown?

Is a persons best cycle count shown with their poor size and activity before their awesome activity with the poor cycle count?

Often code is a trade-off so I'm wondering what method is done for the histograms scope.

It would be good if there was a combined "score" but I guess the values would be quite subjective.

Has anyone worked out how it's calculated?
< >
Showing 1-10 of 10 comments
It's "the best of each individually unconnected along the way"

I have 2 solutions in TWN4:
112/50/4
306/10/2
And my score in the leaderboard are 112, 10 and 2
Thanks!
this means if you want to beat in all categories you likely need different code versions optimized for that KPI

(Congrats on the 112! you rock with that)

Originally posted by DupLawyer:
Thanks!
this means if you want to beat in all categories you likely need different code versions optimized for that KPI

Yep. That's how all the Zachtronics puzzle game scores work. Gives it a little more longevity for those who want to get good scores in all the categories.
Originally posted by Théophile:
I have 2 solutions in TWN4:
112/50/4
306/10/2
And my score in the leaderboard are 112, 10 and 2
glad to see a fellow optimizer
I have 111/121/3 but it doesn't appear in the leaderboard because of the size exceeds the limit
Originally posted by Arkedis:
Originally posted by Théophile:
I have 2 solutions in TWN4:
112/50/4
306/10/2
And my score in the leaderboard are 112, 10 and 2
glad to see a fellow optimizer
I have 111/121/3 but it doesn't appear in the leaderboard because of the size exceeds the limit

If you want to try, there's a 111/50/6 :)
For size and cycles is simple.
Imagine this puzzle:
Return to #OUTP the numbers from 1 to 10.

Optimising for cycles:
COPY 1 #OUTP
COPY 2 #OUTP
COPY 3 #OUTP
COPY 4 #OUTP
COPY 5 #OUTP
COPY 6 #OUTP
COPY 7 #OUTP
COPY 8 #OUTP
COPY 9 #OUTP
COPY 10 #OUTP

Size: 10
Cycles: 10

Optimising for size:
COPY 9 T
MARK LOOP
SUBI 10 T #OUTP
SUBI T 1 T
TJMP LOOP

Size: 5
Cycles: 31 (I think, I'm writing this while on the toilet 💀)

I don't think you can optimise one of the scores without worsening the other. About activity, I'm not sure how it works right now
activity is simply the number of times you traverse a link. from what i found typically a small size can mean a small cycle count if you optimize it. you just have to know HOW to optimize it. your end cycle count is also just the average of the cycle counts of each test.
Originally posted by pretzelcat:
activity is simply the number of times you traverse a link. from what i found typically a small size can mean a small cycle count if you optimize it. you just have to know HOW to optimize it. your end cycle count is also just the average of the cycle counts of each test.
True, I remember learning that.
I guess that the optimisation for activity is to avoid sending too many EXAs through the links and instead use REPL on the target host and M register.
By the way, does someone knows how to properly send data between EXAs in the same mode? I mean, if I have 6 EXAs and they must work in couples, how would they send data without switching partners accidentally?
Originally posted by ElTruenito:
Originally posted by pretzelcat:
activity is simply the number of times you traverse a link. from what i found typically a small size can mean a small cycle count if you optimize it. you just have to know HOW to optimize it. your end cycle count is also just the average of the cycle counts of each test.
True, I remember learning that.
I guess that the optimisation for activity is to avoid sending too many EXAs through the links and instead use REPL on the target host and M register.
By the way, does someone knows how to properly send data between EXAs in the same mode? I mean, if I have 6 EXAs and they must work in couples, how would they send data without switching partners accidentally?

complicate to do, a perfect sync of the code would be needed so that always the two needed exas communicate and the others do something else.
Originally posted by dark-breed:
Originally posted by ElTruenito:
does someone knows how to properly send data between EXAs in the same mode?

complicate to do, a perfect sync of the code would be needed so that always the two needed exas communicate and the others do something else.

To simplify calculations and visualize the loop, I usually mark the loop operations with ;1 ;2 etc. This way, I can immediately see which punk is doing what. Then I balance the loop sizes of all agents by using NOOP, and ensure that all communication between pairs of agents only occurs when other punks are busy or simply waiting.

By the way, near-perfect results are easily achieved in this game.

Possible spoilers...

First, write the simplest and most strightforward code possible, with a minimum number of loops and checks. If the code fits within the limit, it will likely become the cycles leader. If not, modify it, adding as few loops as possible. If necessary, you can run multiple EXAs at once.

Next, make a copy of the solution and this time try to fit everything into loops. The minimum loop is five lines (set counter, mark, counter increment, operation, jump), so if a loop can replace more than 5 lines, it's necessary. Also, if a lot of actions performs on the first host, you can run multiple EXAs—this will save another line of code. And, of course, make extensive use of macroinstructions. Half the time, the resulting code will be among the best.

The best performance is consistently achieved by using only one robot, which traverses the entire route once without returning. If necessary, keep a replica on each host, and if information exchange between different hosts is required, use exclusively M-channel transmissions.

I most enjoyed optimizing the code for minimal activity, and by the end of the game, I was primarily chasing this metric.
Optimizing code for minimal size can also be interesting if you have an original idea for how to combine multiple operations into a neat structure, but, as I mentioned above, it's not necessary half the time.
However, for some reason, I didn't like optimizing the code for minimal loops, even though this would seem to be the most important requirement for the code. In most cases, this metric is achieved as described in the guide, by using unexciting methods. Sometimes, it helps to input data into a file in the correct order and then read it directly (this simplifies maps with a large number of hosts to optimize movement between them). Only a couple of problems were solved by the combined efforts of several mechs, which was a nice touch.
< >
Showing 1-10 of 10 comments
Per page: 1530 50