7 Billion Humans

7 Billion Humans

View Stats:
ramsza Sep 5, 2018 @ 1:28pm
Year 26 Budget Brigade 2
I'm curious about the shortest possible solution with size 8. Can anyone please tell me or give me a some hints?
So far I got to size 9 but I have no idea how to go lower.

For those who are interested in speed, I will add my solution with 67 seconds below.

Solution size 9:

-- 7 Billion Humans (2087) --
-- 26: Billig-Brigade 2 --

a:
if s == worker or
s == printer:
takefrom s
endif
if e < 50:
takefrom e
endif
if w >= 50:
takefrom w
endif
if s == shredder and
myitem == datacube:
giveto s
endif
jump a


Solution speed 67 seconds:

-- 7 Billion Humans (2087) --
-- 26: Billig-Brigade 2 --

if s == printer:
a:
takefrom s
giveto n
jump a
endif
if s == worker and
nw != worker:
b:
if myitem == datacube:
giveto n
endif
jump b
endif
if nw == worker:
c:
if myitem == datacube:
if myitem < 50:
giveto nw
else:
giveto ne
endif
endif
jump c
endif
if s == worker and
n == hole:
jump d
endif
if s == shredder:
e:
if myitem == datacube:
giveto s
endif
jump e
endif
f:
g:
if myitem < 50:
giveto w
jump g
endif
h:
if myitem >= 50:
giveto e
jump h
endif
jump f
d:
< >
Showing 1-3 of 3 comments
michaeljhuman Sep 5, 2018 @ 8:04pm 
Thank you very much for the code. I didn't even think about doing an if for worker or printer. Not being offensive when I say it's obvious in retrospect but I didn't even think of it :) I did try to get to 8. You have to have a command for each direction I think, and that's 4; I can't see a way around that req. Each has to have an if statement, that makes 8. One for the jump is 9. If you remove the if statement from the take down, then the people over the shredders will try to take from shredder with humerous consequence ;) The people taking left or right have to know which side they are on. The people above the shredders have to have an if statement, how else would that work? If there's an 8 solution, I can't fathom it.
Last edited by michaeljhuman; Sep 5, 2018 @ 8:25pm
missbackpack Aug 25, 2019 @ 10:08pm 
8 commands is possible.


The trick is to use complex conditionals in if statements, the fact that some statements are harmless even when they're not appropriate (for example it's always safe to give up), and the fact that the solution only has to pass > 50% of the time (sometimes programs with race conditions are shorter).

In my solution I had:
* One if statement that performed both the printing and give-left operations
* One if statement that performed both the shredding and give-right operations
* An unconditional give-up operation.

-- 7 Billion Humans (2214M) --
-- 26: Budget Brigade 2 --

a:
if s == printer or
myitem < 50:
takefrom s
giveto w
endif
if s == shredder and
myitem == datacube or
myitem >= 50 and
n == hole:
giveto s
giveto e
endif
giveto n
jump a
ramsza Aug 26, 2019 @ 1:17am 
Thank you. I didn't think I would receive a reply nearly a year after my original post
< >
Showing 1-3 of 3 comments
Per page: 1530 50