Two programs, one always running
The game won’t let an agent edit a program while it runs. On seed 1, two and a half minutes in, Argon’s edit was refused, and two minutes later it had found a way round it:
… I can write to non-running programs, `main` and `p1`, without needing to stop them first. …
From then on it kept two programs, main and p1, and wrote each new version into whichever wasn’t running, then switched to it: 32 versions between them, with the farm never stopped. On seeds 2 and 3 it kept to a single main, stopped and rewrote it (37 and 34 revisions). Its thinking on seed 1 is full of arithmetic like this, working out costs and yields before each purchase. Cursor recorded no thinking on seeds 2 and 3, so there the code is the only record of its reasoning.
Weird substance on a checkerboard
Weird substance comes from infected plants, and it is what mazes are made from. On seed 1, 28 minutes in, Argon’s thinking worked out a rule for making more of it:
… using `Weird_Substance` on even tiles only affects odd neighbors, guaranteeing even tiles remain uninfected …
Its crop program puts trees on every square where x + y is even, and uses a weird substance on each of those trees just before harvesting it, up to a cap of 500 million:
for y in range(ws):
px = get_pos_x()
py = get_pos_y()
if can_harvest():
if get_entity_type() == Entities.Tree and (px + py) % 2 == 0:
if num_items(Items.Weird_Substance) < 500000000 and num_items(Items.Weird_Substance) > max_drones():
use_item(Items.Weird_Substance)
harvest()
elif get_entity_type() == Entities.Pumpkin or get_entity_type() == Entities.Cactus or get_entity_type() == Entities.Sunflower:
till()
till()
pos = (px, py)
if pos in companions:
want = companions[pos]
else:
if (px + py) % 2 == 0:
want = Entities.Tree
elif py % 2 == 0:
want = Entities.Carrot
else:
want = Entities.GrassSeed 1's final crop worker: trees go on even squares, and each gets a weird substance just before it is harvested.
The first version made 1,232 weird substance in 70 seconds, and the first gold followed two minutes later. On seeds 2 and 3 the crop programs fertilized as they planted instead, and fertilized plants come out infected. By different routes, all three seeds ended on 482 to 514 million weird substance. On the same seeds Opus produced 0.6 to 1.4 million, most of which it spent on mazes.
The farm bought its own upgrades
On seed 1, 47 minutes in, Argon bought Auto Unlock and saw what it allowed:
… I can call `unlock()` directly within my loop, bypassing tool calls entirely. …
The next version of its main loop buys upgrades as it goes, after the phase that pays for them:
while True:
if num_items(Items.Power) < 200 and num_items(Items.Carrot) >= 200:
farm_power()
if num_items(Items.Cactus) < 25000 and num_items(Items.Pumpkin) >= 400:
do_cactus_field()
unlock(Unlocks.Dinosaurs)
if num_items(Items.Bone) < 30000 and num_items(Items.Cactus) >= 500:
do_dinosaur()
unlock(Unlocks.Polyculture)
if num_items(Items.Pumpkin) < 70000 and num_items(Items.Carrot) >= 18000:
unlock(Unlocks.Pumpkins)
while num_items(Items.Pumpkin) < 70000 and num_items(Items.Carrot) >= 2000:
do_giant_pumpkin()
run_parallel_cols(basics_cols)
unlock(Unlocks.Trees)
unlock(Unlocks.Carrots)
unlock(Unlocks.Grass)
unlock(Unlocks.Watering)
unlock(Unlocks.Fertilizer)Seed 1 at 47m: each phase is followed by unlock() calls for the upgrades it pays for.
From then on its programs bought 60 of seed 1’s 120 upgrades, including the last three Megafarm levels, and the farm had 32 drones by 1h41m and the full 32×32 field by 1h57m. Opus, Sol and Grok never call unlock(), and Argon didn’t again on seeds 2 or 3, which bought every upgrade by hand and finished the tree about an hour later. Seed 3 still scored highest of the three, so this was a matter of style more than of score.
A drone on every square of the maze
Mazes turn weird substance into gold, and a maze can be reused: weird substance on its treasure collects it and moves it somewhere else in the maze. Opus, on seed 1, gave each drone its own small maze and went back to one shared maze with every drone hunting the treasure. Argon read the same documentation on seed 1 at 1h10m and took a different line: if the treasure keeps moving, put a drone wherever it might land.
By the end of every seed its gold phase worked the same way: shrink the field to 5×5, send a drone to each of the 25 squares, and have each one wait. Whichever drone the treasure appears under spends weird substance on it, which pays out and moves it on:
def maze_drone(pos):
move_to(pos[0], pos[1])
sub = 5 * (2 ** (num_unlocked(Unlocks.Mazes) - 1))
while num_items(Items.Power) > 1000 and num_items(Items.Gold) < 105000000 and num_items(Items.Weird_Substance) >= sub * 50:
if get_entity_type() == Entities.Treasure:
use_item(Items.Weird_Substance, sub)
if get_entity_type() == Entities.Treasure:
harvest()Seed 3: each of the 25 drones stands on its own square and reuses the treasure whenever it lands there.
Once they are in place, no drone walks the maze. On seed 2 the design arrived at 4h24m, and its first full minute made 1,357,600 gold; seed 3 had it from 2h48m. Gold finished at 70 million on seed 1, 52 million on seed 2 and 56 million on seed 3, against Opus’s 8.9, 2.6 and 6.0 million on the same seeds.
A tail as long as the field
Bones come from a dinosaur that grows a tail by eating apples, paid out when the hat comes off. On seed 1 Argon shrank the field to 16×16 for the dinosaur, much as Opus did at 10×10. On seeds 2 and 3 it went the other way: a path through all 1,024 squares of the full field, which the tail fills until the dinosaur can’t move.
Each of those runs paid 33,488,928 bones, but took about half an hour. On seed 2 the dinosaur phase ran for 59 minutes, paying out half an hour in and again, and added 1.83 points; on seed 3 one run took most of 41 minutes. Bones were already in the millions by then, and the score rewards each tenfold the same, so these were long hours for little score.
What decided the score
Argon’s crops were in the same range as Opus’s and Sol’s, hundreds of millions to billions each of hay, wood and carrots: ahead of both on seeds 1 and 3, behind Sol on seed 2. Where it pulled away was everything else. On seed 3, its crops scored 2.3 points more than Opus’s, but weird substance scored 8.7 points against 6.2, cactus 9.1 against 7.9, pumpkins 8.5 against 7.5 and gold 7.8 against 6.8:
After every upgrade was bought, its last stint ran uninterrupted to the end of the game, for 1h25m to 3h13m. On seed 3 a ten-minute stretch of that program made 9.0 billion wood, 1.1 billion hay and 1.1 billion carrots. Each run cost $2.88 to $4.30.