7 Billion Humans

7 Billion Humans

View Stats:
mrtong96 Sep 21, 2018 @ 10:00pm
Year 66 Decimal Counter: 43 second solution
Hi all,

Decided to use the same dirty trick (#2) as described in https://steamcommunity.com/app/792100/discussions/0/1732087824987330160/ again. This time am applying it to a speed OCD challenge that is mostly about how fast you can display the numbers. This solution is beats the fastest beta solution of 46 seconds. Using this strategy, 42 seconds might (?) be possible, (can hardcode the all the non-1s digits in separate paths, maybe be more intelligent about optimizing the number of if statements all of the number-writers use), but 41 seconds if definitely impossible using this strategy. More details about how the code works and solution are below.

More detailed solution explanation

First will talk about the delay strategy. Instead of using the "tell" and "listen" commands, you can use synchronize workers with no-ops where you have a worker doing things for the sole purpose of wasting time. In this manner the faster workers wastes a specific amount of time to wait for the slower ones. In order of most time consuming to least, the no-ops I use in this problem are the "step n/s", "if c == c", and "mem4 = set 0" commands respectively. You can also use the calc command, but I didn't bother in this case. Since the set command runs really quickly (probably ~1-3 frames), you can have very fine-grained control over the exact delay of your workers. This is important for figuring out how much delay to use.

To figure out how much delay to use, it's really just trial and error, start with the larger delays, (in my case the step command) and add more and more delay until the delayed worker is too slow. Then progressively move to smaller and smaller delays until the timing is perfect. One nice thing about this problem (and all the other counting problems) is that you can just look at how the numbers get displayed, that way you can fast forward and just watch the counter numbers for timing.

And that's really it. From trial and error, it turns out the sequence "pick up, write, drop" takes exactly as long as 4 step commands, an if comand, a jump command, and 6 set commands. Once the loop is established, it's pretty easy to understand the rest of the program. It just runs these two loops that are perfectly synced up until the problem's done.

Solution

-- 7 Billion Humans (2145) -- -- 66: Decimal Counter -- step s if s == button: step n step s if c == c: endif step s a: step n step n if c == c: endif mem4 = set 0 mem4 = set 0 mem4 = set 0 mem4 = set 0 mem4 = set 0 mem4 = set 0 step s step s jump a endif pickup c step s if myitem == 1 or myitem == 8: if myitem == 1: mem4 = set 0 mem4 = set 0 mem4 = set 0 b: drop pickup c write 2 drop pickup c write 3 drop pickup c write 4 drop pickup c write 5 drop pickup c write 6 drop pickup c write 7 drop pickup c write 8 drop pickup c write 9 drop pickup c write 0 drop pickup c write 1 jump b else: mem1 = set 8 mem2 = set 9 mem3 = set 0 endif else: if myitem == 9: mem1 = set 9 mem2 = set mem1 mem3 = set 0 else: mem1 = set 0 mem2 = set 0 mem3 = set 1 endif endif drop pickup c write mem1 drop pickup c write mem1 drop pickup c write mem1 drop pickup c write mem1 drop pickup c write mem1 drop pickup c write mem1 drop pickup c write mem1 drop pickup c write mem1 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem2 drop pickup c write mem3 drop pickup c write mem3 drop pickup c write mem3 drop
Last edited by mrtong96; Sep 21, 2018 @ 10:07pm
< >
Showing 1-1 of 1 comments
Futae Yamagawa Sep 22, 2018 @ 2:56am 
Hax. Shenanigans. 46 seconds was the ...

...hang on a moment....

...

Oh.

...

Go figure. My 46 second solution still uses a couple tells. I went OCD here, not OCD+, and my solution was elegant enough to make me leave it as I had it.

Well done beating the time.
My solution wasn't full on OCD+, but was close enough to an OCD+ effort for time I know you had to work to beat it.


My decimal counter from beta:

-- 7 Billion Humans (2145) -- -- 66: Decimal Counter -- mem1 = set se if mem1 != worker and mem1 != datacube: mem4 = set w endif step s if mem1 == worker or mem1 == datacube: pickup c mem4 = set myitem step s drop if mem4 == 0 or mem4 == 9: listenfor ready listenfor go pickup c if mem4 == 0: write 1 else: write 0 endif drop comment 0 a: jump a endif if mem4 == 8: b: if mem1 == 9: listenfor go pickup c write 9 drop else: jump b endif c: if mem1 == 9: tell everyone ready listenfor go pickup c write 0 drop comment 1 d: jump d else: jump c endif endif e: if mem4 < 8: if mem4 < 4: if mem4 < 2: if mem4 == 0: pickup c write 1 else: pickup c write 2 endif else: if mem4 == 2: pickup c write 3 else: pickup c write 4 endif endif else: if mem4 < 6: if mem4 == 4: pickup c write 5 else: pickup c write 6 endif else: if mem4 == 6: pickup c write 7 else: pickup c write 8 endif endif endif else: if mem4 == 8: pickup c write 9 else: tell everyone go pickup c write 0 endif endif drop jump e endif mem1 = set w f: step s if mem1 == 9: listenfor go endif step n step n step n step s step s jump f DEFINE COMMENT 0 eJztzDsKwgAQhOH/OqLgEwubHEIbBcFKbxCCpliihhglKIiFlZWFlWUIIiI5mJMcwToDHyzDsG0Uh5bV 6VCnL57VOEhmbVLrkTEQh3cxpYlHV3q4WrtlN2QjqTxsxNXGxEwImRLYTOYktuBbTC0kskB8dT5nW3GR qy25yUt3bmtyttpH+hnzZM9dzhZztB1J+edEQz521LZKlSp/5wdPKDbK; DEFINE COMMENT 1 eJzt0L9KgmEUx/HvhTg2iJRDQgZim0P/IAoqcCpvoDGKN39QpOnr5uDQJCIRIU3REBISXYBEiMSLg1NE 1+Cv9zbywAceznOewzlPAVCOhJIkSHJCigel+GCJoTKMleVLq0TkiZRnzF/9IldK2zJVMoSscB3n17m1 njZ4th+LtMmntnjVNn126bBHW/t24PMhdyryqBJ9G+iYNxvpiEncr0qXCl1dcq8LCzxb4PpzXmygM95t SMCUMt8q86tKbOq3kY10413q7h/yRMOzhXRUo0mNljVV59R2nF/z/YIa/oV5zOMfxQxP7V0x;
< >
Showing 1-1 of 1 comments
Per page: 1530 50