Claude Opus 5.5, seed 1

Claude Code · medium reasoning effort

ValidCounts toward the meanGame-time budget used

  • Hay 359m produced, 8.56 points
  • Wood 2.66b produced, 9.42 points
  • Carrot 363m produced, 8.56 points
  • Pumpkin 89.7m produced, 7.95 points
  • Cactus 181m produced, 8.26 points
  • Power 7.3k produced, 3.86 points
  • Bone 4.01m produced, 6.60 points
  • Weird substance 877k produced, 5.94 points
  • Gold 8.91m produced, 6.95 points
  • Water 263k produced, 5.42 points
  • Fertilizer 13.2k produced, 4.12 points

Produced by the end of the run. Pips: points each resource adds to the score, one per tenfold.

Score · economy-v1
75.65orders of magnitude · model mean 75.54
On seed 1
#1of 8 models
Cost
$6.19API-equivalent estimate
Real time
26m 38swall clock, not scored
timelineeconomy-v1 · sampled every 10 game-seconds

Score and what the agent did, over game time

Ticks under the axis: upgrade purchases.

Data table
Game timeScore
0s0.00
1h 00m30.9
2h 00m47.4
3h 00m55.2
4h 00m64.7
5h 00m70.6
6h 00m75.7
said2m 00s · Farming hay with a loop; next buying speed, then expand and plant.5m 10s · Setting up bushes for wood alongside grass.8m 37s · Expanding to 3x3 and writing a full-grid farming loop.12m 15s · Unlocked senses/variables/functions; now writing a general grid farmer.23m 15s · Pumpkin phases working (216 per harvest). Rebalancing toward hay and buying upgrades.32m 35s · Fixing a bug where leftover carrots blocked the pumpkin merge.43m 05s · Adding sunflowers for power and using fertilizer on pumpkins (to grow faster and produce weird substance for mazes).52m 41s · Mazes work: 40 weird substance → 320 gold in ~20s. Integrating mazes into the main loop.59m 01s · Bought cactus. Rewriting everything for multiple drones (column-split), plus a cactus sorting phase.1h 05m · Cactus phase works (4096 per harvest). Checking dinosaurs next.1h 08m · Dinosaur snake gives ~4000 bones/minute. Adding to the main loop.1h 22m · Timing shows mazes take 161s vs. mixed 12s. Writing a smarter maze solver (BFS with wall memory + treasure reuse) and making the mixed phase time-based.1h 25m · BFS solver was slower (compute cost). Reverting to wall-following.1h 45m · Expanded to 12x12. Buying yield upgrades.2h 00m · Maze phase is the slowest (267s). Replacing the wall-follower with a target-directed DFS.2h 02m · Multiple quadrant mazes work in parallel. Generalizing the solver to per-drone regions.2h 07m · Parallel separate mazes interfere (harvesting one clears all). Switching to one full-field maze, reused, with all drones hunting the treasure.2h 20m · Running well: 8 drones now. Buying more upgrades.2h 20m · Dino phase is now the slowest (215s). Writing a shortcut-taking snake that stays safe along a Hamiltonian cycle.2h 34m · Still testing the improved snake; it's slow near full length. Waiting for it to finish.2h 37m · Hybrid snake: 127s (vs 215s). Back to the main loop.2h 43m · Polyculture is now 40x multiplier — big. Implementing companion planting in the mixed phase.2h 45m · Polyculture: 818k wood, 268k carrots in 60s. Buying upgrades.2h 55m · Now 16x16 with 16 drones. Updating polyculture to use rectangular regions.3h 12m · Now updating the dino shortcut threshold and poly regions.3h 28m · Expanded to 22x22. Fixing poly region bounds for non-divisible sizes.3h 54m · Bought megafarm (32 drones), polyculture 5, and more. Updating main loop to run the slow dino phase every other loop.4h 35m · Maze got stuck at the 300-relocation limit. Fixing: harvest if the treasure doesn't move.4h 59m · Maze phase overran (796s). Buying upgrades and adding a time cap to maze reuse.5h 14m · Adding a time-capped dino phase to the loop for bones.5h 30m · Dino at 32x32 yields too little in its time cap; removing it for the final stretch.6h 00m · I used the full 6-hour budget. The farm went from one grass tile to a 32x32 field run by 32 drones, and it produced 12 kinds of resource: hay, wood, carrots, pusaid: 32 entries, first at 2m 00s
runningrunning: 51 entries, first at 50s
errorserrors: 3 entries, first at 1h 34m

Said: the agent's own progress messages. Thought: its thinking as the agent reported it. Read: docs and research. Wrote: program saves. Running: which program the farm ran. Text sits at the game time it was written; the game is paused while the agent thinks. Dots open the step in the log below.

how-it-playedcompared with Claude Opus 5.5's 3 valid seeds and the 8 models on seed 1

How it played

MeasureThis runModel meanSeed 1 meanWhat it counts
Resources opened11 of 1111 of 119.4 of 11scored resources produced at least once
Study243140docs and research reads
Action overhead12%11%9%game time spent looking, reading and typing (10 s per call)
Tool calls253248186every action the agent took
Program writes685733accepted saves of a program
Program stints514530times a program was started and left running
Median stint3m 20s3m 05s13m 58show long a program usually ran before the next change
Cost per point$0.082$0.071$0.069API-equivalent estimate ÷ score

Farm idle 6% of samples; longest stint 41m 00s; 3 rejected writes.

production11 of 11 resources produced

Production and holdings

Each resource on its own scale. Ticks: purchases of the upgrade that feeds it. On the log scale each tenfold rise is one point.

  • Produced (cumulative, what the score counts)
  • Held (after spending)
Vertical scale
Wood2.7B produced · 9.42 pts
Wood2.7B produced · 9.42 pts
Carrot362.9M produced · 8.56 pts
Carrot362.9M produced · 8.56 pts
Hay359.3M produced · 8.56 pts
Hay359.3M produced · 8.56 pts
Cactus180.7M produced · 8.26 pts
Cactus180.7M produced · 8.26 pts
Pumpkin89.7M produced · 7.95 pts
Pumpkin89.7M produced · 7.95 pts
Gold8.9M produced · 6.95 pts
Gold8.9M produced · 6.95 pts
Bone4M produced · 6.60 pts
Bone4M produced · 6.60 pts
Weird substance876.8K produced · 5.94 pts
Weird substance876.8K produced · 5.94 pts
Water263.5K produced · 5.42 pts
Water263.5K produced · 5.42 pts
Fertilizer13.2K produced · 4.12 pts
Fertilizer13.2K produced · 4.12 pts
Power7.3K produced · 3.86 pts
Power7.3K produced · 3.86 pts
upgrades112 levels across 25 upgrades

Upgrade timeline

loopsloops: 1 entry, first at 1m 10s
speedspeed: 5 entries, first at 2m 10s
expandexpand: 9 entries, first at 2m 10s
plantplant: 1 entry, first at 5m 00s
carrotscarrots: 10 entries, first at 8m 10s
operatorsoperators: 1 entry, first at 11m 07s
variablesvariables: 1 entry, first at 12m 15s
functionsfunctions: 2 entries, first at 12m 15s
sensessenses: 1 entry, first at 12m 15s
treestrees: 10 entries, first at 14m 05s
wateringwatering: 9 entries, first at 16m 15s
pumpkinspumpkins: 10 entries, first at 19m 25s
grassgrass: 9 entries, first at 23m 25s
fertilizerfertilizer: 4 entries, first at 28m 15s
listslists: 1 entry, first at 37m 15s
debugdebug: 1 entry, first at 37m 15s
sunflowerssunflowers: 1 entry, first at 42m 45s
importimport: 1 entry, first at 42m 45s
timingtiming: 1 entry, first at 47m 45s
mazesmazes: 6 entries, first at 51m 25s
megafarmmegafarm: 5 entries, first at 58m 11s
cactuscactus: 6 entries, first at 58m 51s
dinosaursdinosaurs: 6 entries, first at 1h 06m
hatshats: 6 entries, first at 1h 06m
polyculturepolyculture: 5 entries, first at 1h 33m
Every purchase, with what the agent was told
Game timeCallUnlockedResult the agent saw
1m 00s{"upgrades":["loops"]}loops 1Bought loops, now level 1. Paid hay 5. Its tutorial is docs page docs/scripting/while.md.
2m 00s{"upgrades":["speed","expand"]}speed 1, expand 1Bought speed, now level 1. Paid hay 20. Its tutorial is docs page docs/unlocks/speed.md.
4m 50s{"upgrades":["plant","speed"]}plant 1Bought plant, now level 1. Paid hay 50. Its tutorial is docs page docs/unlocks/plant.md.
8m 00s{"upgrades":["carrots","speed","expand"]}carrots 1, speed 2Bought carrots, now level 1. Paid wood 50. Its tutorial is docs page docs/unlocks/carrots.md.
8m 37s{"upgrades":["expand"]}expand 2Bought expand, now level 2. Paid wood 20. Its tutorial is docs page docs/unlocks/expand_1.md.
10m 57s{"upgrades":["speed","operators","variables"]}speed 3, operators 1Bought speed, now level 3. Paid wood 50, carrot 50. Its tutorial is docs page docs/unlocks/speed.md.
12m 05s{"upgrades":["variables","functions","senses"]}variables 1, functions 1, functions 1, senses 1Bought variables, now level 1. Paid carrot 35. Its tutorial is docs page docs/scripting/variables.md.
13m 55s{"upgrades":["trees","expand"]}trees 1, expand 3Bought trees, now level 1. Paid wood 50, carrot 70. Its tutorial is docs page docs/unlocks/trees.md.
16m 05s{"upgrades":["watering","expand","speed"]}watering 1, expand 4Bought watering, now level 1. Paid wood 50. Its tutorial is docs page docs/unlocks/watering.md.
16m 25s{"upgrades":["carrots"]}carrots 2Bought carrots, now level 2. Paid wood 250. Its tutorial is docs page docs/unlocks/carrots.md.
19m 15s{"upgrades":["pumpkins","watering"]}pumpkins 1, watering 2Bought pumpkins, now level 1. Paid wood 500, carrot 200. Its tutorial is docs page docs/unlocks/pumpkins.md.
23m 15s{"upgrades":["grass","watering","speed"]}grass 2, watering 3, speed 4Bought grass, now level 2. Paid hay 300.
28m 05s{"upgrades":["expand","fertilizer","watering"]}expand 5, fertilizer 1Bought expand, now level 5. Paid pumpkin 1000. Its tutorial is docs page docs/unlocks/expand_1.md.
37m 05s{"upgrades":["lists","watering","trees","speed","debug"]}lists 1, watering 4, trees 2, debug 1Bought lists, now level 1. Paid carrot 500. Its tutorial is docs page docs/scripting/lists.md.
42m 35s{"upgrades":["carrots","grass","sunflowers","import","fertilizer"]}carrots 3, grass 3, sunflowers 1, import 1, fertilizer 2Bought carrots, now level 3. Paid wood 1250. Its tutorial is docs page docs/unlocks/carrots.md.
47m 35s{"upgrades":["speed","pumpkins","timing"]}speed 5, timing 1Bought speed, now level 5. Paid carrot 1000. Its tutorial is docs page docs/unlocks/speed.md.
51m 15s{"upgrades":["mazes","pumpkins"]}mazes 1, pumpkins 2Bought mazes, now level 1. Paid weird_substance 1000. Its tutorial is docs page docs/unlocks/mazes.md.
58m 01s{"upgrades":["megafarm"]}megafarm 1Bought megafarm, now level 1. Paid gold 2000. Its tutorial is docs page docs/unlocks/megafarm.md.
58m 41s{"upgrades":["cactus","fertilizer","carrots","trees"]}cactus 1, fertilizer 3, carrots 4, trees 3Bought cactus, now level 1. Paid pumpkin 5000. Its tutorial is docs page docs/unlocks/cactus.md.
1h 05m{"upgrades":["dinosaurs"]}dinosaurs 1, hats 1Bought dinosaurs, now level 1. Paid cactus 2000. Its tutorial is docs page docs/unlocks/dinosaurs.md.
1h 15m{"upgrades":["megafarm"]}megafarm 2Bought megafarm, now level 2. Paid gold 8000. Its tutorial is docs page docs/unlocks/megafarm.md.
1h 33m{"upgrades":["mazes","grass","pumpkins","polyculture"]}mazes 2, grass 4, pumpkins 3, polyculture 1Bought mazes, now level 2. Paid cactus 12000. Its tutorial is docs page docs/unlocks/mazes.md.
1h 45m{"upgrades":["expand"]}expand 6Bought expand, now level 6. Paid pumpkin 8000. Its tutorial is docs page docs/unlocks/expand_1.md.
1h 45m{"upgrades":["carrots","pumpkins","grass","trees","watering","dinosaurs"]}carrots 5, pumpkins 4, grass 5, trees 4, watering 5, dinosaurs 2, hats 1Bought carrots, now level 5. Paid wood 31200. Its tutorial is docs page docs/unlocks/carrots.md.
2h 00m{"upgrades":["fertilizer"]}fertilizer 4Bought fertilizer, now level 4. Paid wood 54000. Its tutorial is docs page docs/unlocks/fertilizer.md.
2h 16m{"upgrades":["megafarm"]}megafarm 3Bought megafarm, now level 3. Paid gold 32000. Its tutorial is docs page docs/unlocks/megafarm.md.
2h 20m{"upgrades":["mazes","carrots","grass","trees","watering","dinosaurs"]}mazes 3, carrots 6, trees 5Bought mazes, now level 3. Paid cactus 72000. Its tutorial is docs page docs/unlocks/mazes.md.
2h 43m{"upgrades":["polyculture","polyculture","polyculture","polyculture"]}polyculture 2, polyculture 3Bought polyculture, now level 2. Paid bone 10000. Its tutorial is docs page docs/unlocks/polyculture.md.
2h 45m{"upgrades":["grass","watering","trees","pumpkins","cactus"]}grass 6, watering 6, trees 6, pumpkins 5, cactus 2Bought grass, now level 6. Paid wood 62500.
2h 55m{"upgrades":["expand","megafarm","carrots","dinosaurs","grass","watering"]}expand 7, megafarm 4, carrots 7, dinosaurs 3, hats 1, grass 7, watering 7Bought expand, now level 7. Paid pumpkin 64000. Its tutorial is docs page docs/unlocks/expand_1.md.
3h 11m{"upgrades":["polyculture","pumpkins","trees","grass","watering"]}polyculture 4, pumpkins 6, trees 7, grass 8, watering 8Bought polyculture, now level 4. Paid bone 250000. Its tutorial is docs page docs/unlocks/polyculture.md.
3h 27m{"upgrades":["expand","mazes","carrots","grass","trees","watering","watering"]}expand 8, mazes 4, carrots 8, grass 9, trees 8, watering 9Bought expand, now level 8. Paid pumpkin 512000. Its tutorial is docs page docs/unlocks/expand_1.md.
3h 53m{"upgrades":["megafarm","polyculture","cactus","pumpkins","pumpkins","carrots","trees","grass","dinosaurs"]}megafarm 5, polyculture 5, cactus 3, pumpkins 7, pumpkins 8, carrots 9, trees 9, dinosaurs 4, hats 1Bought megafarm, now level 5. Paid gold 512000. Its tutorial is docs page docs/unlocks/megafarm.md.
4h 09m{"upgrades":["grass","mazes","cactus","cactus","pumpkins","carrots","trees","dinosaurs"]}grass 10, cactus 4, pumpkins 9, carrots 10, trees 10Bought grass, now level 10. Paid wood 39100000.
4h 38m{"upgrades":["expand"]}expand 9Bought expand, now level 9. Paid pumpkin 4100000. Its tutorial is docs page docs/unlocks/expand_1.md.
4h 59m{"upgrades":["cactus","mazes","dinosaurs","cactus","mazes"]}cactus 5, mazes 5, dinosaurs 5, hats 1Bought cactus, now level 5. Paid pumpkin 4320000. Its tutorial is docs page docs/unlocks/cactus.md.
5h 14m{"upgrades":["pumpkins","cactus","mazes","dinosaurs"]}pumpkins 10, mazes 6, dinosaurs 6, hats 1Bought pumpkins, now level 10. Paid carrot 65500000. Its tutorial is docs page docs/unlocks/pumpkins.md.
5h 46m{"upgrades":["cactus"]}cactus 6Bought cactus, now level 6. Paid pumpkin 25900000. Its tutorial is docs page docs/unlocks/cactus.md.

Programs 71 writes, code as the agent wrote it

main.py29 writes · 26 ran · first at 30s
  1. r130sRan20 lines · ran 10s
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    harvest()
    Write result the agent saw
    Saved main (20 lines).
    Game time: 40s elapsed, 5h 59m 20s of budget remaining.
    run_program at 40s for 60s (agent saw)
    Ran main for 10s of game time; it finished.
    Inventory change: hay +20.
    Game time: 1m elapsed, 5h 59m of budget remaining.
    Output:
    (none)
  2. r21m 10sRan2 lines · +2 −20 · ran 2m 00s
    while True:
    	harvest()
    Changes from the previous revision
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    - harvest()
    + while True:
    + 	harvest()
    
    Write result the agent saw
    Saved main (2 lines).
    Game time: 1m 20s elapsed, 5h 58m 40s of budget remaining.
    run_program at 1m 20s for 30s (agent saw)
    Ran main for 30s of game time; it is still running.
    Inventory change: hay +60.
    Game time: 2m elapsed, 5h 58m of budget remaining.
    Output:
    (none)
    run_program at 2m 30s for 40s (agent saw)
    Ran main for 40s of game time; it is still running.
    Inventory change: no change.
    Game time: 3m 20s elapsed, 5h 56m 40s of budget remaining.
    Output:
    (none)
  3. —2m 20sRejected
    while True:
    	harvest()
    	move(North)
    Write result the agent saw
    Stop the program before editing it.
  4. r33m 30sRan3 lines · +1 −0 · ran 1m 40s
    while True:
    	harvest()
    	move(North)
    Changes from the previous revision
      while True:
      	harvest()
    + 	move(North)
    
    Write result the agent saw
    Saved main (3 lines).
    Game time: 3m 40s elapsed, 5h 56m 20s of budget remaining.
    run_program at 3m 40s for 60s (agent saw)
    Ran main for 1m of game time; it is still running.
    Inventory change: hay +90.
    Game time: 4m 50s elapsed, 5h 55m 10s of budget remaining.
    Output:
    (none)
  5. r45m 30sRan12 lines · +10 −1 · ran 3m 17s
    while True:
    	if can_harvest():
    		harvest()
    		plant(Entities.Bush)
    	move(North)
    	if can_harvest():
    		harvest()
    	move(North)
    	if can_harvest():
    		harvest()
    		plant(Entities.Bush)
    	move(North)
    Changes from the previous revision
      while True:
    - 	harvest()
    + 	if can_harvest():
    + 		harvest()
    + 		plant(Entities.Bush)
      	move(North)
    + 	if can_harvest():
    + 		harvest()
    + 	move(North)
    + 	if can_harvest():
    + 		harvest()
    + 		plant(Entities.Bush)
    + 	move(North)
    
    Write result the agent saw
    Saved main (12 lines).
    Game time: 5m 40s elapsed, 5h 54m 20s of budget remaining.
    run_program at 5m 40s for 60s (agent saw)
    Ran main for 1m of game time; it is still running.
    Inventory change: hay +71, wood +27.
    Game time: 6m 50s elapsed, 5h 53m 10s of budget remaining.
    Output:
    (none)
  6. r59m 07sRan47 lines · +37 −2 · ran 3m 08s
    clear()
    move(East)
    move(East)
    till()
    move(North)
    till()
    move(North)
    till()
    move(North)
    move(East)
    while True:
    	if can_harvest():
    		harvest()
    	move(North)
    	if can_harvest():
    		harvest()
    	move(North)
    	if can_harvest():
    		harvest()
    	move(North)
    	move(East)
    	if can_harvest():
    		harvest()
    	plant(Entities.Bush)
    	move(North)
    	if can_harvest():
    		harvest()
    	plant(Entities.Bush)
    	move(North)
    	if can_harvest():
    		harvest()
    	plant(Entities.Bush)
    	move(North)
    	move(East)
    	if can_harvest():
    		harvest()
    	plant(Entities.Carrot)
    	move(North)
    	if can_harvest():
    		harvest()
    	plant(Entities.Carrot)
    	move(North)
    	if can_harvest():
    		harvest()
    	plant(Entities.Carrot)
    	move(North)
    	move(East)
    Changes from the previous revision
    + clear()
    + move(East)
    + move(East)
    + till()
    + move(North)
    + till()
    + move(North)
    + till()
    + move(North)
    + move(East)
      while True:
      	if can_harvest():
      		harvest()
    - 		plant(Entities.Bush)
      	move(North)
      	if can_harvest():
      	if can_harvest():
      		harvest()
    - 		plant(Entities.Bush)
      	move(North)
    + 	move(East)
    + 	if can_harvest():
    + 		harvest()
    + 	plant(Entities.Bush)
    + 	move(North)
    + 	if can_harvest():
    + 		harvest()
    + 	plant(Entities.Bush)
    + 	move(North)
    + 	if can_harvest():
    + 		harvest()
    + 	plant(Entities.Bush)
    + 	move(North)
    + 	move(East)
    + 	if can_harvest():
    + 		harvest()
    + 	plant(Entities.Carrot)
    + 	move(North)
    + 	if can_harvest():
    + 		harvest()
    + 	plant(Entities.Carrot)
    + 	move(North)
    + 	if can_harvest():
    + 		harvest()
    + 	plant(Entities.Carrot)
    + 	move(North)
    + 	move(East)
    
    Write result the agent saw
    Saved main (47 lines).
    Game time: 9m 17s elapsed, 5h 50m 43s of budget remaining.
    run_program at 9m 17s for 90s (agent saw)
    Ran main for 1m 30s of game time; it is still running.
    Inventory change: carrot +51, hay +74, wood +51.
    Game time: 10m 57s elapsed, 5h 49m 3s of budget remaining.
    Output:
    (none)
  7. r612m 35sRan30 lines · +28 −45 · ran 1m 20s
    def crop(x, y):
    	k = x % 3
    	if k == 0:
    		return Entities.Grass
    	if k == 1:
    		return Entities.Bush
    	return Entities.Carrot
    
    def tend():
    	x = get_pos_x()
    	y = get_pos_y()
    	c = crop(x, y)
    	if can_harvest():
    		harvest()
    	if c == Entities.Carrot:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	elif c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	if get_entity_type() == None or get_entity_type() != c:
    		plant(c)
    
    while True:
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			tend()
    			move(North)
    		move(East)
    Changes from the previous revision
    - clear()
    - move(East)
    - move(East)
    - till()
    - move(North)
    - till()
    - move(North)
    - till()
    - move(North)
    - move(East)
    - while True:
    - 	if can_harvest():
    - 		harvest()
    - 	move(North)
    - 	if can_harvest():
    - 		harvest()
    - 	move(North)
    - 	if can_harvest():
    - 		harvest()
    - 	move(North)
    - 	move(East)
    - 	if can_harvest():
    - 		harvest()
    - 	plant(Entities.Bush)
    - 	move(North)
    - 	if can_harvest():
    - 		harvest()
    - 	plant(Entities.Bush)
    - 	move(North)
    - 	if can_harvest():
    - 		harvest()
    - 	plant(Entities.Bush)
    - 	move(North)
    - 	move(East)
    - 	if can_harvest():
    - 		harvest()
    - 	plant(Entities.Carrot)
    - 	move(North)
    - 	if can_harvest():
    - 		harvest()
    - 	plant(Entities.Carrot)
    - 	move(North)
    + def crop(x, y):
    + 	k = x % 3
    + 	if k == 0:
    + 		return Entities.Grass
    + 	if k == 1:
    + 		return Entities.Bush
    + 	return Entities.Carrot
    + 
    + def tend():
    + 	x = get_pos_x()
    + 	y = get_pos_y()
    + 	c = crop(x, y)
      	if can_harvest():
      		harvest()
    - 	plant(Entities.Carrot)
    - 	move(North)
    - 	move(East)
    + 	if c == Entities.Carrot:
    + 		if get_ground_type() != Grounds.Soil:
    + 			till()
    + 	elif c == Entities.Grass:
    + 		if get_ground_type() != Grounds.Grassland:
    + 			till()
    + 	if get_entity_type() == None or get_entity_type() != c:
    + 		plant(c)
    + 
    + while True:
    + 	n = get_world_size()
    + 	for i in range(n):
    + 		for j in range(n):
    + 			tend()
    + 			move(North)
    + 		move(East)
    
    Write result the agent saw
    Saved main (30 lines).
    Game time: 12m 45s elapsed, 5h 47m 15s of budget remaining.
    run_program at 12m 45s for 60s (agent saw)
    Ran main for 1m of game time; it is still running.
    Inventory change: carrot +51, hay +68, wood +39.
    Game time: 13m 55s elapsed, 5h 46m 5s of budget remaining.
    Output:
    (none)
  8. r714m 15sRan29 lines · +4 −5 · ran 2m 10s
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 2 == 0:
    		return Entities.Grass
    	return Entities.Carrot
    
    def tend():
    	x = get_pos_x()
    	y = get_pos_y()
    	c = crop(x, y)
    	if can_harvest():
    		harvest()
    	if c == Entities.Carrot:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	elif c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	if get_entity_type() != c:
    		plant(c)
    
    while True:
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			tend()
    			move(North)
    		move(East)
    Changes from the previous revision
      def crop(x, y):
    - 	k = x % 3
    - 	if k == 0:
    + 	if (x + y) % 2 == 0:
    + 		return Entities.Tree
    + 	if x % 2 == 0:
      		return Entities.Grass
    - 	if k == 1:
    - 		return Entities.Bush
      	return Entities.Carrot
      
      		if get_ground_type() != Grounds.Grassland:
      			till()
    - 	if get_entity_type() == None or get_entity_type() != c:
    + 	if get_entity_type() != c:
      		plant(c)
      
    
    Write result the agent saw
    Saved main (29 lines).
    Game time: 14m 25s elapsed, 5h 45m 35s of budget remaining.
    run_program at 14m 25s for 90s (agent saw)
    Ran main for 1m 30s of game time; it is still running.
    Inventory change: carrot +60, hay +86, wood +558.
    Game time: 16m 5s elapsed, 5h 43m 55s of budget remaining.
    Output:
    (none)
  9. r816m 45sRan31 lines · +3 −1 · ran 2m 50s
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 3 == 0:
    		return Entities.Grass
    	return Entities.Carrot
    
    def tend():
    	x = get_pos_x()
    	y = get_pos_y()
    	c = crop(x, y)
    	if can_harvest():
    		harvest()
    	if c == Entities.Carrot:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	elif c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	if get_entity_type() != c:
    		plant(c)
    	if c != Entities.Grass and get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    while True:
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			tend()
    			move(North)
    		move(East)
    Changes from the previous revision
      	if (x + y) % 2 == 0:
      		return Entities.Tree
    - 	if x % 2 == 0:
    + 	if x % 3 == 0:
      		return Entities.Grass
      	return Entities.Carrot
      	if get_entity_type() != c:
      		plant(c)
    + 	if c != Entities.Grass and get_water() < 0.5 and num_items(Items.Water) > 0:
    + 		use_item(Items.Water)
      
      while True:
    
    Write result the agent saw
    Saved main (31 lines).
    Game time: 16m 55s elapsed, 5h 43m 5s of budget remaining.
    run_program at 16m 55s for 120s (agent saw)
    Ran main for 2m of game time; it is still running.
    Inventory change: carrot +266, hay -75, water -5, wood +1002.
    Game time: 19m 5s elapsed, 5h 40m 55s of budget remaining.
    Output:
    (none)
  10. r919m 55sRan67 lines · +43 −7 · ran 3m 20s
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 3 == 0:
    		return Entities.Grass
    	return Entities.Carrot
    
    def water():
    	if get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Carrot:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	elif c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	if get_entity_type() != c:
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed(passes):
    	n = get_world_size()
    	for p in range(passes):
    		for i in range(n):
    			for j in range(n):
    				tend()
    				move(North)
    			move(East)
    
    def pumpkin_phase():
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			if can_harvest():
    				harvest()
    			if get_ground_type() != Grounds.Soil:
    				till()
    			plant(Entities.Pumpkin)
    			water()
    			move(North)
    		move(East)
    	while True:
    		bad = 0
    		for i in range(n):
    			for j in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    			move(East)
    		if bad == 0:
    			harvest()
    			return
    
    while True:
    	pumpkin_phase()
    	mixed(4)
    Changes from the previous revision
      	return Entities.Carrot
      
    + def water():
    + 	if get_water() < 0.5 and num_items(Items.Water) > 0:
    + 		use_item(Items.Water)
    + 
      def tend():
    - 	x = get_pos_x()
    - 	y = get_pos_y()
    - 	c = crop(x, y)
    + 	c = crop(get_pos_x(), get_pos_y())
      	if can_harvest():
      		harvest()
      	if get_entity_type() != c:
      		plant(c)
    - 	if c != Entities.Grass and get_water() < 0.5 and num_items(Items.Water) > 0:
    - 		use_item(Items.Water)
    + 	if c != Entities.Grass:
    + 		water()
      
    - while True:
    + def mixed(passes):
      	n = get_world_size()
    + 	for p in range(passes):
    + 		for i in range(n):
    + 			for j in range(n):
    + 				tend()
    + 				move(North)
    + 			move(East)
    + 
    + def pumpkin_phase():
    + 	n = get_world_size()
      	for i in range(n):
      		for j in range(n):
    - 			tend()
    + 			if can_harvest():
    + 				harvest()
    + 			if get_ground_type() != Grounds.Soil:
    + 				till()
    + 			plant(Entities.Pumpkin)
    + 			water()
      			move(North)
      		move(East)
    + 	while True:
    + 		bad = 0
    + 		for i in range(n):
    + 			for j in range(n):
    + 				e = get_entity_type()
    + 				if e != Entities.Pumpkin:
    + 					plant(Entities.Pumpkin)
    + 					water()
    + 					bad += 1
    + 				elif not can_harvest():
    + 					bad += 1
    + 				move(North)
    + 			move(East)
    + 		if bad == 0:
    + 			harvest()
    + 			return
    + 
    + while True:
    + 	pumpkin_phase()
    + 	mixed(4)
    
    Write result the agent saw
    Saved main (67 lines).
    Game time: 20m 5s elapsed, 5h 39m 55s of budget remaining.
    run_program at 20m 05s for 180s (agent saw)
    Ran main for 3m of game time; it is still running.
    Inventory change: carrot +218, hay -68, pumpkin +432, water -4, wood +682.
    Game time: 23m 15s elapsed, 5h 36m 45s of budget remaining.
    Output:
    (none)
  11. r1023m 45sRan67 lines · +1 −1 · ran 8m 40s
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 2 == 0:
    		return Entities.Grass
    	return Entities.Carrot
    
    def water():
    	if get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Carrot:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	elif c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	if get_entity_type() != c:
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed(passes):
    	n = get_world_size()
    	for p in range(passes):
    		for i in range(n):
    			for j in range(n):
    				tend()
    				move(North)
    			move(East)
    
    def pumpkin_phase():
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			if can_harvest():
    				harvest()
    			if get_ground_type() != Grounds.Soil:
    				till()
    			plant(Entities.Pumpkin)
    			water()
    			move(North)
    		move(East)
    	while True:
    		bad = 0
    		for i in range(n):
    			for j in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    			move(East)
    		if bad == 0:
    			harvest()
    			return
    
    while True:
    	pumpkin_phase()
    	mixed(4)
    Changes from the previous revision
      	if (x + y) % 2 == 0:
      		return Entities.Tree
    - 	if x % 3 == 0:
    + 	if x % 2 == 0:
      		return Entities.Grass
      	return Entities.Carrot
    
    Write result the agent saw
    Saved main (67 lines).
    Game time: 23m 55s elapsed, 5h 36m 5s of budget remaining.
    run_program at 23m 55s for 240s (agent saw)
    Ran main for 4m of game time; it is still running.
    Inventory change: carrot +353, hay +292, pumpkin +648, water -11, wood +1934.
    Game time: 28m 5s elapsed, 5h 31m 55s of budget remaining.
    Output:
    (none)
    run_program at 28m 15s for 240s (agent saw)
    Ran main for 4m of game time; it is still running.
    Inventory change: carrot -62, fertilizer +24, hay +122, water +65, wood +85.
    Game time: 32m 25s elapsed, 5h 27m 35s of budget remaining.
    Output:
    (none)
  12. r1132m 45sRan70 lines · +5 −2 · ran 10m 10s
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 2 == 0:
    		return Entities.Grass
    	return Entities.Carrot
    
    def water():
    	if get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Carrot:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	elif c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	if get_entity_type() != c:
    		if get_entity_type() != None:
    			harvest()
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed(passes):
    	n = get_world_size()
    	for p in range(passes):
    		for i in range(n):
    			for j in range(n):
    				tend()
    				move(North)
    			move(East)
    
    def pumpkin_phase():
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			harvest()
    			if get_ground_type() != Grounds.Soil:
    				till()
    			plant(Entities.Pumpkin)
    			water()
    			move(North)
    		move(East)
    	while True:
    		bad = 0
    		for i in range(n):
    			for j in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					if e != Entities.Dead_Pumpkin and e != None:
    						harvest()
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    			move(East)
    		if bad == 0:
    			harvest()
    			return
    
    while True:
    	pumpkin_phase()
    	mixed(4)
    Changes from the previous revision
      			till()
      	if get_entity_type() != c:
    + 		if get_entity_type() != None:
    + 			harvest()
      		plant(c)
      	if c != Entities.Grass:
      	for i in range(n):
      		for j in range(n):
    - 			if can_harvest():
    - 				harvest()
    + 			harvest()
      			if get_ground_type() != Grounds.Soil:
      				till()
      				e = get_entity_type()
      				if e != Entities.Pumpkin:
    + 					if e != Entities.Dead_Pumpkin and e != None:
    + 						harvest()
      					plant(Entities.Pumpkin)
      					water()
    
    Write result the agent saw
    Saved main (70 lines).
    Game time: 32m 55s elapsed, 5h 27m 5s of budget remaining.
    run_program at 32m 55s for 240s (agent saw)
    Ran main for 4m of game time; it is still running.
    Inventory change: carrot +361, fertilizer +24, hay +228, pumpkin +995, water -81, wood +1938.
    Game time: 37m 5s elapsed, 5h 22m 55s of budget remaining.
    Output:
    (none)
  13. r1243m 15sRan74 lines · +11 −7 · ran 4m 20s
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def water():
    	if get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	elif c != Entities.Tree:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	if get_entity_type() != c:
    		if get_entity_type() != None:
    			harvest()
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed(passes):
    	n = get_world_size()
    	for p in range(passes):
    		for i in range(n):
    			for j in range(n):
    				tend()
    				move(North)
    			move(East)
    
    def pumpkin_phase(fert):
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			harvest()
    			if get_ground_type() != Grounds.Soil:
    				till()
    			plant(Entities.Pumpkin)
    			water()
    			move(North)
    		move(East)
    	while True:
    		bad = 0
    		for i in range(n):
    			for j in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					if e != Entities.Dead_Pumpkin and e != None:
    						harvest()
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					if fert and num_items(Items.Fertilizer) > 0:
    						use_item(Items.Fertilizer)
    					bad += 1
    				move(North)
    			move(East)
    		if bad == 0:
    			harvest()
    			return
    
    while True:
    	pumpkin_phase(num_items(Items.Weird_Substance) < 1500)
    	mixed(4)
    Changes from the previous revision
      	if (x + y) % 2 == 0:
      		return Entities.Tree
    - 	if x % 2 == 0:
    + 	if x % 4 == 0:
      		return Entities.Grass
    + 	if x % 4 == 2:
    + 		return Entities.Sunflower
      	return Entities.Carrot
      
      	if can_harvest():
      		harvest()
    - 	if c == Entities.Carrot:
    - 		if get_ground_type() != Grounds.Soil:
    - 			till()
    - 	elif c == Entities.Grass:
    + 	if c == Entities.Grass:
      		if get_ground_type() != Grounds.Grassland:
      			till()
    + 	elif c != Entities.Tree:
    + 		if get_ground_type() != Grounds.Soil:
    + 			till()
      	if get_entity_type() != c:
      		if get_entity_type() != None:
      			move(East)
      
    - def pumpkin_phase():
    + def pumpkin_phase(fert):
      	n = get_world_size()
      	for i in range(n):
      					bad += 1
      				elif not can_harvest():
    + 					if fert and num_items(Items.Fertilizer) > 0:
    + 						use_item(Items.Fertilizer)
      					bad += 1
      				move(North)
      
      while True:
    - 	pumpkin_phase()
    + 	pumpkin_phase(num_items(Items.Weird_Substance) < 1500)
      	mixed(4)
    
    Write result the agent saw
    Saved main (74 lines).
    Game time: 43m 25s elapsed, 5h 16m 35s of budget remaining.
    run_program at 43m 25s for 240s (agent saw)
    Ran main for 4m of game time; it is still running.
    Inventory change: carrot +837, fertilizer +48, hay +128, power +1.42, pumpkin +1152, water -16, wood +4306.
    Game time: 47m 35s elapsed, 5h 12m 25s of budget remaining.
    Output:
    (none)
  14. r1347m 55sRan79 lines · +9 −4 · ran 3m 30s
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def water():
    	if get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    def fertilize():
    	if num_items(Items.Fertilizer) > 0 and num_items(Items.Weird_Substance) < 1500:
    		use_item(Items.Fertilizer)
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	elif c != Entities.Tree:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	if get_entity_type() != c:
    		if get_entity_type() != None:
    			harvest()
    		plant(c)
    	if c != Entities.Grass:
    		water()
    	if c == Entities.Tree:
    		fertilize()
    
    def mixed(passes):
    	n = get_world_size()
    	for p in range(passes):
    		for i in range(n):
    			for j in range(n):
    				tend()
    				move(North)
    			move(East)
    
    def pumpkin_phase():
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			harvest()
    			if get_ground_type() != Grounds.Soil:
    				till()
    			plant(Entities.Pumpkin)
    			water()
    			fertilize()
    			move(North)
    		move(East)
    	while True:
    		bad = 0
    		for i in range(n):
    			for j in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					if e != Entities.Dead_Pumpkin and e != None:
    						harvest()
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    			move(East)
    		if bad == 0:
    			harvest()
    			return
    
    while True:
    	pumpkin_phase()
    	mixed(4)
    Changes from the previous revision
      		use_item(Items.Water)
      
    + def fertilize():
    + 	if num_items(Items.Fertilizer) > 0 and num_items(Items.Weird_Substance) < 1500:
    + 		use_item(Items.Fertilizer)
    + 
      def tend():
      	c = crop(get_pos_x(), get_pos_y())
      	if c != Entities.Grass:
      		water()
    + 	if c == Entities.Tree:
    + 		fertilize()
      
      def mixed(passes):
      			move(East)
      
    - def pumpkin_phase(fert):
    + def pumpkin_phase():
      	n = get_world_size()
      	for i in range(n):
      			plant(Entities.Pumpkin)
      			water()
    + 			fertilize()
      			move(North)
      		move(East)
      					bad += 1
      				elif not can_harvest():
    - 					if fert and num_items(Items.Fertilizer) > 0:
    - 						use_item(Items.Fertilizer)
      					bad += 1
      				move(North)
      
      while True:
    - 	pumpkin_phase(num_items(Items.Weird_Substance) < 1500)
    + 	pumpkin_phase()
      	mixed(4)
    
    Write result the agent saw
    Saved main (79 lines).
    Game time: 48m 5s elapsed, 5h 11m 55s of budget remaining.
    run_program at 48m 05s for 180s (agent saw)
    Ran main for 3m of game time; it is still running.
    Inventory change: carrot +1038, fertilizer -152, hay +88, power -1.20, pumpkin +1048, water -16, weird_substance +1166, wood +4757.
    Game time: 51m 15s elapsed, 5h 8m 45s of budget remaining.
    Output:
    (none)
  15. r1452m 41sRan81 lines · +6 −4 · ran 6m 50s
    import maze
    
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def water():
    	if get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    def fertilize():
    	if num_items(Items.Fertilizer) > 0:
    		use_item(Items.Fertilizer)
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Grass:
    		if get_ground_type() != Grounds.Grassland:
    			till()
    	elif c != Entities.Tree:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	if get_entity_type() != c:
    		if get_entity_type() != None:
    			harvest()
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed(passes):
    	n = get_world_size()
    	for p in range(passes):
    		for i in range(n):
    			for j in range(n):
    				tend()
    				move(North)
    			move(East)
    
    def pumpkin_phase():
    	n = get_world_size()
    	for i in range(n):
    		for j in range(n):
    			harvest()
    			if get_ground_type() != Grounds.Soil:
    				till()
    			plant(Entities.Pumpkin)
    			water()
    			fertilize()
    			move(North)
    		move(East)
    	while True:
    		bad = 0
    		for i in range(n):
    			for j in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					if e != Entities.Dead_Pumpkin and e != None:
    						harvest()
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    			move(East)
    		if bad == 0:
    			harvest()
    			return
    
    while True:
    	pumpkin_phase()
    	while maze.solve_maze():
    		pass
    	mixed(3)
    Changes from the previous revision
    + import maze
    + 
      def crop(x, y):
      	if (x + y) % 2 == 0:
      
      def fertilize():
    - 	if num_items(Items.Fertilizer) > 0 and num_items(Items.Weird_Substance) < 1500:
    + 	if num_items(Items.Fertilizer) > 0:
      		use_item(Items.Fertilizer)
      
      	if c != Entities.Grass:
      		water()
    - 	if c == Entities.Tree:
    - 		fertilize()
      
      def mixed(passes):
      while True:
      	pumpkin_phase()
    - 	mixed(4)
    + 	while maze.solve_maze():
    + 		pass
    + 	mixed(3)
    
    Write result the agent saw
    Saved main (81 lines).
    Game time: 52m 51s elapsed, 5h 7m 9s of budget remaining.
    run_program at 52m 51s for 300s (agent saw)
    Ran main for 5m of game time; it is still running.
    Inventory change: carrot -80, gold +2816, hay +636, pumpkin +1260, water -2, weird_substance -84, wood +1408.
    Game time: 58m 1s elapsed, 5h 1m 59s of budget remaining.
    Output:
    (none)
  16. —59m 31sRejected
    import maze
    from lib import *
    from phases import *
    
    while True:
    	pumpkin_phase()
    	cactus_phase()
    	while maze.solve_maze():
    		pass
    	par(mixed_worker)
    Write result the agent saw
    Stop the program before editing it.
  17. r1559m 51sRan10 lines · +4 −75 · ran 6m 30s
    import maze
    from lib import *
    from phases import *
    
    while True:
    	pumpkin_phase()
    	cactus_phase()
    	while maze.solve_maze():
    		pass
    	par(mixed_worker)
    Changes from the previous revision
      import maze
    - 
    - def crop(x, y):
    - 	if (x + y) % 2 == 0:
    - 		return Entities.Tree
    - 	if x % 4 == 0:
    - 		return Entities.Grass
    - 	if x % 4 == 2:
    - 		return Entities.Sunflower
    - 	return Entities.Carrot
    - 
    - def water():
    - 	if get_water() < 0.5 and num_items(Items.Water) > 0:
    - 		use_item(Items.Water)
    - 
    - def fertilize():
    - 	if num_items(Items.Fertilizer) > 0:
    - 		use_item(Items.Fertilizer)
    - 
    - def tend():
    - 	c = crop(get_pos_x(), get_pos_y())
    - 	if can_harvest():
    - 		harvest()
    - 	if c == Entities.Grass:
    - 		if get_ground_type() != Grounds.Grassland:
    - 			till()
    - 	elif c != Entities.Tree:
    - 		if get_ground_type() != Grounds.Soil:
    - 			till()
    - 	if get_entity_type() != c:
    - 		if get_entity_type() != None:
    - 			harvest()
    - 		plant(c)
    - 	if c != Entities.Grass:
    - 		water()
    - 
    - def mixed(passes):
    - 	n = get_world_size()
    - 	for p in range(passes):
    - 		for i in range(n):
    - 			for j in range(n):
    - 				tend()
    - 				move(North)
    - 			move(East)
    - 
    - def pumpkin_phase():
    - 	n = get_world_size()
    - 	for i in range(n):
    - 		for j in range(n):
    - 			harvest()
    - 			if get_ground_type() != Grounds.Soil:
    - 				till()
    - 			plant(Entities.Pumpkin)
    - 			water()
    - 			fertilize()
    - 			move(North)
    - 		move(East)
    - 	while True:
    - 		bad = 0
    - 		for i in range(n):
    - 			for j in range(n):
    - 				e = get_entity_type()
    - 				if e != Entities.Pumpkin:
    - 					if e != Entities.Dead_Pumpkin and e != None:
    - 						harvest()
    - 					plant(Entities.Pumpkin)
    - 					water()
    - 					bad += 1
    - 				elif not can_harvest():
    - 					bad += 1
    - 				move(North)
    - 			move(East)
    - 		if bad == 0:
    - 			harvest()
    - 			return
    + from lib import *
    + from phases import *
      
      while True:
      	pumpkin_phase()
    + 	cactus_phase()
      	while maze.solve_maze():
      		pass
    - 	mixed(3)
    + 	par(mixed_worker)
    
    Write result the agent saw
    Saved main (10 lines).
    Game time: 1h 1s elapsed, 4h 59m 59s of budget remaining.
    run_program at 1h 00m for 120s (agent saw)
    Ran main for 2m of game time; it is still running.
    Inventory change: carrot -156, fertilizer +30, hay +2300, pumpkin +10, water +6, weird_substance +10.
    Game time: 1h 2m 11s elapsed, 4h 57m 49s of budget remaining.
    Output:
    Warning: Cannot plant Entities.Pumpkin on Grounds.Grassland.
    In: pumpkin_phase <- par <- pumpkin_worker
    plant(Entities.Pumpkin)
         ^^                
    --------------------------------------------------------------------
    Warning: Cannot plant Entities.Pumpkin on Grounds.Grassland.
    In: pumpkin_worker
    plant(Entities.Pumpkin)
         ^^                
    --------------------------------------------------------------------
    run_program at 1h 02m for 180s (agent saw)
    Ran main for 3m of game time; it is still running.
    Inventory change: cactus +4096, carrot -146, fertilizer +8, gold +1600, hay +64, pumpkin +754, water +83, weird_substance +158.
    Game time: 1h 5m 51s elapsed, 4h 54m 9s of budget remaining.
    Output:
    (none)
  18. r161h 08mRan13 lines · +3 −0 · ran 7m 04s
    import maze
    import dino
    from lib import *
    from phases import *
    
    while True:
    	pumpkin_phase()
    	cactus_phase()
    	clear()
    	dino.dino_phase()
    	while maze.solve_maze():
    		pass
    	par(mixed_worker)
    Changes from the previous revision
      import maze
    + import dino
      from lib import *
      from phases import *
      	pumpkin_phase()
      	cactus_phase()
    + 	clear()
    + 	dino.dino_phase()
      	while maze.solve_maze():
      		pass
    
    Write result the agent saw
    Saved main (13 lines).
    Game time: 1h 8m 22s elapsed, 4h 51m 38s of budget remaining.
    run_program at 1h 08m for 300s (agent saw)
    Ran main for 5m of game time; it is still running.
    Inventory change: bone +3969, cactus +3970, carrot -150, fertilizer +56, gold +2432, pumpkin +304, water +167, weird_substance +24.
    Game time: 1h 13m 32s elapsed, 4h 46m 28s of budget remaining.
    Output:
    (none)
  19. r171h 15mRan20 lines · +7 −0 · ran 14m 20s
    import maze
    import dino
    from lib import *
    from phases import *
    
    while True:
    	t = get_time()
    	pumpkin_phase()
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	clear()
    	dino.dino_phase()
    	t3 = get_time()
    	while maze.solve_maze():
    		pass
    	t4 = get_time()
    	par(mixed_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    Changes from the previous revision
      
      while True:
    + 	t = get_time()
      	pumpkin_phase()
    + 	t1 = get_time()
      	cactus_phase()
    + 	t2 = get_time()
      	clear()
      	dino.dino_phase()
    + 	t3 = get_time()
      	while maze.solve_maze():
      		pass
    + 	t4 = get_time()
      	par(mixed_worker)
    + 	t5 = get_time()
    + 	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    
    Write result the agent saw
    Saved main (20 lines).
    Game time: 1h 15m 46s elapsed, 4h 44m 14s of budget remaining.
    run_program at 1h 15m for 400s (agent saw)
    Ran main for 6m 40s of game time; it is still running.
    Inventory change: bone +7938, cactus +7940, carrot +451, fertilizer +39, gold +2880, hay +336, pumpkin +705, water +61, weird_substance +209, wood +2536.
    Game time: 1h 22m 36s elapsed, 4h 37m 24s of budget remaining.
    Output:
    14.22 25.02 53.26 161.25 12.37
    run_program at 1h 26m for 400s (agent saw)
    Ran main for 6m 40s of game time; it is still running.
    Inventory change: bone +3969, cactus +8062, carrot +5232, fertilizer +32, gold +2560, hay -16, pumpkin +668, water +11, weird_substance +292, wood +18084.
    Game time: 1h 33m 9s elapsed, 4h 26m 51s of budget remaining.
    Output:
    11.24 24.83 66.81 203.31 61.24
  20. r181h 33mRan21 lines · +2 −1 · ran 20s · 1 runtime error
    import maze
    import dino
    from lib import *
    from phases import *
    
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 200)
    	pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	clear()
    	dino.dino_phase()
    	t3 = get_time()
    	while maze.solve_maze():
    		pass
    	t4 = get_time()
    	par(mixed_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    Changes from the previous revision
      while True:
      	t = get_time()
    - 	pumpkin_phase()
    + 	pumpkin_phase(num_items(Items.Weird_Substance) < 200)
    + 	pumpkin_phase(False)
      	t1 = get_time()
      	cactus_phase()
    
    Write result the agent saw
    Saved main (21 lines).
    Game time: 1h 33m 49s elapsed, 4h 26m 11s of budget remaining.
    run_program at 1h 33m for 400s (agent saw)
    Ran main for 20s of game time; it stopped with an error: The operator > cannot be used on the operands 9 and None.
    Inventory change: bone +81, cactus +10, carrot -556, fertilizer +8, pumpkin +374, water -50.
    Game time: 1h 34m 30s elapsed, 4h 25m 30s of budget remaining.
    Output:
    Error: The operator > cannot be used on the operands 9 and None.
    In: cactus_rows
    if measure() > measure(East):
              ^^^^^^^^^^^^^^^^^^^^
    --------------------------------------------------------------------
    Runtime error at 1h 34m (telemetry; not shown to the agent)
    The operator > cannot be used on the operands 9 and None.
  21. r191h 34mRan22 lines · +1 −0 · ran 25m 34s
    import maze
    import dino
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 200)
    	pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	clear()
    	dino.dino_phase()
    	t3 = get_time()
    	while maze.solve_maze():
    		pass
    	t4 = get_time()
    	par(mixed_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    Changes from the previous revision
      from phases import *
      
    + change_hat(Hats.Straw_Hat)
      while True:
      	t = get_time()
    
    Write result the agent saw
    Saved main (22 lines).
    Game time: 1h 34m 40s elapsed, 4h 25m 20s of budget remaining.
    run_program at 1h 34m for 400s (agent saw)
    Ran main for 6m 40s of game time; it is still running.
    Inventory change: bone +7938, cactus +7964, carrot +9015, fertilizer +96, gold +3328, hay +3912, pumpkin +5388, water +4, weird_substance +144, wood +29600.
    Game time: 1h 41m 30s elapsed, 4h 18m 30s of budget remaining.
    Output:
    16.23 24.55 62.3 79.21 61.69
    run_program at 1h 46m for 600s (agent saw)
    Ran main for 10m of game time; it is still running.
    Inventory change: bone +40898, cactus +20164, carrot +10108, fertilizer +240, gold +7488, hay +12400, power +115.63, pumpkin +13536, water +256, weird_substance -624, wood +56696.
    Game time: 1h 56m 14s elapsed, 4h 3m 46s of budget remaining.
    Output:
    (none)
  22. r202h 08mRan21 lines · +2 −3 · ran 18m 50s
    import maze
    import dino
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    	pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	clear()
    	dino.dino_phase()
    	t3 = get_time()
    	maze.maze_phase()
    	t4 = get_time()
    	par(mixed_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    Changes from the previous revision
      while True:
      	t = get_time()
    - 	pumpkin_phase(num_items(Items.Weird_Substance) < 200)
    + 	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
      	pumpkin_phase(False)
      	t1 = get_time()
      	dino.dino_phase()
      	t3 = get_time()
    - 	while maze.solve_maze():
    - 		pass
    + 	maze.maze_phase()
      	t4 = get_time()
      	par(mixed_worker)
    
    Write result the agent saw
    Saved main (21 lines).
    Game time: 2h 8m 18s elapsed, 3h 51m 42s of budget remaining.
    run_program at 2h 08m for 500s (agent saw)
    Ran main for 8m 20s of game time; it is still running.
    Inventory change: bone +40898, cactus +20164, carrot -2800, fertilizer +256, gold +20160, hay +2304, pumpkin +10752, water +464, weird_substance +1080.
    Game time: 2h 16m 48s elapsed, 3h 43m 12s of budget remaining.
    Output:
    (none)
    run_program at 2h 37m for 300s (agent saw)
    Ran main for 5m of game time; it is still running.
    Inventory change: bone +40898, cactus +20164, carrot -2896, fertilizer +96, gold +30528, pumpkin +10752, water +142, weird_substance +192.
    Game time: 2h 42m 49s elapsed, 3h 17m 11s of budget remaining.
    Output:
    (none)
  23. r212h 45mRan22 lines · +2 −1 · ran 25m 40s
    import maze
    import dino
    import poly
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    	pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	clear()
    	dino.dino_phase()
    	t3 = get_time()
    	maze.maze_phase()
    	t4 = get_time()
    	par(poly.poly_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    Changes from the previous revision
      import maze
      import dino
    + import poly
      from lib import *
      from phases import *
      	maze.maze_phase()
      	t4 = get_time()
    - 	par(mixed_worker)
    + 	par(poly.poly_worker)
      	t5 = get_time()
      	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    
    Write result the agent saw
    Saved main (22 lines).
    Game time: 2h 45m 25s elapsed, 3h 14m 35s of budget remaining.
    run_program at 2h 45m for 600s (agent saw)
    Ran main for 10m of game time; it is still running.
    Inventory change: bone +40898, cactus +82124, carrot +314924, fertilizer +192, gold +77760, hay +248800, power -2.37, pumpkin +42960, water +1206, weird_substance +4704, wood +2031424.
    Game time: 2h 55m 35s elapsed, 3h 4m 25s of budget remaining.
    Output:
    23.98 44.24 119.71 166.98 62.87
    run_program at 2h 56m for 900s (agent saw)
    Ran main for 15m of game time; it is still running.
    Inventory change: bone +520200, cactus +258064, carrot +780180, fertilizer +464, gold +123904, hay +590528, pumpkin +86944, water +4218, weird_substance +1504, wood +2631616.
    Game time: 3h 11m 15s elapsed, 2h 48m 45s of budget remaining.
    Output:
    22.1 49.39 256.02 138.92 61.75
  24. r223h 11mRan23 lines · +2 −1 · ran 41m 10s
    import maze
    import dino
    import poly
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    	for i in range(4):
    		pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	clear()
    	dino.dino_phase()
    	t3 = get_time()
    	maze.maze_phase()
    	t4 = get_time()
    	par(poly.poly_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    Changes from the previous revision
      	t = get_time()
      	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    - 	pumpkin_phase(False)
    + 	for i in range(4):
    + 		pumpkin_phase(False)
      	t1 = get_time()
      	cactus_phase()
    
    Write result the agent saw
    Saved main (23 lines).
    Game time: 3h 12m 5s elapsed, 2h 47m 55s of budget remaining.
    run_program at 3h 12m for 900s (agent saw)
    Ran main for 15m of game time; it is still running.
    Inventory change: bone +260100, cactus +259312, carrot +3245089, fertilizer +464, gold +93184, hay +5204672, pumpkin +469184, water +9516, weird_substance +14816, wood +19779712.
    Game time: 3h 27m 35s elapsed, 2h 32m 25s of budget remaining.
    Output:
    48.05 44.32 279.65 158.01 62.69
    run_program at 3h 28m for 600s (agent saw)
    Ran main for 10m of game time; it is still running.
    Inventory change: cactus +467752, carrot -95488, fertilizer +480, hay +123904, pumpkin +462704, water +13274.
    Game time: 3h 38m 25s elapsed, 2h 21m 35s of budget remaining.
    Output:
    (none)
  25. r233h 54mRan26 lines · +6 −3 · ran 43m 10s
    import maze
    import dino
    import poly
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    loop = 0
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    	for i in range(3):
    		pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	if loop % 2 == 1:
    		clear()
    		dino.dino_phase()
    	t3 = get_time()
    	maze.maze_phase()
    	t4 = get_time()
    	par(poly.poly_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    	loop += 1
    Changes from the previous revision
      
      change_hat(Hats.Straw_Hat)
    + loop = 0
      while True:
      	t = get_time()
      	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    - 	for i in range(4):
    + 	for i in range(3):
      		pumpkin_phase(False)
      	t1 = get_time()
      	cactus_phase()
      	t2 = get_time()
    - 	clear()
    - 	dino.dino_phase()
    + 	if loop % 2 == 1:
    + 		clear()
    + 		dino.dino_phase()
      	t3 = get_time()
      	maze.maze_phase()
      	t5 = get_time()
      	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    + 	loop += 1
    
    Write result the agent saw
    Saved main (26 lines).
    Game time: 3h 54m 25s elapsed, 2h 5m 35s of budget remaining.
    run_program at 3h 54m for 900s (agent saw)
    Ran main for 15m of game time; it is still running.
    Inventory change: cactus +1909848, carrot +26694502, fertilizer +238, gold +793760, hay +23675904, pumpkin +2820416, water +19456, weird_substance +109456, wood +185735168.
    Game time: 4h 9m 35s elapsed, 1h 50m 25s of budget remaining.
    Output:
    51.4 87.41 0 359.59 67.78
    run_program at 4h 35m for 120s (agent saw)
    Ran main for 2m of game time; it is still running.
    Inventory change: carrot -623872, fertilizer +96, hay +246272, pumpkin +2971072, water +1541.
    Game time: 4h 37m 55s elapsed, 1h 22m 5s of budget remaining.
    Output:
    (none)
  26. r244h 38mRan23 lines · +1 −4 · ran 36m 40s
    import maze
    import dino
    import poly
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    loop = 0
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    	for i in range(2):
    		pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	t3 = get_time()
    	maze.maze_phase()
    	t4 = get_time()
    	par(poly.poly_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    	loop += 1
    Changes from the previous revision
      	t = get_time()
      	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    - 	for i in range(3):
    + 	for i in range(2):
      		pumpkin_phase(False)
      	t1 = get_time()
      	cactus_phase()
      	t2 = get_time()
    - 	if loop % 2 == 1:
    - 		clear()
    - 		dino.dino_phase()
      	t3 = get_time()
      	maze.maze_phase()
    
    Write result the agent saw
    Saved main (23 lines).
    Game time: 4h 38m 25s elapsed, 1h 21m 35s of budget remaining.
    run_program at 4h 38m for 600s (agent saw)
    Ran main for 10m of game time; it is still running.
    Inventory change: cactus +8388608, carrot -986368, fertilizer +480, gold +761856, hay +524288, pumpkin +4702208, water +12398, weird_substance -24064.
    Game time: 4h 48m 35s elapsed, 1h 11m 25s of budget remaining.
    Output:
    (none)
    run_program at 4h 59m for 900s (agent saw)
    Ran main for 15m of game time; it is still running.
    Inventory change: cactus +34946240, carrot +87122373, fertilizer -303, gold +1032192, hay +89581056, pumpkin +8733440, water +12854, weird_substance +605952, wood +685880832.
    Game time: 5h 14m 45s elapsed, 45m 15s of budget remaining.
    Output:
    56.29 174.68 0 146.17 68.15
    54.61 171.66 0 151.31 69.1
  27. —5h 15mRejected
    import maze
    import dino
    import poly
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    loop = 0
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    	for i in range(2):
    		pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	clear()
    	dino.dino_phase()
    	t3 = get_time()
    	maze.maze_phase()
    	t4 = get_time()
    	par(poly.poly_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    	loop += 1
    Write result the agent saw
    Stop the program before editing it.
  28. r255h 15mRan25 lines · +2 −0 · ran 15m 10s
    import maze
    import dino
    import poly
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    loop = 0
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    	for i in range(2):
    		pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	clear()
    	dino.dino_phase()
    	t3 = get_time()
    	maze.maze_phase()
    	t4 = get_time()
    	par(poly.poly_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    	loop += 1
    Changes from the previous revision
      	cactus_phase()
      	t2 = get_time()
    + 	clear()
    + 	dino.dino_phase()
      	t3 = get_time()
      	maze.maze_phase()
    
    Write result the agent saw
    Saved main (25 lines).
    Game time: 5h 15m 35s elapsed, 44m 25s of budget remaining.
    run_program at 5h 15m for 900s (agent saw)
    Ran main for 15m of game time; it is still running.
    Inventory change: bone +26912, cactus +33552128, carrot +43793145, fertilizer +720, gold +196608, hay +44274688, pumpkin +19939328, water +16998, weird_substance -6144, wood +338166784.
    Game time: 5h 30m 45s elapsed, 29m 15s of budget remaining.
    Output:
    64.24 159.58 186.17 157.06 68.21
  29. r265h 30mRanFinal19 lines · +1 −7 · ran 28m 45s
    import maze
    import poly
    from lib import *
    from phases import *
    
    change_hat(Hats.Straw_Hat)
    while True:
    	t = get_time()
    	pumpkin_phase(num_items(Items.Weird_Substance) < 3000)
    	for i in range(2):
    		pumpkin_phase(False)
    	t1 = get_time()
    	cactus_phase()
    	t2 = get_time()
    	maze.maze_phase()
    	t4 = get_time()
    	par(poly.poly_worker)
    	t5 = get_time()
    	print(t1 - t, t2 - t1, t4 - t2, t5 - t4)
    Changes from the previous revision
      import maze
    - import dino
      import poly
      from lib import *
      
      change_hat(Hats.Straw_Hat)
    - loop = 0
      while True:
      	t = get_time()
      	cactus_phase()
      	t2 = get_time()
    - 	clear()
    - 	dino.dino_phase()
    - 	t3 = get_time()
      	maze.maze_phase()
      	t4 = get_time()
      	par(poly.poly_worker)
      	t5 = get_time()
    - 	print(t1 - t, t2 - t1, t3 - t2, t4 - t3, t5 - t4)
    - 	loop += 1
    + 	print(t1 - t, t2 - t1, t4 - t2, t5 - t4)
    
    Write result the agent saw
    Saved main (19 lines).
    Game time: 5h 31m 5s elapsed, 28m 55s of budget remaining.
    run_program at 5h 31m for 900s (agent saw)
    Ran main for 15m of game time; it is still running.
    Inventory change: bone +1152, cactus +33554432, carrot +70033940, fertilizer +720, gold +1245184, hay +73368576, pumpkin +18808832, water +13284, weird_substance -38912, wood +556737024.
    Game time: 5h 46m 15s elapsed, 13m 45s of budget remaining.
    Output:
    68.56 170.23 150.64 67.87
maze.py12 writes · 0 ran · first at 51m 45s
  1. r151m 45sSaved, never run19 lines
    dirs = [North, East, South, West]
    
    def solve_maze():
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	if num_items(Items.Weird_Substance) < amt:
    		return False
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	d = 0
    	while get_entity_type() != Entities.Treasure:
    		for k in [1, 0, 3, 2]:
    			nd = (d + k) % 4
    			if move(dirs[nd]):
    				d = nd
    				break
    	harvest()
    	return True
    Write result the agent saw
    Saved maze (19 lines).
    Game time: 51m 55s elapsed, 5h 8m 5s of budget remaining.
  2. r21h 22mSaved, never run82 lines · +72 −9
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    
    def bfs(n, wall, tx, ty):
    	dist = []
    	for i in range(n * n):
    		dist.append(-1)
    	t = tx * n + ty
    	dist[t] = 0
    	q = [t]
    	h = 0
    	while h < len(q):
    		c = q[h]
    		h += 1
    		cx = c // n
    		cy = c % n
    		for d in range(4):
    			if wall[c * 4 + d]:
    				continue
    			nx = cx + DX[d]
    			ny = cy + DY[d]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			nc = nx * n + ny
    			if dist[nc] == -1:
    				dist[nc] = dist[c] + 1
    				q.append(nc)
    	return dist
    
    def walk(n, wall, tx, ty):
    	dist = bfs(n, wall, tx, ty)
    	while True:
    		x = get_pos_x()
    		y = get_pos_y()
    		if x == tx and y == ty:
    			return True
    		c = x * n + y
    		if dist[c] == -1:
    			for i in range(n * n * 4):
    				wall[i] = False
    			dist = bfs(n, wall, tx, ty)
    			continue
    		best = -1
    		for d in range(4):
    			if wall[c * 4 + d]:
    				continue
    			nx = x + DX[d]
    			ny = y + DY[d]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			if dist[nx * n + ny] == dist[c] - 1:
    				best = d
    				break
    		if move(dirs[best]):
    			continue
    		wall[c * 4 + best] = True
    		nx = x + DX[best]
    		ny = y + DY[best]
    		wall[(nx * n + ny) * 4 + (best + 2) % 4] = True
    		dist = bfs(n, wall, tx, ty)
    
    def solve_maze(reuse):
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	if num_items(Items.Weird_Substance) < amt:
    		return False
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	wall = []
    	for i in range(n * n * 4):
    		wall.append(False)
    	for r in range(reuse):
    		tx, ty = measure()
    		walk(n, wall, tx, ty)
    		if r < reuse - 1 and num_items(Items.Weird_Substance) >= amt:
    			use_item(Items.Weird_Substance, amt)
    		else:
    			harvest()
    			return True
    	return True
    Changes from the previous revision
      dirs = [North, East, South, West]
    + DX = [0, 1, 0, -1]
    + DY = [1, 0, -1, 0]
      
    - def solve_maze():
    + def bfs(n, wall, tx, ty):
    + 	dist = []
    + 	for i in range(n * n):
    + 		dist.append(-1)
    + 	t = tx * n + ty
    + 	dist[t] = 0
    + 	q = [t]
    + 	h = 0
    + 	while h < len(q):
    + 		c = q[h]
    + 		h += 1
    + 		cx = c // n
    + 		cy = c % n
    + 		for d in range(4):
    + 			if wall[c * 4 + d]:
    + 				continue
    + 			nx = cx + DX[d]
    + 			ny = cy + DY[d]
    + 			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    + 				continue
    + 			nc = nx * n + ny
    + 			if dist[nc] == -1:
    + 				dist[nc] = dist[c] + 1
    + 				q.append(nc)
    + 	return dist
    + 
    + def walk(n, wall, tx, ty):
    + 	dist = bfs(n, wall, tx, ty)
    + 	while True:
    + 		x = get_pos_x()
    + 		y = get_pos_y()
    + 		if x == tx and y == ty:
    + 			return True
    + 		c = x * n + y
    + 		if dist[c] == -1:
    + 			for i in range(n * n * 4):
    + 				wall[i] = False
    + 			dist = bfs(n, wall, tx, ty)
    + 			continue
    + 		best = -1
    + 		for d in range(4):
    + 			if wall[c * 4 + d]:
    + 				continue
    + 			nx = x + DX[d]
    + 			ny = y + DY[d]
    + 			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    + 				continue
    + 			if dist[nx * n + ny] == dist[c] - 1:
    + 				best = d
    + 				break
    + 		if move(dirs[best]):
    + 			continue
    + 		wall[c * 4 + best] = True
    + 		nx = x + DX[best]
    + 		ny = y + DY[best]
    + 		wall[(nx * n + ny) * 4 + (best + 2) % 4] = True
    + 		dist = bfs(n, wall, tx, ty)
    + 
    + def solve_maze(reuse):
      	n = get_world_size()
      	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
      	plant(Entities.Bush)
      	use_item(Items.Weird_Substance, amt)
    - 	d = 0
    - 	while get_entity_type() != Entities.Treasure:
    - 		for k in [1, 0, 3, 2]:
    - 			nd = (d + k) % 4
    - 			if move(dirs[nd]):
    - 				d = nd
    - 				break
    - 	harvest()
    + 	wall = []
    + 	for i in range(n * n * 4):
    + 		wall.append(False)
    + 	for r in range(reuse):
    + 		tx, ty = measure()
    + 		walk(n, wall, tx, ty)
    + 		if r < reuse - 1 and num_items(Items.Weird_Substance) >= amt:
    + 			use_item(Items.Weird_Substance, amt)
    + 		else:
    + 			harvest()
    + 			return True
      	return True
    
    Write result the agent saw
    Saved maze (82 lines).
    Game time: 1h 22m 46s elapsed, 4h 37m 14s of budget remaining.
  3. r31h 25mSaved, never run19 lines · +9 −72
    dirs = [North, East, South, West]
    
    def solve_maze():
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	if num_items(Items.Weird_Substance) < amt:
    		return False
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	d = 0
    	while get_entity_type() != Entities.Treasure:
    		for k in [1, 0, 3, 2]:
    			nd = (d + k) % 4
    			if move(dirs[nd]):
    				d = nd
    				break
    	harvest()
    	return True
    Changes from the previous revision
      dirs = [North, East, South, West]
    - DX = [0, 1, 0, -1]
    - DY = [1, 0, -1, 0]
      
    - def bfs(n, wall, tx, ty):
    - 	dist = []
    - 	for i in range(n * n):
    - 		dist.append(-1)
    - 	t = tx * n + ty
    - 	dist[t] = 0
    - 	q = [t]
    - 	h = 0
    - 	while h < len(q):
    - 		c = q[h]
    - 		h += 1
    - 		cx = c // n
    - 		cy = c % n
    - 		for d in range(4):
    - 			if wall[c * 4 + d]:
    - 				continue
    - 			nx = cx + DX[d]
    - 			ny = cy + DY[d]
    - 			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    - 				continue
    - 			nc = nx * n + ny
    - 			if dist[nc] == -1:
    - 				dist[nc] = dist[c] + 1
    - 				q.append(nc)
    - 	return dist
    - 
    - def walk(n, wall, tx, ty):
    - 	dist = bfs(n, wall, tx, ty)
    - 	while True:
    - 		x = get_pos_x()
    - 		y = get_pos_y()
    - 		if x == tx and y == ty:
    - 			return True
    - 		c = x * n + y
    - 		if dist[c] == -1:
    - 			for i in range(n * n * 4):
    - 				wall[i] = False
    - 			dist = bfs(n, wall, tx, ty)
    - 			continue
    - 		best = -1
    - 		for d in range(4):
    - 			if wall[c * 4 + d]:
    - 				continue
    - 			nx = x + DX[d]
    - 			ny = y + DY[d]
    - 			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    - 				continue
    - 			if dist[nx * n + ny] == dist[c] - 1:
    - 				best = d
    - 				break
    - 		if move(dirs[best]):
    - 			continue
    - 		wall[c * 4 + best] = True
    - 		nx = x + DX[best]
    - 		ny = y + DY[best]
    - 		wall[(nx * n + ny) * 4 + (best + 2) % 4] = True
    - 		dist = bfs(n, wall, tx, ty)
    - 
    - def solve_maze(reuse):
    + def solve_maze():
      	n = get_world_size()
      	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
      	plant(Entities.Bush)
      	use_item(Items.Weird_Substance, amt)
    - 	wall = []
    - 	for i in range(n * n * 4):
    - 		wall.append(False)
    - 	for r in range(reuse):
    - 		tx, ty = measure()
    - 		walk(n, wall, tx, ty)
    - 		if r < reuse - 1 and num_items(Items.Weird_Substance) >= amt:
    - 			use_item(Items.Weird_Substance, amt)
    - 		else:
    - 			harvest()
    - 			return True
    + 	d = 0
    + 	while get_entity_type() != Entities.Treasure:
    + 		for k in [1, 0, 3, 2]:
    + 			nd = (d + k) % 4
    + 			if move(dirs[nd]):
    + 				d = nd
    + 				break
    + 	harvest()
      	return True
    
    Write result the agent saw
    Saved maze (19 lines).
    Game time: 1h 25m 59s elapsed, 4h 34m 1s of budget remaining.
  4. r42h 00mSaved, never run56 lines · +42 −5
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    
    def solve_maze():
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	if num_items(Items.Weird_Substance) < amt:
    		return False
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	tx, ty = measure()
    	visited = []
    	for i in range(n * n):
    		visited.append(False)
    	x = get_pos_x()
    	y = get_pos_y()
    	visited[x * n + y] = True
    	stack = []
    	while get_entity_type() != Entities.Treasure:
    		order = []
    		if tx > x:
    			order.append(1)
    		elif tx < x:
    			order.append(3)
    		if ty > y:
    			order.append(0)
    		elif ty < y:
    			order.append(2)
    		for d in range(4):
    			if d not in order:
    				order.append(d)
    		moved = False
    		for d in order:
    			nx = x + DX[d]
    			ny = y + DY[d]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			if visited[nx * n + ny]:
    				continue
    			if can_move(dirs[d]):
    				move(dirs[d])
    				x = nx
    				y = ny
    				visited[x * n + y] = True
    				stack.append(d)
    				moved = True
    				break
    		if not moved:
    			d = (stack.pop() + 2) % 4
    			move(dirs[d])
    			x += DX[d]
    			y += DY[d]
    	harvest()
    	return True
    Changes from the previous revision
      dirs = [North, East, South, West]
    + DX = [0, 1, 0, -1]
    + DY = [1, 0, -1, 0]
      
      def solve_maze():
      	plant(Entities.Bush)
      	use_item(Items.Weird_Substance, amt)
    - 	d = 0
    + 	tx, ty = measure()
    + 	visited = []
    + 	for i in range(n * n):
    + 		visited.append(False)
    + 	x = get_pos_x()
    + 	y = get_pos_y()
    + 	visited[x * n + y] = True
    + 	stack = []
      	while get_entity_type() != Entities.Treasure:
    - 		for k in [1, 0, 3, 2]:
    - 			nd = (d + k) % 4
    - 			if move(dirs[nd]):
    - 				d = nd
    + 		order = []
    + 		if tx > x:
    + 			order.append(1)
    + 		elif tx < x:
    + 			order.append(3)
    + 		if ty > y:
    + 			order.append(0)
    + 		elif ty < y:
    + 			order.append(2)
    + 		for d in range(4):
    + 			if d not in order:
    + 				order.append(d)
    + 		moved = False
    + 		for d in order:
    + 			nx = x + DX[d]
    + 			ny = y + DY[d]
    + 			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    + 				continue
    + 			if visited[nx * n + ny]:
    + 				continue
    + 			if can_move(dirs[d]):
    + 				move(dirs[d])
    + 				x = nx
    + 				y = ny
    + 				visited[x * n + y] = True
    + 				stack.append(d)
    + 				moved = True
      				break
    + 		if not moved:
    + 			d = (stack.pop() + 2) % 4
    + 			move(dirs[d])
    + 			x += DX[d]
    + 			y += DY[d]
      	harvest()
      	return True
    
    Write result the agent saw
    Saved maze (56 lines).
    Game time: 2h 54s elapsed, 3h 59m 6s of budget remaining.
  5. r52h 02mSaved, never run68 lines · +24 −12
    from lib import *
    
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    
    def solve_region(x0, y0, s, amt):
    	goto(x0 + s // 2, y0 + s // 2)
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	tx, ty = measure()
    	visited = []
    	for i in range(s * s):
    		visited.append(False)
    	x = get_pos_x()
    	y = get_pos_y()
    	visited[(x - x0) * s + y - y0] = True
    	stack = []
    	while get_entity_type() != Entities.Treasure:
    		order = []
    		if tx > x:
    			order.append(1)
    		elif tx < x:
    			order.append(3)
    		if ty > y:
    			order.append(0)
    		elif ty < y:
    			order.append(2)
    		for d in range(4):
    			if d != order[0] and (len(order) < 2 or d != order[1]):
    				order.append(d)
    		moved = False
    		for d in order:
    			nx = x + DX[d]
    			ny = y + DY[d]
    			if nx < x0 or ny < y0 or nx >= x0 + s or ny >= y0 + s:
    				continue
    			if visited[(nx - x0) * s + ny - y0]:
    				continue
    			if can_move(dirs[d]):
    				move(dirs[d])
    				x = nx
    				y = ny
    				visited[(x - x0) * s + y - y0] = True
    				stack.append(d)
    				moved = True
    				break
    		if not moved:
    			d = (stack.pop() + 2) % 4
    			move(dirs[d])
    			x += DX[d]
    			y += DY[d]
    	harvest()
    
    def maze_worker(k, D):
    	if k >= 4:
    		return
    	n = get_world_size()
    	h = n // 2
    	amt = h * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	x0 = (k % 2) * h
    	y0 = (k // 2) * h
    	while num_items(Items.Weird_Substance) >= amt * 4:
    		solve_region(x0, y0, h, amt)
    
    def maze_phase():
    	par(maze_worker)
    Changes from the previous revision
    + from lib import *
    + 
      dirs = [North, East, South, West]
      DX = [0, 1, 0, -1]
      DY = [1, 0, -1, 0]
      
    - def solve_maze():
    - 	n = get_world_size()
    - 	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    - 	if num_items(Items.Weird_Substance) < amt:
    - 		return False
    + def solve_region(x0, y0, s, amt):
    + 	goto(x0 + s // 2, y0 + s // 2)
      	harvest()
      	plant(Entities.Bush)
      	tx, ty = measure()
      	visited = []
    - 	for i in range(n * n):
    + 	for i in range(s * s):
      		visited.append(False)
      	x = get_pos_x()
      	y = get_pos_y()
    - 	visited[x * n + y] = True
    + 	visited[(x - x0) * s + y - y0] = True
      	stack = []
      	while get_entity_type() != Entities.Treasure:
      			order.append(2)
      		for d in range(4):
    - 			if d not in order:
    + 			if d != order[0] and (len(order) < 2 or d != order[1]):
      				order.append(d)
      		moved = False
      			nx = x + DX[d]
      			ny = y + DY[d]
    - 			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    + 			if nx < x0 or ny < y0 or nx >= x0 + s or ny >= y0 + s:
      				continue
    - 			if visited[nx * n + ny]:
    + 			if visited[(nx - x0) * s + ny - y0]:
      				continue
      			if can_move(dirs[d]):
      				x = nx
      				y = ny
    - 				visited[x * n + y] = True
    + 				visited[(x - x0) * s + y - y0] = True
      				stack.append(d)
      				moved = True
      			y += DY[d]
      	harvest()
    - 	return True
    + 
    + def maze_worker(k, D):
    + 	if k >= 4:
    + 		return
    + 	n = get_world_size()
    + 	h = n // 2
    + 	amt = h * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    + 	x0 = (k % 2) * h
    + 	y0 = (k // 2) * h
    + 	while num_items(Items.Weird_Substance) >= amt * 4:
    + 		solve_region(x0, y0, h, amt)
    + 
    + def maze_phase():
    + 	par(maze_worker)
    
    Write result the agent saw
    Saved maze (68 lines).
    Game time: 2h 2m 52s elapsed, 3h 57m 8s of budget remaining.
  6. r62h 02mSaved, never run71 lines · +4 −1
    from lib import *
    
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    
    def solve_region(x0, y0, s, amt):
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	tx, ty = measure()
    	visited = []
    	for i in range(s * s):
    		visited.append(False)
    	x = get_pos_x()
    	y = get_pos_y()
    	visited[(x - x0) * s + y - y0] = True
    	stack = []
    	while get_entity_type() != Entities.Treasure:
    		order = []
    		if tx > x:
    			order.append(1)
    		elif tx < x:
    			order.append(3)
    		if ty > y:
    			order.append(0)
    		elif ty < y:
    			order.append(2)
    		for d in range(4):
    			if d != order[0] and (len(order) < 2 or d != order[1]):
    				order.append(d)
    		moved = False
    		for d in order:
    			nx = x + DX[d]
    			ny = y + DY[d]
    			if nx < x0 or ny < y0 or nx >= x0 + s or ny >= y0 + s:
    				continue
    			if visited[(nx - x0) * s + ny - y0]:
    				continue
    			if can_move(dirs[d]):
    				move(dirs[d])
    				x = nx
    				y = ny
    				visited[(x - x0) * s + y - y0] = True
    				stack.append(d)
    				moved = True
    				break
    		if not moved:
    			d = (stack.pop() + 2) % 4
    			move(dirs[d])
    			x += DX[d]
    			y += DY[d]
    	harvest()
    
    def maze_worker(k, D):
    	if k >= 4:
    		return
    	n = get_world_size()
    	h = n // 2
    	amt = h * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	x0 = (k % 2) * h
    	y0 = (k // 2) * h
    	goto(x0 + h // 2, y0 + h // 2)
    	t = get_time()
    	while get_time() - t < 1.5:
    		pass
    	while num_items(Items.Weird_Substance) >= amt * 4:
    		solve_region(x0, y0, h, amt)
    
    def maze_phase():
    	par(maze_worker)
    Changes from the previous revision
      
      def solve_region(x0, y0, s, amt):
    - 	goto(x0 + s // 2, y0 + s // 2)
      	harvest()
      	plant(Entities.Bush)
      	x0 = (k % 2) * h
      	y0 = (k // 2) * h
    + 	goto(x0 + h // 2, y0 + h // 2)
    + 	t = get_time()
    + 	while get_time() - t < 1.5:
    + 		pass
      	while num_items(Items.Weird_Substance) >= amt * 4:
      		solve_region(x0, y0, h, amt)
    
    Write result the agent saw
    Saved maze (71 lines).
    Game time: 2h 3m 2s elapsed, 3h 56m 58s of budget remaining.
  7. r72h 03mSaved, never run83 lines · +16 −4
    from lib import *
    
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    
    def solve_region(x0, y0, s, amt):
    	if get_entity_type() != Entities.Hedge and get_entity_type() != Entities.Treasure:
    		harvest()
    		if get_ground_type() != Grounds.Grassland:
    			till()
    		plant(Entities.Bush)
    		use_item(Items.Weird_Substance, amt)
    	r = measure()
    	if r == None:
    		print("no maze", get_entity_type())
    		harvest()
    		return
    	tx, ty = r
    	visited = []
    	for i in range(s * s):
    		visited.append(False)
    	x = get_pos_x()
    	y = get_pos_y()
    	visited[(x - x0) * s + y - y0] = True
    	stack = []
    	while get_entity_type() != Entities.Treasure:
    		order = []
    		if tx > x:
    			order.append(1)
    		elif tx < x:
    			order.append(3)
    		if ty > y:
    			order.append(0)
    		elif ty < y:
    			order.append(2)
    		for d in range(4):
    			if d != order[0] and (len(order) < 2 or d != order[1]):
    				order.append(d)
    		moved = False
    		for d in order:
    			nx = x + DX[d]
    			ny = y + DY[d]
    			if nx < x0 or ny < y0 or nx >= x0 + s or ny >= y0 + s:
    				continue
    			if visited[(nx - x0) * s + ny - y0]:
    				continue
    			if can_move(dirs[d]):
    				move(dirs[d])
    				x = nx
    				y = ny
    				visited[(x - x0) * s + y - y0] = True
    				stack.append(d)
    				moved = True
    				break
    		if not moved:
    			if len(stack) == 0:
    				print("stuck")
    				harvest()
    				return
    			d = (stack.pop() + 2) % 4
    			move(dirs[d])
    			x += DX[d]
    			y += DY[d]
    	harvest()
    
    def maze_worker(k, D):
    	if k >= 4:
    		return
    	n = get_world_size()
    	h = n // 2
    	amt = h * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	x0 = (k % 2) * h
    	y0 = (k // 2) * h
    	goto(x0 + h // 2, y0 + h // 2)
    	t = get_time()
    	while get_time() - t < 1.5:
    		pass
    	while num_items(Items.Weird_Substance) >= amt * 4:
    		solve_region(x0, y0, h, amt)
    
    def maze_phase():
    	par(maze_worker)
    Changes from the previous revision
      
      def solve_region(x0, y0, s, amt):
    - 	harvest()
    - 	plant(Entities.Bush)
    - 	use_item(Items.Weird_Substance, amt)
    - 	tx, ty = measure()
    + 	if get_entity_type() != Entities.Hedge and get_entity_type() != Entities.Treasure:
    + 		harvest()
    + 		if get_ground_type() != Grounds.Grassland:
    + 			till()
    + 		plant(Entities.Bush)
    + 		use_item(Items.Weird_Substance, amt)
    + 	r = measure()
    + 	if r == None:
    + 		print("no maze", get_entity_type())
    + 		harvest()
    + 		return
    + 	tx, ty = r
      	visited = []
      	for i in range(s * s):
      				break
      		if not moved:
    + 			if len(stack) == 0:
    + 				print("stuck")
    + 				harvest()
    + 				return
      			d = (stack.pop() + 2) % 4
      			move(dirs[d])
    
    Write result the agent saw
    Saved maze (83 lines).
    Game time: 2h 3m 38s elapsed, 3h 56m 22s of budget remaining.
  8. r82h 04mSaved, never run94 lines · +17 −6
    from lib import *
    
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    
    def solve_region(x0, y0, s, amt):
    	if get_entity_type() != Entities.Hedge and get_entity_type() != Entities.Treasure:
    		harvest()
    		if get_ground_type() != Grounds.Grassland:
    			till()
    		plant(Entities.Bush)
    		use_item(Items.Weird_Substance, amt)
    	r = measure()
    	if r == None:
    		print("no maze", get_entity_type())
    		harvest()
    		return
    	tx, ty = r
    	visited = []
    	for i in range(s * s):
    		visited.append(False)
    	x = get_pos_x()
    	y = get_pos_y()
    	visited[(x - x0) * s + y - y0] = True
    	stack = []
    	while get_entity_type() != Entities.Treasure:
    		if x == tx and y == ty:
    			print("lost", x, y, get_entity_type())
    			return
    		order = []
    		if tx > x:
    			order.append(1)
    		elif tx < x:
    			order.append(3)
    		if ty > y:
    			order.append(0)
    		elif ty < y:
    			order.append(2)
    		for d in range(4):
    			if d != order[0] and (len(order) < 2 or d != order[1]):
    				order.append(d)
    		moved = False
    		for d in order:
    			nx = x + DX[d]
    			ny = y + DY[d]
    			if nx < x0 or ny < y0 or nx >= x0 + s or ny >= y0 + s:
    				continue
    			if visited[(nx - x0) * s + ny - y0]:
    				continue
    			if can_move(dirs[d]):
    				move(dirs[d])
    				x = nx
    				y = ny
    				visited[(x - x0) * s + y - y0] = True
    				stack.append(d)
    				moved = True
    				break
    		if not moved:
    			if len(stack) == 0:
    				print("stuck")
    				harvest()
    				return
    			d = (stack.pop() + 2) % 4
    			move(dirs[d])
    			x += DX[d]
    			y += DY[d]
    	harvest()
    
    def maze_worker(k, T):
    	n = get_world_size()
    	h = n // 2
    	amt = h * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	x0 = (k % 2) * h
    	y0 = (k // 2) * h
    	goto(x0 + h // 2, y0 + h // 2)
    	while get_time() < T:
    		pass
    	if get_pos_x() != x0 + h // 2 or get_pos_y() != y0 + h // 2:
    		print("bad pos", k)
    		return
    	while num_items(Items.Weird_Substance) >= amt * 4:
    		solve_region(x0, y0, h, amt)
    
    def maze_phase():
    	T = get_time() + 3
    	hs = []
    	for k in range(1, 4):
    		h = spawn_drone(maze_worker, k, T)
    		if h != None:
    			hs.append(h)
    	maze_worker(0, T)
    	for h in hs:
    		wait_for(h)
    Changes from the previous revision
      	stack = []
      	while get_entity_type() != Entities.Treasure:
    + 		if x == tx and y == ty:
    + 			print("lost", x, y, get_entity_type())
    + 			return
      		order = []
      		if tx > x:
      	harvest()
      
    - def maze_worker(k, D):
    - 	if k >= 4:
    - 		return
    + def maze_worker(k, T):
      	n = get_world_size()
      	h = n // 2
      	y0 = (k // 2) * h
      	goto(x0 + h // 2, y0 + h // 2)
    - 	t = get_time()
    - 	while get_time() - t < 1.5:
    + 	while get_time() < T:
      		pass
    + 	if get_pos_x() != x0 + h // 2 or get_pos_y() != y0 + h // 2:
    + 		print("bad pos", k)
    + 		return
      	while num_items(Items.Weird_Substance) >= amt * 4:
      		solve_region(x0, y0, h, amt)
      
      def maze_phase():
    - 	par(maze_worker)
    + 	T = get_time() + 3
    + 	hs = []
    + 	for k in range(1, 4):
    + 		h = spawn_drone(maze_worker, k, T)
    + 		if h != None:
    + 			hs.append(h)
    + 	maze_worker(0, T)
    + 	for h in hs:
    + 		wait_for(h)
    
    Write result the agent saw
    Saved maze (94 lines).
    Game time: 2h 4m 26s elapsed, 3h 55m 34s of budget remaining.
  9. r92h 07mSaved, never run88 lines · +73 −79
    from lib import *
    
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    
    def hunt(amt, n, maxuse):
    	while True:
    		r = measure()
    		if r == None:
    			return
    		tx, ty = r
    		visited = []
    		for i in range(n * n):
    			visited.append(False)
    		x = get_pos_x()
    		y = get_pos_y()
    		visited[x * n + y] = True
    		stack = []
    		changed = False
    		while not (x == tx and y == ty):
    			order = []
    			if tx > x:
    				order.append(1)
    			elif tx < x:
    				order.append(3)
    			if ty > y:
    				order.append(0)
    			elif ty < y:
    				order.append(2)
    			for d in range(4):
    				if d != order[0] and (len(order) < 2 or d != order[1]):
    					order.append(d)
    			moved = False
    			for d in order:
    				nx = x + DX[d]
    				ny = y + DY[d]
    				if nx < 0 or ny < 0 or nx >= n or ny >= n:
    					continue
    				if visited[nx * n + ny]:
    					continue
    				if move(dirs[d]):
    					x = nx
    					y = ny
    					visited[x * n + y] = True
    					stack.append(d)
    					moved = True
    					break
    			if not moved:
    				if len(stack) == 0:
    					break
    				d = (stack.pop() + 2) % 4
    				move(dirs[d])
    				x += DX[d]
    				y += DY[d]
    			if measure() != r:
    				changed = True
    				break
    		if changed:
    			continue
    		if get_entity_type() == Entities.Treasure:
    			if num_items(Items.Weird_Substance) >= amt * 2 and maxuse > 0:
    				use_item(Items.Weird_Substance, amt)
    			else:
    				harvest()
    				return
    		elif get_entity_type() != Entities.Hedge:
    			return
    
    def maze_worker(k, D):
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	hunt(amt, n, 1)
    
    def solve_maze():
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	if num_items(Items.Weird_Substance) < amt:
    		return False
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	par(maze_worker)
    	return True
    
    def maze_phase():
    	while solve_maze():
    		pass
    Changes from the previous revision
      DY = [1, 0, -1, 0]
      
    - def solve_region(x0, y0, s, amt):
    - 	if get_entity_type() != Entities.Hedge and get_entity_type() != Entities.Treasure:
    - 		harvest()
    - 		if get_ground_type() != Grounds.Grassland:
    - 			till()
    - 		plant(Entities.Bush)
    - 		use_item(Items.Weird_Substance, amt)
    - 	r = measure()
    - 	if r == None:
    - 		print("no maze", get_entity_type())
    - 		harvest()
    - 		return
    - 	tx, ty = r
    - 	visited = []
    - 	for i in range(s * s):
    - 		visited.append(False)
    - 	x = get_pos_x()
    - 	y = get_pos_y()
    - 	visited[(x - x0) * s + y - y0] = True
    - 	stack = []
    - 	while get_entity_type() != Entities.Treasure:
    - 		if x == tx and y == ty:
    - 			print("lost", x, y, get_entity_type())
    + def hunt(amt, n, maxuse):
    + 	while True:
    + 		r = measure()
    + 		if r == None:
      			return
    - 		order = []
    - 		if tx > x:
    - 			order.append(1)
    - 		elif tx < x:
    - 			order.append(3)
    - 		if ty > y:
    - 			order.append(0)
    - 		elif ty < y:
    - 			order.append(2)
    - 		for d in range(4):
    - 			if d != order[0] and (len(order) < 2 or d != order[1]):
    - 				order.append(d)
    - 		moved = False
    - 		for d in order:
    - 			nx = x + DX[d]
    - 			ny = y + DY[d]
    - 			if nx < x0 or ny < y0 or nx >= x0 + s or ny >= y0 + s:
    - 				continue
    - 			if visited[(nx - x0) * s + ny - y0]:
    - 				continue
    - 			if can_move(dirs[d]):
    + 		tx, ty = r
    + 		visited = []
    + 		for i in range(n * n):
    + 			visited.append(False)
    + 		x = get_pos_x()
    + 		y = get_pos_y()
    + 		visited[x * n + y] = True
    + 		stack = []
    + 		changed = False
    + 		while not (x == tx and y == ty):
    + 			order = []
    + 			if tx > x:
    + 				order.append(1)
    + 			elif tx < x:
    + 				order.append(3)
    + 			if ty > y:
    + 				order.append(0)
    + 			elif ty < y:
    + 				order.append(2)
    + 			for d in range(4):
    + 				if d != order[0] and (len(order) < 2 or d != order[1]):
    + 					order.append(d)
    + 			moved = False
    + 			for d in order:
    + 				nx = x + DX[d]
    + 				ny = y + DY[d]
    + 				if nx < 0 or ny < 0 or nx >= n or ny >= n:
    + 					continue
    + 				if visited[nx * n + ny]:
    + 					continue
    + 				if move(dirs[d]):
    + 					x = nx
    + 					y = ny
    + 					visited[x * n + y] = True
    + 					stack.append(d)
    + 					moved = True
    + 					break
    + 			if not moved:
    + 				if len(stack) == 0:
    + 					break
    + 				d = (stack.pop() + 2) % 4
      				move(dirs[d])
    - 				x = nx
    - 				y = ny
    - 				visited[(x - x0) * s + y - y0] = True
    - 				stack.append(d)
    - 				moved = True
    + 				x += DX[d]
    + 				y += DY[d]
    + 			if measure() != r:
    + 				changed = True
      				break
    - 		if not moved:
    - 			if len(stack) == 0:
    - 				print("stuck")
    + 		if changed:
    + 			continue
    + 		if get_entity_type() == Entities.Treasure:
    + 			if num_items(Items.Weird_Substance) >= amt * 2 and maxuse > 0:
    + 				use_item(Items.Weird_Substance, amt)
    + 			else:
      				harvest()
      				return
    - 			d = (stack.pop() + 2) % 4
    - 			move(dirs[d])
    - 			x += DX[d]
    - 			y += DY[d]
    - 	harvest()
    + 		elif get_entity_type() != Entities.Hedge:
    + 			return
      
    - def maze_worker(k, T):
    + def maze_worker(k, D):
      	n = get_world_size()
    - 	h = n // 2
    - 	amt = h * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    - 	x0 = (k % 2) * h
    - 	y0 = (k // 2) * h
    - 	goto(x0 + h // 2, y0 + h // 2)
    - 	while get_time() < T:
    - 		pass
    - 	if get_pos_x() != x0 + h // 2 or get_pos_y() != y0 + h // 2:
    - 		print("bad pos", k)
    - 		return
    - 	while num_items(Items.Weird_Substance) >= amt * 4:
    - 		solve_region(x0, y0, h, amt)
    + 	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    + 	hunt(amt, n, 1)
      
    + def solve_maze():
    + 	n = get_world_size()
    + 	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    + 	if num_items(Items.Weird_Substance) < amt:
    + 		return False
    + 	harvest()
    + 	plant(Entities.Bush)
    + 	use_item(Items.Weird_Substance, amt)
    + 	par(maze_worker)
    + 	return True
    + 
      def maze_phase():
    - 	T = get_time() + 3
    - 	hs = []
    - 	for k in range(1, 4):
    - 		h = spawn_drone(maze_worker, k, T)
    - 		if h != None:
    - 			hs.append(h)
    - 	maze_worker(0, T)
    - 	for h in hs:
    - 		wait_for(h)
    + 	while solve_maze():
    + 		pass
    
    Write result the agent saw
    Saved maze (88 lines).
    Game time: 2h 7m 19s elapsed, 3h 52m 41s of budget remaining.
  10. r102h 07mSaved, never run94 lines · +12 −6
    from lib import *
    
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    PERMS = [[0, 1, 2, 3], [3, 2, 1, 0], [1, 3, 0, 2], [2, 0, 3, 1], [0, 2, 1, 3], [3, 1, 2, 0], [1, 0, 3, 2], [2, 3, 0, 1]]
    
    def hunt(amt, n, k):
    	perm = PERMS[k % 8]
    	swapg = (k // 2) % 2 == 1
    	while True:
    		r = measure()
    		if r == None:
    			return
    		tx, ty = r
    		visited = []
    		for i in range(n * n):
    			visited.append(False)
    		x = get_pos_x()
    		y = get_pos_y()
    		visited[x * n + y] = True
    		stack = []
    		changed = False
    		while not (x == tx and y == ty):
    			order = []
    			if tx > x:
    				order.append(1)
    			elif tx < x:
    				order.append(3)
    			if ty > y:
    				order.append(0)
    			elif ty < y:
    				order.append(2)
    			if swapg and len(order) == 2:
    				order = [order[1], order[0]]
    			for d in perm:
    				if d != order[0] and (len(order) < 2 or d != order[1]):
    					order.append(d)
    			moved = False
    			for d in order:
    				nx = x + DX[d]
    				ny = y + DY[d]
    				if nx < 0 or ny < 0 or nx >= n or ny >= n:
    					continue
    				if visited[nx * n + ny]:
    					continue
    				if move(dirs[d]):
    					x = nx
    					y = ny
    					visited[x * n + y] = True
    					stack.append(d)
    					moved = True
    					break
    			if not moved:
    				if len(stack) == 0:
    					break
    				d = (stack.pop() + 2) % 4
    				move(dirs[d])
    				x += DX[d]
    				y += DY[d]
    			if measure() != r:
    				changed = True
    				break
    		if changed:
    			continue
    		e = get_entity_type()
    		if e == Entities.Treasure:
    			if num_items(Items.Weird_Substance) >= amt * 2:
    				use_item(Items.Weird_Substance, amt)
    			else:
    				harvest()
    				return
    		elif e != Entities.Hedge:
    			return
    
    def maze_worker(k, D):
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	hunt(amt, n, k)
    
    def solve_maze():
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	if num_items(Items.Weird_Substance) < amt:
    		return False
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	par(maze_worker)
    	return True
    
    def maze_phase():
    	while solve_maze():
    		pass
    Changes from the previous revision
      DX = [0, 1, 0, -1]
      DY = [1, 0, -1, 0]
    + PERMS = [[0, 1, 2, 3], [3, 2, 1, 0], [1, 3, 0, 2], [2, 0, 3, 1], [0, 2, 1, 3], [3, 1, 2, 0], [1, 0, 3, 2], [2, 3, 0, 1]]
      
    - def hunt(amt, n, maxuse):
    + def hunt(amt, n, k):
    + 	perm = PERMS[k % 8]
    + 	swapg = (k // 2) % 2 == 1
      	while True:
      		r = measure()
      			elif ty < y:
      				order.append(2)
    - 			for d in range(4):
    + 			if swapg and len(order) == 2:
    + 				order = [order[1], order[0]]
    + 			for d in perm:
      				if d != order[0] and (len(order) < 2 or d != order[1]):
      					order.append(d)
      		if changed:
      			continue
    - 		if get_entity_type() == Entities.Treasure:
    - 			if num_items(Items.Weird_Substance) >= amt * 2 and maxuse > 0:
    + 		e = get_entity_type()
    + 		if e == Entities.Treasure:
    + 			if num_items(Items.Weird_Substance) >= amt * 2:
      				use_item(Items.Weird_Substance, amt)
      			else:
      				harvest()
      				return
    - 		elif get_entity_type() != Entities.Hedge:
    + 		elif e != Entities.Hedge:
      			return
      
      	n = get_world_size()
      	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    - 	hunt(amt, n, 1)
    + 	hunt(amt, n, k)
      
      def solve_maze():
    
    Write result the agent saw
    Saved maze (94 lines).
    Game time: 2h 7m 29s elapsed, 3h 52m 31s of budget remaining.
  11. r114h 35mSaved, never run98 lines · +5 −1
    from lib import *
    
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    PERMS = [[0, 1, 2, 3], [3, 2, 1, 0], [1, 3, 0, 2], [2, 0, 3, 1], [0, 2, 1, 3], [3, 1, 2, 0], [1, 0, 3, 2], [2, 3, 0, 1]]
    
    def hunt(amt, n, k):
    	perm = PERMS[k % 8]
    	swapg = (k // 2) % 2 == 1
    	while True:
    		r = measure()
    		if r == None:
    			return
    		tx, ty = r
    		visited = []
    		for i in range(n * n):
    			visited.append(False)
    		x = get_pos_x()
    		y = get_pos_y()
    		visited[x * n + y] = True
    		stack = []
    		changed = False
    		while not (x == tx and y == ty):
    			order = []
    			if tx > x:
    				order.append(1)
    			elif tx < x:
    				order.append(3)
    			if ty > y:
    				order.append(0)
    			elif ty < y:
    				order.append(2)
    			if swapg and len(order) == 2:
    				order = [order[1], order[0]]
    			for d in perm:
    				if d != order[0] and (len(order) < 2 or d != order[1]):
    					order.append(d)
    			moved = False
    			for d in order:
    				nx = x + DX[d]
    				ny = y + DY[d]
    				if nx < 0 or ny < 0 or nx >= n or ny >= n:
    					continue
    				if visited[nx * n + ny]:
    					continue
    				if move(dirs[d]):
    					x = nx
    					y = ny
    					visited[x * n + y] = True
    					stack.append(d)
    					moved = True
    					break
    			if not moved:
    				if len(stack) == 0:
    					break
    				d = (stack.pop() + 2) % 4
    				move(dirs[d])
    				x += DX[d]
    				y += DY[d]
    			if measure() != r:
    				changed = True
    				break
    		if changed:
    			continue
    		e = get_entity_type()
    		if e == Entities.Treasure:
    			if num_items(Items.Weird_Substance) >= amt * 2:
    				use_item(Items.Weird_Substance, amt)
    				if measure() == r and get_entity_type() == Entities.Treasure:
    					harvest()
    					return
    			else:
    				harvest()
    				return
    		elif e != Entities.Hedge:
    			return
    
    def maze_worker(k, D):
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	hunt(amt, n, k)
    
    def solve_maze():
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	if num_items(Items.Weird_Substance) < amt:
    		return False
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	par(maze_worker)
    	return True
    
    def maze_phase():
    	start = get_time()
    	while get_time() - start < 240 and solve_maze():
    		pass
    Changes from the previous revision
      			if num_items(Items.Weird_Substance) >= amt * 2:
      				use_item(Items.Weird_Substance, amt)
    + 				if measure() == r and get_entity_type() == Entities.Treasure:
    + 					harvest()
    + 					return
      			else:
      				harvest()
      
      def maze_phase():
    - 	while solve_maze():
    + 	start = get_time()
    + 	while get_time() - start < 240 and solve_maze():
      		pass
    
    Write result the agent saw
    Saved maze (98 lines).
    Game time: 4h 35m 45s elapsed, 1h 24m 15s of budget remaining.
  12. r124h 59mSaved, never runFinal106 lines · +16 −8
    from lib import *
    
    dirs = [North, East, South, West]
    DX = [0, 1, 0, -1]
    DY = [1, 0, -1, 0]
    PERMS = [[0, 1, 2, 3], [3, 2, 1, 0], [1, 3, 0, 2], [2, 0, 3, 1], [0, 2, 1, 3], [3, 1, 2, 0], [1, 0, 3, 2], [2, 3, 0, 1]]
    LIMIT = 150
    
    def hunt(amt, n, k, deadline):
    	perm = PERMS[k % 8]
    	swapg = (k // 2) % 2 == 1
    	while True:
    		r = measure()
    		if r == None:
    			return
    		tx, ty = r
    		visited = []
    		for i in range(n * n):
    			visited.append(False)
    		x = get_pos_x()
    		y = get_pos_y()
    		visited[x * n + y] = True
    		stack = []
    		changed = False
    		while not (x == tx and y == ty):
    			order = []
    			if tx > x:
    				order.append(1)
    			elif tx < x:
    				order.append(3)
    			if ty > y:
    				order.append(0)
    			elif ty < y:
    				order.append(2)
    			if swapg and len(order) == 2:
    				order = [order[1], order[0]]
    			for d in perm:
    				if d != order[0] and (len(order) < 2 or d != order[1]):
    					order.append(d)
    			moved = False
    			for d in order:
    				nx = x + DX[d]
    				ny = y + DY[d]
    				if nx < 0 or ny < 0 or nx >= n or ny >= n:
    					continue
    				if visited[nx * n + ny]:
    					continue
    				if move(dirs[d]):
    					x = nx
    					y = ny
    					visited[x * n + y] = True
    					stack.append(d)
    					moved = True
    					break
    			if not moved:
    				if len(stack) == 0:
    					break
    				d = (stack.pop() + 2) % 4
    				move(dirs[d])
    				x += DX[d]
    				y += DY[d]
    			if measure() != r:
    				changed = True
    				break
    		if changed:
    			continue
    		e = get_entity_type()
    		if e == Entities.Treasure:
    			if num_items(Items.Weird_Substance) >= amt * 2 and get_time() < deadline:
    				use_item(Items.Weird_Substance, amt)
    				if measure() == r and get_entity_type() == Entities.Treasure:
    					harvest()
    					return
    			else:
    				harvest()
    				return
    		elif e != Entities.Hedge:
    			return
    
    def maze_worker(k, deadline):
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	hunt(amt, n, k, deadline)
    
    def solve_maze(deadline):
    	n = get_world_size()
    	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    	if num_items(Items.Weird_Substance) < amt:
    		return False
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, amt)
    	hs = []
    	for k in range(1, max_drones()):
    		h = spawn_drone(maze_worker, k, deadline)
    		if h != None:
    			hs.append(h)
    	maze_worker(0, deadline)
    	for h in hs:
    		wait_for(h)
    	return True
    
    def maze_phase():
    	deadline = get_time() + LIMIT
    	while get_time() < deadline and solve_maze(deadline):
    		pass
    Changes from the previous revision
      DY = [1, 0, -1, 0]
      PERMS = [[0, 1, 2, 3], [3, 2, 1, 0], [1, 3, 0, 2], [2, 0, 3, 1], [0, 2, 1, 3], [3, 1, 2, 0], [1, 0, 3, 2], [2, 3, 0, 1]]
    + LIMIT = 150
      
    - def hunt(amt, n, k):
    + def hunt(amt, n, k, deadline):
      	perm = PERMS[k % 8]
      	swapg = (k // 2) % 2 == 1
      		e = get_entity_type()
      		if e == Entities.Treasure:
    - 			if num_items(Items.Weird_Substance) >= amt * 2:
    + 			if num_items(Items.Weird_Substance) >= amt * 2 and get_time() < deadline:
      				use_item(Items.Weird_Substance, amt)
      				if measure() == r and get_entity_type() == Entities.Treasure:
      			return
      
    - def maze_worker(k, D):
    + def maze_worker(k, deadline):
      	n = get_world_size()
      	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
    - 	hunt(amt, n, k)
    + 	hunt(amt, n, k, deadline)
      
    - def solve_maze():
    + def solve_maze(deadline):
      	n = get_world_size()
      	amt = n * 2 ** (num_unlocked(Unlocks.Mazes) - 1)
      	plant(Entities.Bush)
      	use_item(Items.Weird_Substance, amt)
    - 	par(maze_worker)
    + 	hs = []
    + 	for k in range(1, max_drones()):
    + 		h = spawn_drone(maze_worker, k, deadline)
    + 		if h != None:
    + 			hs.append(h)
    + 	maze_worker(0, deadline)
    + 	for h in hs:
    + 		wait_for(h)
      	return True
      
      def maze_phase():
    - 	start = get_time()
    - 	while get_time() - start < 240 and solve_maze():
    + 	deadline = get_time() + LIMIT
    + 	while get_time() < deadline and solve_maze(deadline):
      		pass
    
    Write result the agent saw
    Saved maze (106 lines).
    Game time: 4h 59m 25s elapsed, 1h 35s of budget remaining.
mtest.py5 writes · 5 ran · first at 51m 55s
  1. r151m 55sRan3 lines · ran 26s
    import maze
    for i in range(5):
    	maze.solve_maze()
    Write result the agent saw
    Saved mtest (3 lines).
    Game time: 52m 5s elapsed, 5h 7m 55s of budget remaining.
    run_program at 52m 05s for 120s (agent saw)
    Ran mtest for 26s of game time; it finished.
    Inventory change: fertilizer +6, gold +320, power -4.25, water +21, weird_substance -40, wood +10.
    Game time: 52m 41s elapsed, 5h 7m 19s of budget remaining.
    Output:
    (none)
  2. r21h 22mRan6 lines · +5 −2 · ran 2m 34s
    import maze
    t = get_time()
    c = 0
    while maze.solve_maze(50):
    	c += 1
    print(c, get_time() - t)
    Changes from the previous revision
      import maze
    - for i in range(5):
    - 	maze.solve_maze()
    + t = get_time()
    + c = 0
    + while maze.solve_maze(50):
    + 	c += 1
    + print(c, get_time() - t)
    
    Write result the agent saw
    Saved mtest (6 lines).
    Game time: 1h 22m 56s elapsed, 4h 37m 4s of budget remaining.
    run_program at 1h 23m for 200s (agent saw)
    Ran mtest for 2m 34s of game time; it finished.
    Inventory change: fertilizer +61, gold +1408, water +123, weird_substance -176.
    Game time: 1h 25m 49s elapsed, 4h 34m 11s of budget remaining.
    Output:
    1 152.65
  3. r32h 00mRan6 lines · +4 −4 · ran 46s
    import maze
    change_hat(Hats.Straw_Hat)
    t = get_time()
    for i in range(5):
    	maze.solve_maze()
    print((get_time() - t) / 5)
    Changes from the previous revision
      import maze
    + change_hat(Hats.Straw_Hat)
      t = get_time()
    - c = 0
    - while maze.solve_maze(50):
    - 	c += 1
    - print(c, get_time() - t)
    + for i in range(5):
    + 	maze.solve_maze()
    + print((get_time() - t) / 5)
    
    Write result the agent saw
    Saved mtest (6 lines).
    Game time: 2h 1m 4s elapsed, 3h 58m 56s of budget remaining.
    run_program at 2h 01m for 200s (agent saw)
    Ran mtest for 46s of game time; it finished.
    Inventory change: fertilizer +36, gold +1440, water +73, weird_substance -120.
    Game time: 2h 2m 10s elapsed, 3h 57m 50s of budget remaining.
    Output:
    8.92
  4. r42h 03mRan8 lines · +5 −3 · ran 2m 42s · 2 runtime errors
    import maze
    change_hat(Hats.Straw_Hat)
    clear()
    t = get_time()
    g = num_items(Items.Gold)
    w = num_items(Items.Weird_Substance)
    maze.maze_phase()
    print(get_time() - t, num_items(Items.Gold) - g, w - num_items(Items.Weird_Substance))
    Changes from the previous revision
      import maze
      change_hat(Hats.Straw_Hat)
    + clear()
      t = get_time()
    - for i in range(5):
    - 	maze.solve_maze()
    - print((get_time() - t) / 5)
    + g = num_items(Items.Gold)
    + w = num_items(Items.Weird_Substance)
    + maze.maze_phase()
    + print(get_time() - t, num_items(Items.Gold) - g, w - num_items(Items.Weird_Substance))
    
    Write result the agent saw
    Saved mtest (8 lines).
    Game time: 2h 3m 12s elapsed, 3h 56m 48s of budget remaining.
    run_program at 2h 03m for 600s (agent saw)
    Ran mtest for 6s of game time; it stopped with an error: The left hand side of the assignment didn't match the right hand side.
    Inventory change: fertilizer +5, gold +360, hay +64, water +10, weird_substance -108.
    Game time: 2h 3m 28s elapsed, 3h 56m 32s of budget remaining.
    Output:
    Error: The left hand side of the assignment didn't match the right hand side.
    In: maze_phase <- par <- maze_worker <- solve_region
    tx, ty = measure()
           ^^         
    --------------------------------------------------------------------
    run_program at 2h 03m for 600s (agent saw)
    Ran mtest for 4s of game time; it stopped with an error: The index 0 was outside the bounds of the list [].
    Inventory change: fertilizer +3, gold +216, hay +64, water +6, weird_substance -84.
    Game time: 2h 3m 51s elapsed, 3h 56m 9s of budget remaining.
    Output:
    Error: The index 0 was outside the bounds of the list [].
    In: maze_phase <- par <- maze_worker <- solve_region
    if d != order[0] and (len(order) < 2 or d != order[1]):
                 ^^                                        
    --------------------------------------------------------------------
    run_program at 2h 04m for 600s (agent saw)
    Ran mtest for 2m 33s of game time; it finished.
    Inventory change: fertilizer +123, gold +2304, hay +992, water +245, weird_substance -1956.
    Game time: 2h 7m 9s elapsed, 3h 52m 51s of budget remaining.
    Output:
    no maze Entities.Grass
    stuck
    no maze Entities.Grass
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    no maze Entities.Grass
    stuck
    stuck
    lost 7 9 Entities.Grass
    lost 2 9 Entities.Grass
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    lost 10 3 Entities.Grass
    stuck
    no maze Entities.Grass
    lost 7 11 Entities.Grass
    lost 6 3 Entities.Grass
    stuck
    stuck
    stuck
    no maze Entities.Grass
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    lost 8 3 Entities.Grass
    stuck
    stuck
    stuck
    no maze Entities.Grass
    stuck
    lost 10 5 Entities.Grass
    stuck
    lost 4 5 Entities.Hedge
    lost 8 2 Entities.Grass
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    lost 5 9 Entities.Grass
    stuck
    stuck
    stuck
    lost 1 9 Entities.Hedge
    stuck
    lost 2 5 Entities.Grass
    stuck
    stuck
    no maze Entities.Grass
    no maze Entities.Grass
    stuck
    stuck
    lost 1 8 Entities.Grass
    stuck
    stuck
    stuck
    stuck
    stuck
    lost 3 11 Entities.Grass
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    lost 2 0 Entities.Hedge
    stuck
    stuck
    stuck
    stuck
    lost 5 5 Entities.Hedge
    151.74 2304 1956
    Runtime error at 2h 03m (telemetry; not shown to the agent)
    The left hand side of the assignment didn't match the right hand side.
    Runtime error at 2h 03m (telemetry; not shown to the agent)
    The index 0 was outside the bounds of the list [].
  5. r52h 07mRanFinal8 lines · +1 −1 · ran 9s
    import maze
    change_hat(Hats.Straw_Hat)
    clear()
    t = get_time()
    g = num_items(Items.Gold)
    w = num_items(Items.Weird_Substance)
    maze.solve_maze()
    print(get_time() - t, num_items(Items.Gold) - g, w - num_items(Items.Weird_Substance))
    Changes from the previous revision
      g = num_items(Items.Gold)
      w = num_items(Items.Weird_Substance)
    - maze.maze_phase()
    + maze.solve_maze()
      print(get_time() - t, num_items(Items.Gold) - g, w - num_items(Items.Weird_Substance))
    
    Write result the agent saw
    Saved mtest (8 lines).
    Game time: 2h 7m 39s elapsed, 3h 52m 21s of budget remaining.
    run_program at 2h 07m for 300s (agent saw)
    Ran mtest for 9s of game time; it finished.
    Inventory change: fertilizer +7, gold +288, water +15, weird_substance -24.
    Game time: 2h 7m 58s elapsed, 3h 52m 2s of budget remaining.
    Output:
    8.02 288 24
lib.py1 write · 0 ran · first at 59m 11s
  1. r159m 11sSaved, never runFinal43 lines
    def goto(tx, ty):
    	n = get_world_size()
    	dx = (tx - get_pos_x()) % n
    	if dx <= n // 2:
    		for i in range(dx):
    			move(East)
    	else:
    		for i in range(n - dx):
    			move(West)
    	dy = (ty - get_pos_y()) % n
    	if dy <= n // 2:
    		for i in range(dy):
    			move(North)
    	else:
    		for i in range(n - dy):
    			move(South)
    
    def par(f):
    	D = max_drones()
    	hs = []
    	for k in range(1, D):
    		h = spawn_drone(f, k, D)
    		if h != None:
    			hs.append(h)
    	f(0, D)
    	for h in hs:
    		wait_for(h)
    
    def water():
    	if get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    def fertilize():
    	if num_items(Items.Fertilizer) > 0:
    		use_item(Items.Fertilizer)
    
    def soil():
    	if get_ground_type() != Grounds.Soil:
    		till()
    
    def grassland():
    	if get_ground_type() != Grounds.Grassland:
    		till()
    Write result the agent saw
    Saved lib (43 lines).
    Game time: 59m 21s elapsed, 5h 39s of budget remaining.
phases.py4 writes · 0 ran · first at 59m 21s
  1. r159m 21sSaved, never run122 lines
    from lib import *
    
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Grass:
    		grassland()
    	elif c != Entities.Tree:
    		soil()
    	if get_entity_type() != c:
    		if get_entity_type() != None:
    			harvest()
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed_worker(k, D):
    	n = get_world_size()
    	for p in range(3):
    		for x in range(k, n, D):
    			goto(x, 0)
    			for y in range(n):
    				tend()
    				move(North)
    
    def pumpkin_worker(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			harvest()
    			soil()
    			plant(Entities.Pumpkin)
    			water()
    			fertilize()
    			move(North)
    	while True:
    		bad = 0
    		for x in range(k, n, D):
    			goto(x, 0)
    			for y in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					if e != Entities.Dead_Pumpkin and e != None:
    						harvest()
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    		if bad == 0:
    			return
    
    def pumpkin_phase():
    	par(pumpkin_worker)
    	harvest()
    
    def cactus_plant(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			harvest()
    			soil()
    			plant(Entities.Cactus)
    			move(North)
    
    def cactus_rows(k, D):
    	n = get_world_size()
    	for y in range(k, n, D):
    		goto(0, y)
    		swapped = True
    		while swapped:
    			swapped = False
    			for x in range(n - 1):
    				if measure() > measure(East):
    					swap(East)
    					swapped = True
    				move(East)
    			move(East)
    
    def cactus_cols(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		swapped = True
    		while swapped:
    			swapped = False
    			for y in range(n - 1):
    				if measure() > measure(North):
    					swap(North)
    					swapped = True
    				move(North)
    			move(North)
    
    def cactus_wait(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			while not can_harvest():
    				pass
    			move(North)
    
    def cactus_phase():
    	par(cactus_plant)
    	par(cactus_rows)
    	par(cactus_cols)
    	par(cactus_wait)
    	goto(0, 0)
    	harvest()
    Write result the agent saw
    Saved phases (122 lines).
    Game time: 59m 31s elapsed, 5h 29s of budget remaining.
  2. r21h 02mSaved, never run127 lines · +6 −1
    from lib import *
    
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Grass:
    		grassland()
    	elif c != Entities.Tree:
    		soil()
    	if get_entity_type() != c:
    		if get_entity_type() != None:
    			harvest()
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed_worker(k, D):
    	n = get_world_size()
    	for p in range(3):
    		for x in range(k, n, D):
    			goto(x, 0)
    			for y in range(n):
    				tend()
    				move(North)
    
    def pumpkin_worker(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			harvest()
    			soil()
    			plant(Entities.Pumpkin)
    			water()
    			fertilize()
    			move(North)
    	while True:
    		bad = 0
    		for x in range(k, n, D):
    			goto(x, 0)
    			for y in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					if e != Entities.Dead_Pumpkin and e != None:
    						harvest()
    					soil()
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    		if bad == 0:
    			return
    
    def pumpkin_phase():
    	par(pumpkin_worker)
    	harvest()
    
    def cactus_plant(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			harvest()
    			soil()
    			plant(Entities.Cactus)
    			move(North)
    
    def cactus_rows(k, D):
    	n = get_world_size()
    	for y in range(k, n, D):
    		goto(0, y)
    		swapped = True
    		while swapped:
    			swapped = False
    			for x in range(n - 1):
    				if measure() > measure(East):
    					swap(East)
    					swapped = True
    				move(East)
    			move(East)
    
    def cactus_cols(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		swapped = True
    		while swapped:
    			swapped = False
    			for y in range(n - 1):
    				if measure() > measure(North):
    					swap(North)
    					swapped = True
    				move(North)
    			move(North)
    
    def cactus_wait(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			if get_entity_type() != Entities.Cactus:
    				harvest()
    				soil()
    				plant(Entities.Cactus)
    			while not can_harvest():
    				pass
    			move(North)
    
    def cactus_phase():
    	par(cactus_plant)
    	par(cactus_wait)
    	par(cactus_rows)
    	par(cactus_cols)
    	goto(0, 0)
    	harvest()
    Changes from the previous revision
      					if e != Entities.Dead_Pumpkin and e != None:
      						harvest()
    + 					soil()
      					plant(Entities.Pumpkin)
      					water()
      		goto(x, 0)
      		for y in range(n):
    + 			if get_entity_type() != Entities.Cactus:
    + 				harvest()
    + 				soil()
    + 				plant(Entities.Cactus)
      			while not can_harvest():
      				pass
      def cactus_phase():
      	par(cactus_plant)
    + 	par(cactus_wait)
      	par(cactus_rows)
      	par(cactus_cols)
    - 	par(cactus_wait)
      	goto(0, 0)
      	harvest()
    
    Write result the agent saw
    Saved phases (127 lines).
    Game time: 1h 2m 41s elapsed, 4h 57m 19s of budget remaining.
  3. r31h 26mSaved, never run130 lines · +4 −1
    from lib import *
    
    MIX = 60
    
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Grass:
    		grassland()
    	elif c != Entities.Tree:
    		soil()
    	if get_entity_type() != c:
    		if get_entity_type() != None:
    			harvest()
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed_worker(k, D):
    	n = get_world_size()
    	start = get_time()
    	while get_time() - start < MIX:
    		for x in range(k, n, D):
    			goto(x, 0)
    			for y in range(n):
    				tend()
    				move(North)
    
    def pumpkin_worker(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			harvest()
    			soil()
    			plant(Entities.Pumpkin)
    			water()
    			fertilize()
    			move(North)
    	while True:
    		bad = 0
    		for x in range(k, n, D):
    			goto(x, 0)
    			for y in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					if e != Entities.Dead_Pumpkin and e != None:
    						harvest()
    					soil()
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    		if bad == 0:
    			return
    
    def pumpkin_phase():
    	par(pumpkin_worker)
    	harvest()
    
    def cactus_plant(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			harvest()
    			soil()
    			plant(Entities.Cactus)
    			move(North)
    
    def cactus_rows(k, D):
    	n = get_world_size()
    	for y in range(k, n, D):
    		goto(0, y)
    		swapped = True
    		while swapped:
    			swapped = False
    			for x in range(n - 1):
    				if measure() > measure(East):
    					swap(East)
    					swapped = True
    				move(East)
    			move(East)
    
    def cactus_cols(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		swapped = True
    		while swapped:
    			swapped = False
    			for y in range(n - 1):
    				if measure() > measure(North):
    					swap(North)
    					swapped = True
    				move(North)
    			move(North)
    
    def cactus_wait(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			if get_entity_type() != Entities.Cactus:
    				harvest()
    				soil()
    				plant(Entities.Cactus)
    			while not can_harvest():
    				pass
    			move(North)
    
    def cactus_phase():
    	par(cactus_plant)
    	par(cactus_wait)
    	par(cactus_rows)
    	par(cactus_cols)
    	goto(0, 0)
    	harvest()
    Changes from the previous revision
      from lib import *
      
    + MIX = 60
    + 
      def crop(x, y):
      	if (x + y) % 2 == 0:
      def mixed_worker(k, D):
      	n = get_world_size()
    - 	for p in range(3):
    + 	start = get_time()
    + 	while get_time() - start < MIX:
      		for x in range(k, n, D):
      			goto(x, 0)
    
    Write result the agent saw
    Saved phases (130 lines).
    Game time: 1h 26m 19s elapsed, 4h 33m 41s of budget remaining.
  4. r41h 33mSaved, never runFinal140 lines · +14 −4
    from lib import *
    
    MIX = 60
    
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Grass:
    		grassland()
    	elif c != Entities.Tree:
    		soil()
    	if get_entity_type() != c:
    		if get_entity_type() != None:
    			harvest()
    		plant(c)
    	if c != Entities.Grass:
    		water()
    
    def mixed_worker(k, D):
    	n = get_world_size()
    	start = get_time()
    	while get_time() - start < MIX:
    		for x in range(k, n, D):
    			goto(x, 0)
    			for y in range(n):
    				tend()
    				move(North)
    
    def pumpkin_worker(k, D, fert):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			harvest()
    			soil()
    			plant(Entities.Pumpkin)
    			water()
    			if fert:
    				fertilize()
    			move(North)
    	while True:
    		bad = 0
    		for x in range(k, n, D):
    			goto(x, 0)
    			for y in range(n):
    				e = get_entity_type()
    				if e != Entities.Pumpkin:
    					if e != Entities.Dead_Pumpkin and e != None:
    						harvest()
    					soil()
    					plant(Entities.Pumpkin)
    					water()
    					bad += 1
    				elif not can_harvest():
    					bad += 1
    				move(North)
    		if bad == 0:
    			return
    
    def pw_fert(k, D):
    	pumpkin_worker(k, D, True)
    
    def pw_plain(k, D):
    	pumpkin_worker(k, D, False)
    
    def pumpkin_phase(fert):
    	if fert:
    		par(pw_fert)
    	else:
    		par(pw_plain)
    	harvest()
    
    def cactus_plant(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			harvest()
    			soil()
    			plant(Entities.Cactus)
    			move(North)
    
    def cactus_rows(k, D):
    	n = get_world_size()
    	for y in range(k, n, D):
    		goto(0, y)
    		swapped = True
    		while swapped:
    			swapped = False
    			for x in range(n - 1):
    				if measure() > measure(East):
    					swap(East)
    					swapped = True
    				move(East)
    			move(East)
    
    def cactus_cols(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		swapped = True
    		while swapped:
    			swapped = False
    			for y in range(n - 1):
    				if measure() > measure(North):
    					swap(North)
    					swapped = True
    				move(North)
    			move(North)
    
    def cactus_wait(k, D):
    	n = get_world_size()
    	for x in range(k, n, D):
    		goto(x, 0)
    		for y in range(n):
    			if get_entity_type() != Entities.Cactus:
    				harvest()
    				soil()
    				plant(Entities.Cactus)
    			while not can_harvest():
    				pass
    			move(North)
    
    def cactus_phase():
    	par(cactus_plant)
    	par(cactus_wait)
    	par(cactus_rows)
    	par(cactus_cols)
    	goto(0, 0)
    	harvest()
    Changes from the previous revision
      				move(North)
      
    - def pumpkin_worker(k, D):
    + def pumpkin_worker(k, D, fert):
      	n = get_world_size()
      	for x in range(k, n, D):
      			plant(Entities.Pumpkin)
      			water()
    - 			fertilize()
    + 			if fert:
    + 				fertilize()
      			move(North)
      	while True:
      			return
      
    - def pumpkin_phase():
    - 	par(pumpkin_worker)
    + def pw_fert(k, D):
    + 	pumpkin_worker(k, D, True)
    + 
    + def pw_plain(k, D):
    + 	pumpkin_worker(k, D, False)
    + 
    + def pumpkin_phase(fert):
    + 	if fert:
    + 		par(pw_fert)
    + 	else:
    + 		par(pw_plain)
      	harvest()
      
    
    Write result the agent saw
    Saved phases (140 lines).
    Game time: 1h 33m 59s elapsed, 4h 26m 1s of budget remaining.
dino.py9 writes · 0 ran · first at 1h 06m
  1. r11h 06mSaved, never run30 lines
    from lib import *
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	change_hat(Hats.Dinosaur_Hat)
    	going = True
    	while going:
    		for d in ds:
    			if not move(d):
    				going = False
    				break
    	change_hat(Hats.Straw_Hat)
    Write result the agent saw
    Saved dino (30 lines).
    Game time: 1h 6m 31s elapsed, 4h 53m 29s of budget remaining.
  2. r21h 06mSaved, never run32 lines · +3 −1
    from lib import *
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	change_hat(Hats.Dinosaur_Hat)
    	going = True
    	c = 0
    	while going and c < n * n:
    		c += 1
    		for d in ds:
    			if not move(d):
    				going = False
    				break
    	change_hat(Hats.Straw_Hat)
    Changes from the previous revision
      	change_hat(Hats.Dinosaur_Hat)
      	going = True
    - 	while going:
    + 	c = 0
    + 	while going and c < n * n:
    + 		c += 1
      		for d in ds:
      			if not move(d):
    
    Write result the agent saw
    Saved dino (32 lines).
    Game time: 1h 6m 41s elapsed, 4h 53m 19s of budget remaining.
  3. r32h 20mSaved, never run89 lines · +64 −7
    from lib import *
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	N = n * n
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	idx = []
    	for i in range(N):
    		idx.append(0)
    	x = 0
    	y = 0
    	for i in range(N):
    		idx[x * n + y] = i
    		d = ds[i]
    		if d == North:
    			y += 1
    		elif d == South:
    			y -= 1
    		elif d == East:
    			x += 1
    		else:
    			x -= 1
    	change_hat(Hats.Dinosaur_Hat)
    	x = 0
    	y = 0
    	snake = [0]
    	r = measure()
    	ax = r[0]
    	ay = r[1]
    	ate = False
    	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    	while True:
    		h = idx[x * n + y]
    		da = (idx[ax * n + ay] - h) % N
    		span = (h - snake[0]) % N
    		best = None
    		bd = 0
    		bx = 0
    		by = 0
    		for nb in nbr:
    			nx = x + nb[1]
    			ny = y + nb[2]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			ni = idx[nx * n + ny]
    			d = (ni - h) % N
    			if d < 1 or d > da or span + d >= N:
    				continue
    			if d > bd:
    				bd = d
    				best = nb[0]
    				bx = nx
    				by = ny
    		if best == None:
    			break
    		if not move(best):
    			break
    		x = bx
    		y = by
    		snake.append(idx[x * n + y])
    		if ate:
    			ate = False
    		else:
    			snake.pop(0)
    		if x == ax and y == ay:
    			r = measure()
    			if r == None:
    				break
    			ax = r[0]
    			ay = r[1]
    			ate = True
    	change_hat(Hats.Straw_Hat)
    Changes from the previous revision
      def dino_phase():
      	n = get_world_size()
    + 	N = n * n
      	goto(0, 0)
      	ds = cycle_dirs(n)
    + 	idx = []
    + 	for i in range(N):
    + 		idx.append(0)
    + 	x = 0
    + 	y = 0
    + 	for i in range(N):
    + 		idx[x * n + y] = i
    + 		d = ds[i]
    + 		if d == North:
    + 			y += 1
    + 		elif d == South:
    + 			y -= 1
    + 		elif d == East:
    + 			x += 1
    + 		else:
    + 			x -= 1
      	change_hat(Hats.Dinosaur_Hat)
    - 	going = True
    - 	c = 0
    - 	while going and c < n * n:
    - 		c += 1
    - 		for d in ds:
    - 			if not move(d):
    - 				going = False
    + 	x = 0
    + 	y = 0
    + 	snake = [0]
    + 	r = measure()
    + 	ax = r[0]
    + 	ay = r[1]
    + 	ate = False
    + 	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    + 	while True:
    + 		h = idx[x * n + y]
    + 		da = (idx[ax * n + ay] - h) % N
    + 		span = (h - snake[0]) % N
    + 		best = None
    + 		bd = 0
    + 		bx = 0
    + 		by = 0
    + 		for nb in nbr:
    + 			nx = x + nb[1]
    + 			ny = y + nb[2]
    + 			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    + 				continue
    + 			ni = idx[nx * n + ny]
    + 			d = (ni - h) % N
    + 			if d < 1 or d > da or span + d >= N:
    + 				continue
    + 			if d > bd:
    + 				bd = d
    + 				best = nb[0]
    + 				bx = nx
    + 				by = ny
    + 		if best == None:
    + 			break
    + 		if not move(best):
    + 			break
    + 		x = bx
    + 		y = by
    + 		snake.append(idx[x * n + y])
    + 		if ate:
    + 			ate = False
    + 		else:
    + 			snake.pop(0)
    + 		if x == ax and y == ay:
    + 			r = measure()
    + 			if r == None:
      				break
    + 			ax = r[0]
    + 			ay = r[1]
    + 			ate = True
      	change_hat(Hats.Straw_Hat)
    
    Write result the agent saw
    Saved dino (89 lines).
    Game time: 2h 20m 58s elapsed, 3h 39m 2s of budget remaining.
  4. r42h 21mSaved, never run89 lines · +1 −1
    from lib import *
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	N = n * n
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	idx = []
    	for i in range(N):
    		idx.append(0)
    	x = 0
    	y = 0
    	for i in range(N):
    		idx[x * n + y] = i
    		d = ds[i]
    		if d == North:
    			y += 1
    		elif d == South:
    			y -= 1
    		elif d == East:
    			x += 1
    		else:
    			x -= 1
    	change_hat(Hats.Dinosaur_Hat)
    	x = 0
    	y = 0
    	snake = [0]
    	r = measure()
    	ax = r[0]
    	ay = r[1]
    	ate = True
    	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    	while True:
    		h = idx[x * n + y]
    		da = (idx[ax * n + ay] - h) % N
    		span = (h - snake[0]) % N
    		best = None
    		bd = 0
    		bx = 0
    		by = 0
    		for nb in nbr:
    			nx = x + nb[1]
    			ny = y + nb[2]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			ni = idx[nx * n + ny]
    			d = (ni - h) % N
    			if d < 1 or d > da or span + d >= N:
    				continue
    			if d > bd:
    				bd = d
    				best = nb[0]
    				bx = nx
    				by = ny
    		if best == None:
    			break
    		if not move(best):
    			break
    		x = bx
    		y = by
    		snake.append(idx[x * n + y])
    		if ate:
    			ate = False
    		else:
    			snake.pop(0)
    		if x == ax and y == ay:
    			r = measure()
    			if r == None:
    				break
    			ax = r[0]
    			ay = r[1]
    			ate = True
    	change_hat(Hats.Straw_Hat)
    Changes from the previous revision
      	ax = r[0]
      	ay = r[1]
    - 	ate = False
    + 	ate = True
      	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
      	while True:
    
    Write result the agent saw
    Saved dino (89 lines).
    Game time: 2h 21m 28s elapsed, 3h 38m 32s of budget remaining.
  5. r52h 23mSaved, never run92 lines · +3 −0
    from lib import *
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	N = n * n
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	idx = []
    	for i in range(N):
    		idx.append(0)
    	x = 0
    	y = 0
    	for i in range(N):
    		idx[x * n + y] = i
    		d = ds[i]
    		if d == North:
    			y += 1
    		elif d == South:
    			y -= 1
    		elif d == East:
    			x += 1
    		else:
    			x -= 1
    	change_hat(Hats.Dinosaur_Hat)
    	x = 0
    	y = 0
    	snake = [0]
    	r = measure()
    	ax = r[0]
    	ay = r[1]
    	ate = True
    	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    	while True:
    		h = idx[x * n + y]
    		da = (idx[ax * n + ay] - h) % N
    		span = (h - snake[0]) % N
    		best = None
    		bd = 0
    		bx = 0
    		by = 0
    		for nb in nbr:
    			nx = x + nb[1]
    			ny = y + nb[2]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			ni = idx[nx * n + ny]
    			d = (ni - h) % N
    			if d < 1 or d > da or span + d >= N:
    				continue
    			if d > bd:
    				bd = d
    				best = nb[0]
    				bx = nx
    				by = ny
    		if best == None:
    			print("none", x, y, ax, ay, len(snake), span, da)
    			break
    		if not move(best):
    			print("fail", x, y, best, ax, ay, len(snake), span, da)
    			break
    		x = bx
    		y = by
    		snake.append(idx[x * n + y])
    		if ate:
    			ate = False
    		else:
    			snake.pop(0)
    		if x == ax and y == ay:
    			r = measure()
    			if r == None:
    				print("nomeasure", len(snake))
    				break
    			ax = r[0]
    			ay = r[1]
    			ate = True
    	change_hat(Hats.Straw_Hat)
    Changes from the previous revision
      				by = ny
      		if best == None:
    + 			print("none", x, y, ax, ay, len(snake), span, da)
      			break
      		if not move(best):
    + 			print("fail", x, y, best, ax, ay, len(snake), span, da)
      			break
      		x = bx
      			r = measure()
      			if r == None:
    + 				print("nomeasure", len(snake))
      				break
      			ax = r[0]
    
    Write result the agent saw
    Saved dino (92 lines).
    Game time: 2h 23m 49s elapsed, 3h 36m 11s of budget remaining.
  6. r62h 27mSaved, never run92 lines · +5 −5
    from lib import *
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	N = n * n
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	idx = []
    	for i in range(N):
    		idx.append(0)
    	x = 0
    	y = 0
    	for i in range(N):
    		idx[x * n + y] = i
    		d = ds[i]
    		if d == North:
    			y += 1
    		elif d == South:
    			y -= 1
    		elif d == East:
    			x += 1
    		else:
    			x -= 1
    	change_hat(Hats.Dinosaur_Hat)
    	x = 0
    	y = 0
    	snake = [0]
    	r = measure()
    	ax = r[0]
    	ay = r[1]
    	ate = True
    	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    	while True:
    		h = idx[x * n + y]
    		da = (idx[ax * n + ay] - h) % N
    		lim = N - (h - snake[0]) % N
    		if ate:
    			lim -= 1
    		best = None
    		bd = 0
    		bx = 0
    		by = 0
    		for nb in nbr:
    			nx = x + nb[1]
    			ny = y + nb[2]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			ni = idx[nx * n + ny]
    			d = (ni - h) % N
    			if d < 1 or d > da or d > lim:
    				continue
    			if d > bd:
    				bd = d
    				best = nb[0]
    				bx = nx
    				by = ny
    		if best == None:
    			break
    		if not move(best):
    			break
    		x = bx
    		y = by
    		snake.append(idx[x * n + y])
    		if ate:
    			ate = False
    		else:
    			snake.pop(0)
    		if x == ax and y == ay:
    			r = measure()
    			if r == None:
    				break
    			ax = r[0]
    			ay = r[1]
    			ate = True
    	print("len", len(snake))
    	change_hat(Hats.Straw_Hat)
    Changes from the previous revision
      		h = idx[x * n + y]
      		da = (idx[ax * n + ay] - h) % N
    - 		span = (h - snake[0]) % N
    + 		lim = N - (h - snake[0]) % N
    + 		if ate:
    + 			lim -= 1
      		best = None
      		bd = 0
      			ni = idx[nx * n + ny]
      			d = (ni - h) % N
    - 			if d < 1 or d > da or span + d >= N:
    + 			if d < 1 or d > da or d > lim:
      				continue
      			if d > bd:
      				by = ny
      		if best == None:
    - 			print("none", x, y, ax, ay, len(snake), span, da)
      			break
      		if not move(best):
    - 			print("fail", x, y, best, ax, ay, len(snake), span, da)
      			break
      		x = bx
      			r = measure()
      			if r == None:
    - 				print("nomeasure", len(snake))
      				break
      			ax = r[0]
      			ay = r[1]
      			ate = True
    + 	print("len", len(snake))
      	change_hat(Hats.Straw_Hat)
    
    Write result the agent saw
    Saved dino (92 lines).
    Game time: 2h 27m 30s elapsed, 3h 32m 30s of budget remaining.
  7. r72h 35mSaved, never run98 lines · +8 −2
    from lib import *
    
    SHORT = 40
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	N = n * n
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	idx = []
    	for i in range(N):
    		idx.append(0)
    	x = 0
    	y = 0
    	for i in range(N):
    		idx[x * n + y] = i
    		d = ds[i]
    		if d == North:
    			y += 1
    		elif d == South:
    			y -= 1
    		elif d == East:
    			x += 1
    		else:
    			x -= 1
    	change_hat(Hats.Dinosaur_Hat)
    	x = 0
    	y = 0
    	snake = [0]
    	r = measure()
    	ax = r[0]
    	ay = r[1]
    	ate = True
    	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    	while len(snake) < SHORT:
    		h = idx[x * n + y]
    		da = (idx[ax * n + ay] - h) % N
    		lim = N - (h - snake[0]) % N
    		if ate:
    			lim -= 1
    		best = None
    		bd = 0
    		bx = 0
    		by = 0
    		for nb in nbr:
    			nx = x + nb[1]
    			ny = y + nb[2]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			ni = idx[nx * n + ny]
    			d = (ni - h) % N
    			if d < 1 or d > da or d > lim:
    				continue
    			if d > bd:
    				bd = d
    				best = nb[0]
    				bx = nx
    				by = ny
    		if best == None:
    			break
    		if not move(best):
    			break
    		x = bx
    		y = by
    		snake.append(idx[x * n + y])
    		if ate:
    			ate = False
    		else:
    			snake.pop(0)
    		if x == ax and y == ay:
    			r = measure()
    			if r == None:
    				break
    			ax = r[0]
    			ay = r[1]
    			ate = True
    	i = idx[x * n + y]
    	while move(ds[i]):
    		i += 1
    		if i >= N:
    			i = 0
    	change_hat(Hats.Straw_Hat)
    Changes from the previous revision
      from lib import *
      
    + SHORT = 40
    + 
      def cycle_dirs(n):
      	ds = []
      	ate = True
      	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    - 	while True:
    + 	while len(snake) < SHORT:
      		h = idx[x * n + y]
      		da = (idx[ax * n + ay] - h) % N
      			ay = r[1]
      			ate = True
    - 	print("len", len(snake))
    + 	i = idx[x * n + y]
    + 	while move(ds[i]):
    + 		i += 1
    + 		if i >= N:
    + 			i = 0
      	change_hat(Hats.Straw_Hat)
    
    Write result the agent saw
    Saved dino (98 lines).
    Game time: 2h 35m 21s elapsed, 3h 24m 39s of budget remaining.
  8. r83h 12mSaved, never run98 lines · +1 −1
    from lib import *
    
    SHORT = 70
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	N = n * n
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	idx = []
    	for i in range(N):
    		idx.append(0)
    	x = 0
    	y = 0
    	for i in range(N):
    		idx[x * n + y] = i
    		d = ds[i]
    		if d == North:
    			y += 1
    		elif d == South:
    			y -= 1
    		elif d == East:
    			x += 1
    		else:
    			x -= 1
    	change_hat(Hats.Dinosaur_Hat)
    	x = 0
    	y = 0
    	snake = [0]
    	r = measure()
    	ax = r[0]
    	ay = r[1]
    	ate = True
    	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    	while len(snake) < SHORT:
    		h = idx[x * n + y]
    		da = (idx[ax * n + ay] - h) % N
    		lim = N - (h - snake[0]) % N
    		if ate:
    			lim -= 1
    		best = None
    		bd = 0
    		bx = 0
    		by = 0
    		for nb in nbr:
    			nx = x + nb[1]
    			ny = y + nb[2]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			ni = idx[nx * n + ny]
    			d = (ni - h) % N
    			if d < 1 or d > da or d > lim:
    				continue
    			if d > bd:
    				bd = d
    				best = nb[0]
    				bx = nx
    				by = ny
    		if best == None:
    			break
    		if not move(best):
    			break
    		x = bx
    		y = by
    		snake.append(idx[x * n + y])
    		if ate:
    			ate = False
    		else:
    			snake.pop(0)
    		if x == ax and y == ay:
    			r = measure()
    			if r == None:
    				break
    			ax = r[0]
    			ay = r[1]
    			ate = True
    	i = idx[x * n + y]
    	while move(ds[i]):
    		i += 1
    		if i >= N:
    			i = 0
    	change_hat(Hats.Straw_Hat)
    Changes from the previous revision
      from lib import *
      
    - SHORT = 40
    + SHORT = 70
      
      def cycle_dirs(n):
    
    Write result the agent saw
    Saved dino (98 lines).
    Game time: 3h 12m 15s elapsed, 2h 47m 45s of budget remaining.
  9. r95h 14mSaved, never runFinal106 lines · +10 −2
    from lib import *
    
    SHORT = 50
    CAP = 180
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	t0 = get_time()
    	n = get_world_size()
    	N = n * n
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	idx = []
    	for i in range(N):
    		idx.append(0)
    	x = 0
    	y = 0
    	for i in range(N):
    		idx[x * n + y] = i
    		d = ds[i]
    		if d == North:
    			y += 1
    		elif d == South:
    			y -= 1
    		elif d == East:
    			x += 1
    		else:
    			x -= 1
    	change_hat(Hats.Dinosaur_Hat)
    	x = 0
    	y = 0
    	snake = [0]
    	r = measure()
    	ax = r[0]
    	ay = r[1]
    	ate = True
    	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    	while len(snake) < SHORT and get_time() - t0 < CAP:
    		h = idx[x * n + y]
    		da = (idx[ax * n + ay] - h) % N
    		lim = N - (h - snake[0]) % N
    		if ate:
    			lim -= 1
    		best = None
    		bd = 0
    		bx = 0
    		by = 0
    		for nb in nbr:
    			nx = x + nb[1]
    			ny = y + nb[2]
    			if nx < 0 or ny < 0 or nx >= n or ny >= n:
    				continue
    			ni = idx[nx * n + ny]
    			d = (ni - h) % N
    			if d < 1 or d > da or d > lim:
    				continue
    			if d > bd:
    				bd = d
    				best = nb[0]
    				bx = nx
    				by = ny
    		if best == None:
    			break
    		if not move(best):
    			break
    		x = bx
    		y = by
    		snake.append(idx[x * n + y])
    		if ate:
    			ate = False
    		else:
    			snake.pop(0)
    		if x == ax and y == ay:
    			r = measure()
    			if r == None:
    				break
    			ax = r[0]
    			ay = r[1]
    			ate = True
    	i = idx[x * n + y]
    	c = 0
    	while move(ds[i]):
    		i += 1
    		if i >= N:
    			i = 0
    		c += 1
    		if c >= 100:
    			c = 0
    			if get_time() - t0 > CAP:
    				break
    	change_hat(Hats.Straw_Hat)
    Changes from the previous revision
      from lib import *
      
    - SHORT = 70
    + SHORT = 50
    + CAP = 180
      
      def cycle_dirs(n):
      
      def dino_phase():
    + 	t0 = get_time()
      	n = get_world_size()
      	N = n * n
      	ate = True
      	nbr = [[North, 0, 1], [South, 0, -1], [East, 1, 0], [West, -1, 0]]
    - 	while len(snake) < SHORT:
    + 	while len(snake) < SHORT and get_time() - t0 < CAP:
      		h = idx[x * n + y]
      		da = (idx[ax * n + ay] - h) % N
      			ate = True
      	i = idx[x * n + y]
    + 	c = 0
      	while move(ds[i]):
      		i += 1
      		if i >= N:
      			i = 0
    + 		c += 1
    + 		if c >= 100:
    + 			c = 0
    + 			if get_time() - t0 > CAP:
    + 				break
      	change_hat(Hats.Straw_Hat)
    
    Write result the agent saw
    Saved dino (106 lines).
    Game time: 5h 15m 5s elapsed, 44m 55s of budget remaining.
dtest.py4 writes · 3 ran · first at 1h 06m
  1. r11h 06mRan4 lines · ran 1m 01s
    from lib import *
    import dino
    clear()
    dino.dino_phase()
    Write result the agent saw
    Saved dtest (4 lines).
    Game time: 1h 6m 51s elapsed, 4h 53m 9s of budget remaining.
    run_program at 1h 07m for 300s (agent saw)
    Ran dtest for 1m 1s of game time; it finished.
    Inventory change: bone +3969, cactus -126, fertilizer +24, water +49.
    Game time: 1h 8m 12s elapsed, 4h 51m 48s of budget remaining.
    Output:
    (none)
  2. r22h 20mRan8 lines · +4 −0 · ran 1m 41s
    from lib import *
    import dino
    change_hat(Hats.Straw_Hat)
    clear()
    t = get_time()
    b = num_items(Items.Bone)
    dino.dino_phase()
    print(get_time() - t, num_items(Items.Bone) - b)
    Changes from the previous revision
      from lib import *
      import dino
    + change_hat(Hats.Straw_Hat)
      clear()
    + t = get_time()
    + b = num_items(Items.Bone)
      dino.dino_phase()
    + print(get_time() - t, num_items(Items.Bone) - b)
    
    Write result the agent saw
    Saved dtest (8 lines).
    Game time: 2h 21m 8s elapsed, 3h 38m 52s of budget remaining.
    run_program at 2h 21m for 300s (agent saw)
    Ran dtest for 1m 41s of game time; it finished.
    Inventory change: bone +6130, cactus -216, fertilizer +81, water +161.
    Game time: 2h 23m 19s elapsed, 3h 36m 41s of budget remaining.
    Output:
    99.54 5618
  3. r32h 23mSaved, never run8 lines · +1 −1
    from lib import *
    import dino
    change_hat(Hats.Straw_Hat)
    clear()
    t = get_time()
    b = num_items(Items.Bone)
    dino.dino_phase()
    print(get_time() - t, num_items(Items.Bone) - b, dino.dbg)
    Changes from the previous revision
      b = num_items(Items.Bone)
      dino.dino_phase()
    - print(get_time() - t, num_items(Items.Bone) - b)
    + print(get_time() - t, num_items(Items.Bone) - b, dino.dbg)
    
    Write result the agent saw
    Saved dtest (8 lines).
    Game time: 2h 23m 29s elapsed, 3h 36m 31s of budget remaining.
  4. r42h 23mRanFinal8 lines · +1 −1 · ran 12m 59s
    from lib import *
    import dino
    change_hat(Hats.Straw_Hat)
    clear()
    t = get_time()
    b = num_items(Items.Bone)
    dino.dino_phase()
    print(get_time() - t, num_items(Items.Bone) - b)
    Changes from the previous revision
      b = num_items(Items.Bone)
      dino.dino_phase()
    - print(get_time() - t, num_items(Items.Bone) - b, dino.dbg)
    + print(get_time() - t, num_items(Items.Bone) - b)
    
    Write result the agent saw
    Saved dtest (8 lines).
    Game time: 2h 23m 39s elapsed, 3h 36m 21s of budget remaining.
    run_program at 2h 23m for 300s (agent saw)
    Ran dtest for 3m 21s of game time; it finished.
    Inventory change: bone +13122, cactus -328, fertilizer +160, water +321.
    Game time: 2h 27m 20s elapsed, 3h 32m 40s of budget remaining.
    Output:
    none 11 2 10 1 82 143 124
    199.69 13122
    run_program at 2h 27m for 400s (agent saw)
    Ran dtest for 6m 40s of game time; it is still running.
    Inventory change: cactus -532, fertilizer +320, water +640.
    Game time: 2h 34m 20s elapsed, 3h 25m 40s of budget remaining.
    Output:
    (none)
    run_program at 2h 35m for 400s (agent saw)
    Ran dtest for 2m 8s of game time; it finished.
    Inventory change: bone +40898, cactus -572, fertilizer +102, water +205.
    Game time: 2h 37m 39s elapsed, 3h 22m 21s of budget remaining.
    Output:
    126.77 40898
qtest.py2 writes · 2 ran · first at 2h 02m
  1. r12h 02mRan14 lines · ran 2s
    from lib import *
    clear()
    change_hat(Hats.Straw_Hat)
    def q(k, D):
    	n = get_world_size()
    	h = n // 2
    	qx = (k % 2) * h
    	qy = (k // 2) * h
    	goto(qx + h // 2, qy + h // 2)
    	harvest()
    	plant(Entities.Bush)
    	use_item(Items.Weird_Substance, h * 2)
    	print(k, measure())
    par(q)
    Write result the agent saw
    Saved qtest (14 lines).
    Game time: 2h 2m 20s elapsed, 3h 57m 40s of budget remaining.
    run_program at 2h 02m for 30s (agent saw)
    Ran qtest for 2s of game time; it finished.
    Inventory change: fertilizer +2, hay +64, water +3, weird_substance -48.
    Game time: 2h 2m 32s elapsed, 3h 57m 28s of budget remaining.
    Output:
    1 (6,5)
    2 (3,7)
    3 (11,9)
    0 (4,4)
  2. r22h 03mRanFinal13 lines · +11 −12 · ran 5s
    from lib import *
    clear()
    goto(3, 3)
    plant(Entities.Bush)
    use_item(Items.Weird_Substance, 12)
    print(measure())
    goto(9, 9)
    print(get_entity_type())
    plant(Entities.Bush)
    use_item(Items.Weird_Substance, 12)
    print(measure())
    goto(3, 3)
    print(get_entity_type(), measure())
    Changes from the previous revision
      from lib import *
      clear()
    - change_hat(Hats.Straw_Hat)
    - def q(k, D):
    - 	n = get_world_size()
    - 	h = n // 2
    - 	qx = (k % 2) * h
    - 	qy = (k // 2) * h
    - 	goto(qx + h // 2, qy + h // 2)
    - 	harvest()
    - 	plant(Entities.Bush)
    - 	use_item(Items.Weird_Substance, h * 2)
    - 	print(k, measure())
    - par(q)
    + goto(3, 3)
    + plant(Entities.Bush)
    + use_item(Items.Weird_Substance, 12)
    + print(measure())
    + goto(9, 9)
    + print(get_entity_type())
    + plant(Entities.Bush)
    + use_item(Items.Weird_Substance, 12)
    + print(measure())
    + goto(3, 3)
    + print(get_entity_type(), measure())
    
    Write result the agent saw
    Saved qtest (13 lines).
    Game time: 2h 4m 1s elapsed, 3h 55m 59s of budget remaining.
    run_program at 2h 04m for 30s (agent saw)
    Ran qtest for 5s of game time; it finished.
    Inventory change: fertilizer +3, water +7, weird_substance -12.
    Game time: 2h 4m 16s elapsed, 3h 55m 44s of budget remaining.
    Output:
    (0,3)
    Entities.Hedge
    (0,3)
    Entities.Hedge (0,3)
poly.py4 writes · 0 ran · first at 2h 43m
  1. r12h 43mSaved, never run59 lines
    from lib import *
    
    MIX = 60
    W = 4
    
    def default_crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def put(c):
    	if c == Entities.Carrot or c == Entities.Sunflower:
    		soil()
    	elif c == Entities.Grass:
    		grassland()
    	plant(c)
    
    def poly_worker(k, D):
    	if k >= W:
    		return
    	n = get_world_size()
    	bw = n // W
    	x0 = k * bw
    	x1 = x0 + bw
    	if k == W - 1:
    		x1 = n
    	req = []
    	for i in range(n * n):
    		req.append(None)
    	start = get_time()
    	while get_time() - start < MIX:
    		for x in range(x0, x1):
    			goto(x, 0)
    			for y in range(n):
    				e = get_entity_type()
    				want = req[x * n + y]
    				if want == None:
    					want = default_crop(x, y)
    				if can_harvest():
    					harvest()
    					e = None
    				if e != want:
    					if e != None:
    						harvest()
    					put(want)
    					req[x * n + y] = None
    					comp = get_companion()
    					if comp != None:
    						t, pos = comp
    						cx, cy = pos
    						if cx >= x0 and cx < x1:
    							req[cx * n + cy] = t
    				if want != Entities.Grass:
    					water()
    				move(North)
    Write result the agent saw
    Saved poly (59 lines).
    Game time: 2h 43m 29s elapsed, 3h 16m 31s of budget remaining.
  2. r22h 55mSaved, never run61 lines · +11 −9
    from lib import *
    
    MIX = 60
    RX = 4
    RY = 2
    
    def default_crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def put(c):
    	if c == Entities.Carrot or c == Entities.Sunflower:
    		soil()
    	elif c == Entities.Grass:
    		grassland()
    	plant(c)
    
    def poly_worker(k, D):
    	if k >= RX * RY:
    		return
    	n = get_world_size()
    	bw = n // RX
    	bh = n // RY
    	x0 = (k % RX) * bw
    	y0 = (k // RX) * bh
    	x1 = x0 + bw
    	y1 = y0 + bh
    	req = []
    	for i in range(n * n):
    		req.append(None)
    	start = get_time()
    	while get_time() - start < MIX:
    		for x in range(x0, x1):
    			goto(x, y0)
    			for y in range(y0, y1):
    				e = get_entity_type()
    				want = req[x * n + y]
    				if want == None:
    					want = default_crop(x, y)
    				if can_harvest():
    					harvest()
    					e = None
    				if e != want:
    					if e != None:
    						harvest()
    					put(want)
    					req[x * n + y] = None
    					comp = get_companion()
    					if comp != None:
    						t, pos = comp
    						cx, cy = pos
    						if cx >= x0 and cx < x1 and cy >= y0 and cy < y1:
    							req[cx * n + cy] = t
    				if want != Entities.Grass:
    					water()
    				move(North)
    Changes from the previous revision
      
      MIX = 60
    - W = 4
    + RX = 4
    + RY = 2
      
      def default_crop(x, y):
      
      def poly_worker(k, D):
    - 	if k >= W:
    + 	if k >= RX * RY:
      		return
      	n = get_world_size()
    - 	bw = n // W
    - 	x0 = k * bw
    + 	bw = n // RX
    + 	bh = n // RY
    + 	x0 = (k % RX) * bw
    + 	y0 = (k // RX) * bh
      	x1 = x0 + bw
    - 	if k == W - 1:
    - 		x1 = n
    + 	y1 = y0 + bh
      	req = []
      	for i in range(n * n):
      	while get_time() - start < MIX:
      		for x in range(x0, x1):
    - 			goto(x, 0)
    - 			for y in range(n):
    + 			goto(x, y0)
    + 			for y in range(y0, y1):
      				e = get_entity_type()
      				want = req[x * n + y]
      						t, pos = comp
      						cx, cy = pos
    - 						if cx >= x0 and cx < x1:
    + 						if cx >= x0 and cx < x1 and cy >= y0 and cy < y1:
      							req[cx * n + cy] = t
      				if want != Entities.Grass:
    
    Write result the agent saw
    Saved poly (61 lines).
    Game time: 2h 56m 5s elapsed, 3h 3m 55s of budget remaining.
  3. r33h 12mSaved, never run61 lines · +1 −1
    from lib import *
    
    MIX = 60
    RX = 4
    RY = 4
    
    def default_crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def put(c):
    	if c == Entities.Carrot or c == Entities.Sunflower:
    		soil()
    	elif c == Entities.Grass:
    		grassland()
    	plant(c)
    
    def poly_worker(k, D):
    	if k >= RX * RY:
    		return
    	n = get_world_size()
    	bw = n // RX
    	bh = n // RY
    	x0 = (k % RX) * bw
    	y0 = (k // RX) * bh
    	x1 = x0 + bw
    	y1 = y0 + bh
    	req = []
    	for i in range(n * n):
    		req.append(None)
    	start = get_time()
    	while get_time() - start < MIX:
    		for x in range(x0, x1):
    			goto(x, y0)
    			for y in range(y0, y1):
    				e = get_entity_type()
    				want = req[x * n + y]
    				if want == None:
    					want = default_crop(x, y)
    				if can_harvest():
    					harvest()
    					e = None
    				if e != want:
    					if e != None:
    						harvest()
    					put(want)
    					req[x * n + y] = None
    					comp = get_companion()
    					if comp != None:
    						t, pos = comp
    						cx, cy = pos
    						if cx >= x0 and cx < x1 and cy >= y0 and cy < y1:
    							req[cx * n + cy] = t
    				if want != Entities.Grass:
    					water()
    				move(North)
    Changes from the previous revision
      MIX = 60
      RX = 4
    - RY = 2
    + RY = 4
      
      def default_crop(x, y):
    
    Write result the agent saw
    Saved poly (61 lines).
    Game time: 3h 12m 25s elapsed, 2h 47m 35s of budget remaining.
  4. r43h 28mSaved, never runFinal59 lines · +4 −6
    from lib import *
    
    MIX = 60
    RX = 4
    RY = 4
    
    def default_crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 4 == 0:
    		return Entities.Grass
    	if x % 4 == 2:
    		return Entities.Sunflower
    	return Entities.Carrot
    
    def put(c):
    	if c == Entities.Carrot or c == Entities.Sunflower:
    		soil()
    	elif c == Entities.Grass:
    		grassland()
    	plant(c)
    
    def poly_worker(k, D):
    	if k >= RX * RY:
    		return
    	n = get_world_size()
    	x0 = (k % RX) * n // RX
    	x1 = (k % RX + 1) * n // RX
    	y0 = (k // RX) * n // RY
    	y1 = (k // RX + 1) * n // RY
    	req = []
    	for i in range(n * n):
    		req.append(None)
    	start = get_time()
    	while get_time() - start < MIX:
    		for x in range(x0, x1):
    			goto(x, y0)
    			for y in range(y0, y1):
    				e = get_entity_type()
    				want = req[x * n + y]
    				if want == None:
    					want = default_crop(x, y)
    				if can_harvest():
    					harvest()
    					e = None
    				if e != want:
    					if e != None:
    						harvest()
    					put(want)
    					req[x * n + y] = None
    					comp = get_companion()
    					if comp != None:
    						t, pos = comp
    						cx, cy = pos
    						if cx >= x0 and cx < x1 and cy >= y0 and cy < y1:
    							req[cx * n + cy] = t
    				if want != Entities.Grass:
    					water()
    				move(North)
    Changes from the previous revision
      		return
      	n = get_world_size()
    - 	bw = n // RX
    - 	bh = n // RY
    - 	x0 = (k % RX) * bw
    - 	y0 = (k // RX) * bh
    - 	x1 = x0 + bw
    - 	y1 = y0 + bh
    + 	x0 = (k % RX) * n // RX
    + 	x1 = (k % RX + 1) * n // RX
    + 	y0 = (k // RX) * n // RY
    + 	y1 = (k // RX + 1) * n // RY
      	req = []
      	for i in range(n * n):
    
    Write result the agent saw
    Saved poly (59 lines).
    Game time: 3h 28m 15s elapsed, 2h 31m 45s of budget remaining.
ptest.py1 write · 1 ran · first at 2h 43m
  1. r12h 43mRanFinal4 lines · ran 1m 06s
    from lib import *
    import poly
    change_hat(Hats.Straw_Hat)
    par(poly.poly_worker)
    Write result the agent saw
    Saved ptest (4 lines).
    Game time: 2h 43m 39s elapsed, 3h 16m 21s of budget remaining.
    run_program at 2h 43m for 90s (agent saw)
    Ran ptest for 1m 6s of game time; it finished.
    Inventory change: carrot +268577, fertilizer +54, hay +93248, power +2.37, water -407, wood +818448.
    Game time: 2h 45m 5s elapsed, 3h 14m 55s of budget remaining.
    Output:
    (none)
log32 said · 0 thought · 253 tool calls

Step by step

  1. 0sobserve
    result
    Game time: 10s elapsed, 5h 59m 50s of budget remaining.
    Program: none running.
    Inventory: empty.
    Farm 1x1. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks a drone.
    Entities: Gr=grass.
    y= 0  _Gr3*
    Recent output:
    (none)
  2. 10sdocs_list
    result
    docs/home.md  General Info
    unlocks/auto_unlock  Auto Unlock
    unlocks/cactus  Cactus
    unlocks/carrots  Carrots
    unlocks/costs  Costs
    unlocks/debug  Debug
    unlocks/debug_2  Debug_2
    unlocks/dictionaries  Dictionaries
    unlocks/dinosaurs  Dinosaurs
    unlocks/expand  Expand
    unlocks/fertilizer  Fertilizer
    unlocks/functions  Functions
    unlocks/grass  Grass
    unlocks/hats  Hats
    unlocks/import  Import
    unlocks/leaderb…
  3. 20sresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 0/6; cost pumpkin 5000; requires pumpkins
      ## Cactus Cactus! plant(Entities.Cactus)
    carrots (Carrots) level 0/10; cost wood 50; requires plant
      ## Carrots Till the soil and plant carrots. till() plant(Entities.Carrot)
    costs (Costs) le…
  4. 30swrite_program name="main" · evidence
    result
    Saved main (20 lines).
    Game time: 40s elapsed, 5h 59m 20s of budget remaining.
  5. 40srun_program name="main" seconds=60
    result
    Ran main for 10s of game time; it finished.
    Inventory change: hay +20.
    Game time: 1m elapsed, 5h 59m of budget remaining.
    Output:
    (none)
  6. 1m 00sbuy_upgrade upgrades=["loops"] · evidence
    result
    Bought loops, now level 1. Paid hay 5. Its tutorial is docs page docs/scripting/while.md.
    Game time: 1m 10s elapsed, 5h 58m 50s of budget remaining.
  7. 1m 10swrite_program name="main" · evidence
    result
    Saved main (2 lines).
    Game time: 1m 20s elapsed, 5h 58m 40s of budget remaining.
  8. 1m 20srun_program name="main" seconds=30
    result
    Ran main for 30s of game time; it is still running.
    Inventory change: hay +60.
    Game time: 2m elapsed, 5h 58m of budget remaining.
    Output:
    (none)
  9. 2m 00ssaidFarming hay with a loop; next buying speed, then expand and plant.
  10. 2m 00sbuy_upgrade upgrades=["speed","expand"] · evidence
    result
    Bought speed, now level 1. Paid hay 20. Its tutorial is docs page docs/unlocks/speed.md.
    Bought expand, now level 1. Paid hay 30. Its tutorial is docs page docs/unlocks/expand_1.md.
    Game time: 2m 10s elapsed, 5h 57m 50s of budget remaining.
  11. 2m 10sobserve
    result
    Game time: 2m 20s elapsed, 5h 57m 40s of budget remaining.
    Program: main (running).
    Inventory: hay 45.
    Farm 1x3. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks a drone.
    Entities: Gr=grass.
    y= 2  _Gr3
    y= 1  _Gr3
    y= 0  _Gr2*
    Recent output:
    (none)
  12. 2m 20swrite_program name="main" · evidence
    result
    Stop the program before editing it.
  13. 2m 30srun_program name="main" seconds=40
    result
    Ran main for 40s of game time; it is still running.
    Inventory change: no change.
    Game time: 3m 20s elapsed, 5h 56m 40s of budget remaining.
    Output:
    (none)
  14. 3m 20sstop_program
    result
    Program stopped.
    Game time: 3m 30s elapsed, 5h 56m 30s of budget remaining.
  15. 3m 30swrite_program name="main" · evidence
    result
    Saved main (3 lines).
    Game time: 3m 40s elapsed, 5h 56m 20s of budget remaining.
  16. 3m 40srun_program name="main" seconds=60
    result
    Ran main for 1m of game time; it is still running.
    Inventory change: hay +90.
    Game time: 4m 50s elapsed, 5h 55m 10s of budget remaining.
    Output:
    (none)
  17. 4m 50sbuy_upgrade upgrades=["plant","speed"] · evidence
    result
    Bought plant, now level 1. Paid hay 50. Its tutorial is docs page docs/unlocks/plant.md.
    Could not buy speed: Not enough resources.
    Game time: 5m elapsed, 5h 55m of budget remaining.
  18. 5m 00sdocs_read path="unlocks/plant"
    result
    ## Plant
    Unlocks planting.
    
    plant(Entities.Bush)
    
    [Tutorial](docs/unlocks/plant.md)
    Game time: 5m 10s elapsed, 5h 54m 50s of budget remaining.
  19. 5m 10ssaidSetting up bushes for wood alongside grass.
  20. 5m 10sdocs_read path="docs/unlocks/plant.md"
    result
    # Plant
    Grass is nice because it grows automatically. All other plants have to be planted with the `plant()` function. The only plant you can plant right now is a bush.
    You can pass the type of plant you want to plant to the function like this:
    
    `plant(Entities.Bush)`
    
    This will plant a bush under the drone.
    
    Call `clear()` to reset the farm to all grass and reset the drone position.
    
    It seems tha…
  21. 5m 20sstop_program
    result
    Program stopped.
    Game time: 5m 30s elapsed, 5h 54m 30s of budget remaining.
  22. 5m 30swrite_program name="main" · evidence
    result
    Saved main (12 lines).
    Game time: 5m 40s elapsed, 5h 54m 20s of budget remaining.
  23. 5m 40srun_program name="main" seconds=60
    result
    Ran main for 1m of game time; it is still running.
    Inventory change: hay +71, wood +27.
    Game time: 6m 50s elapsed, 5h 53m 10s of budget remaining.
    Output:
    (none)
  24. 6m 50swait seconds=60
    result
    Waited 1m (time up). Program: main running.
    Inventory change: hay +73, wood +35.
    Game time: 8m elapsed, 5h 52m of budget remaining.
  25. 8m 00sbuy_upgrade upgrades=["carrots","speed","expand"] · evidence
    result
    Bought carrots, now level 1. Paid wood 50. Its tutorial is docs page docs/unlocks/carrots.md.
    Bought speed, now level 2. Paid wood 20. Its tutorial is docs page docs/unlocks/speed.md.
    Could not buy expand: Not enough resources.
    Game time: 8m 10s elapsed, 5h 51m 50s of budget remaining.
  26. 8m 10sresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 0/6; cost pumpkin 5000; requires pumpkins
      ## Cactus Cactus! plant(Entities.Cactus)
    carrots (Carrots) level 1/10; cost wood 250; available, not affordable; tutorial docs/unlocks/carrots.md
      ## Carrots Increases the yield and cost of c…
  27. 8m 20swait seconds=60 until_resources={"wood":20}
    result
    Waited 7s (wood reached 20). Program: main running.
    Inventory change: hay +10, wood +4.
    Game time: 8m 37s elapsed, 5h 51m 23s of budget remaining.
  28. 8m 37ssaidExpanding to 3x3 and writing a full-grid farming loop.
  29. 8m 37sbuy_upgrade upgrades=["expand"] · evidence
    result
    Bought expand, now level 2. Paid wood 20. Its tutorial is docs page docs/unlocks/expand_1.md.
    Game time: 8m 47s elapsed, 5h 51m 13s of budget remaining.
  30. 8m 47sdocs_read path="docs/unlocks/carrots.md"
    result
    # Carrots
    Before you can plant carrots with `plant(Entities.Carrot)`, you have to till the soil. This will change the ground to `Grounds.Soil`. To till the soil, simply call `till()`. Calling `till()` again will change it back to `Grounds.Grassland`.
    
    Planting carrots costs wood and hay. These items will be automatically removed when calling `plant(Entities.Carrot)`.
    
    You can see the cost of any p…
  31. 8m 57sstop_program
    result
    Program stopped.
    Game time: 9m 7s elapsed, 5h 50m 53s of budget remaining.
  32. 9m 07swrite_program name="main" · evidence
    result
    Saved main (47 lines).
    Game time: 9m 17s elapsed, 5h 50m 43s of budget remaining.
  33. 9m 17srun_program name="main" seconds=90
    result
    Ran main for 1m 30s of game time; it is still running.
    Inventory change: carrot +51, hay +74, wood +51.
    Game time: 10m 57s elapsed, 5h 49m 3s of budget remaining.
    Output:
    (none)
  34. 10m 57sbuy_upgrade upgrades=["speed","operators","variables"] · evidence
    result
    Bought speed, now level 3. Paid wood 50, carrot 50. Its tutorial is docs page docs/unlocks/speed.md.
    Bought operators, now level 1. Paid hay 150, wood 10. Its tutorial is docs page docs/scripting/operators.md.
    Could not buy variables: Not enough resources.
    Game time: 11m 7s elapsed, 5h 48m 53s of budget remaining.
  35. 11m 07swait seconds=120 until_resources={"carrot":75}
    result
    Waited 48s (carrot reached 76). Program: main running.
    Inventory change: carrot +55, hay +92, wood +22.
    Game time: 12m 5s elapsed, 5h 47m 55s of budget remaining.
  36. 12m 05sbuy_upgrade upgrades=["variables","functions","senses"] · evidence
    result
    Bought variables, now level 1. Paid carrot 35. Its tutorial is docs page docs/scripting/variables.md.
    Bought functions, now level 1. Paid carrot 40. Its tutorial is docs page docs/scripting/functions.md.
    Bought senses, now level 1. Paid hay 100. Its tutorial is docs page docs/unlocks/senses.md.
    Game time: 12m 15s elapsed, 5h 47m 45s of budget remaining.
  37. 12m 15ssaidUnlocked senses/variables/functions; now writing a general grid farmer.
  38. 12m 15sdocs_search query="range"
    result
    docs/home.md: …num_unlocked](functions/num_unlocked) [pet_the_piggy](functions/pet_the_piggy) [plant](functions/plant) [range](functions/range) [tap](functions/tap) [till](functions/till) ## Items [Hay](items/hay) [Wood](items/wood) [Carrot](items/carrot) ## Entities [Bush](objects/bus…
    docs/scripting/functions.md: …itions For example, you could define a function that moves the drone several times…
  39. 12m 25sstop_program
    result
    Program stopped.
    Game time: 12m 35s elapsed, 5h 47m 25s of budget remaining.
  40. 12m 35swrite_program name="main" · evidence
    result
    Saved main (30 lines).
    Game time: 12m 45s elapsed, 5h 47m 15s of budget remaining.
  41. 12m 45srun_program name="main" seconds=60
    result
    Ran main for 1m of game time; it is still running.
    Inventory change: carrot +51, hay +68, wood +39.
    Game time: 13m 55s elapsed, 5h 46m 5s of budget remaining.
    Output:
    (none)
  42. 13m 55sbuy_upgrade upgrades=["trees","expand"] · evidence
    result
    Bought trees, now level 1. Paid wood 50, carrot 70. Its tutorial is docs page docs/unlocks/trees.md.
    Bought expand, now level 3. Paid wood 30, carrot 20. Its tutorial is docs page docs/unlocks/expand_1.md.
    Game time: 14m 5s elapsed, 5h 45m 55s of budget remaining.
  43. 14m 05sstop_program
    result
    Program stopped.
    Game time: 14m 15s elapsed, 5h 45m 45s of budget remaining.
  44. 14m 15swrite_program name="main" · evidence
    result
    Saved main (29 lines).
    Game time: 14m 25s elapsed, 5h 45m 35s of budget remaining.
  45. 14m 25srun_program name="main" seconds=90
    result
    Ran main for 1m 30s of game time; it is still running.
    Inventory change: carrot +60, hay +86, wood +558.
    Game time: 16m 5s elapsed, 5h 43m 55s of budget remaining.
    Output:
    (none)
  46. 16m 05sbuy_upgrade upgrades=["watering","expand","speed"] · evidence
    result
    Bought watering, now level 1. Paid wood 50. Its tutorial is docs page docs/unlocks/watering.md.
    Bought expand, now level 4. Paid wood 100, carrot 50. Its tutorial is docs page docs/unlocks/expand_1.md.
    Could not buy speed: Not enough resources.
    Game time: 16m 15s elapsed, 5h 43m 45s of budget remaining.
  47. 16m 15sresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 0/6; cost pumpkin 5000; requires pumpkins
      ## Cactus Cactus! plant(Entities.Cactus)
    carrots (Carrots) level 1/10; cost wood 250; can buy now; tutorial docs/unlocks/carrots.md
      ## Carrots Increases the yield and cost of carrots. 100% =…
  48. 16m 25sbuy_upgrade upgrades=["carrots"] · evidence
    result
    Bought carrots, now level 2. Paid wood 250. Its tutorial is docs page docs/unlocks/carrots.md.
    Game time: 16m 35s elapsed, 5h 43m 25s of budget remaining.
  49. 16m 35sstop_program
    result
    Program stopped.
    Game time: 16m 45s elapsed, 5h 43m 15s of budget remaining.
  50. 16m 45swrite_program name="main" · evidence
    result
    Saved main (31 lines).
    Game time: 16m 55s elapsed, 5h 43m 5s of budget remaining.
  51. 16m 55srun_program name="main" seconds=120
    result
    Ran main for 2m of game time; it is still running.
    Inventory change: carrot +266, hay -75, water -5, wood +1002.
    Game time: 19m 5s elapsed, 5h 40m 55s of budget remaining.
    Output:
    (none)
  52. 19m 05sobserve
    result
    Game time: 19m 15s elapsed, 5h 40m 45s of budget remaining.
    Program: main (running).
    Inventory: hay 532, wood 1501, carrot 357.
    Farm 6x6. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks a drone.
    Entities: Gr=grass, Tr=tree, Ca=carrot.
    y= 5  _Gr3  _Tr3  #Ca1  _Tr3  #Ca3  _Tr3
    y= 4  _Tr3  #Ca2  _…
  53. 19m 15sbuy_upgrade upgrades=["pumpkins","watering"] · evidence
    result
    Bought pumpkins, now level 1. Paid wood 500, carrot 200. Its tutorial is docs page docs/unlocks/pumpkins.md.
    Bought watering, now level 2. Paid wood 200. Its tutorial is docs page docs/unlocks/watering.md.
    Game time: 19m 25s elapsed, 5h 40m 35s of budget remaining.
  54. 19m 25sdocs_read path="docs/unlocks/pumpkins.md"
    result
    # Pumpkins
    [Pumpkins](objects/pumpkin) grow like carrots on tilled soil. Planting them costs carrots.
    
    When all the pumpkins in a square are fully grown, they will grow together to form a giant pumpkin. Unfortunately, pumpkins have a 20% chance of dying once they are fully grown, so you will need to replant the dead ones if you want them to merge. 
    
    When a pumpkin dies, it leaves behind a dead pum…
  55. 19m 35sdocs_read path="objects/pumpkin"
    result
    ## Pumpkin
    Pumpkins grow together when they are next to other fully grown pumpkins. About 1 in 5 pumpkins dies when it grows up.
    
    Base growth time between 0.2 and 3.8 seconds.
    Can grow on soil.
    
    ### Plant Cost [Current cost: carrot=1]
    
    For more related information see: [Pumpkins](docs/unlocks/pumpkins.md)
    Game time: 19m 45s elapsed, 5h 40m 15s of budget remaining.
  56. 19m 45sstop_program
    result
    Program stopped.
    Game time: 19m 55s elapsed, 5h 40m 5s of budget remaining.
  57. 19m 55swrite_program name="main" · evidence
    result
    Saved main (67 lines).
    Game time: 20m 5s elapsed, 5h 39m 55s of budget remaining.
  58. 20m 05srun_program name="main" seconds=180
    result
    Ran main for 3m of game time; it is still running.
    Inventory change: carrot +218, hay -68, pumpkin +432, water -4, wood +682.
    Game time: 23m 15s elapsed, 5h 36m 45s of budget remaining.
    Output:
    (none)
  59. 23m 15ssaidPumpkin phases working (216 per harvest). Rebalancing toward hay and buying upgrades.
  60. 23m 15sbuy_upgrade upgrades=["grass","watering","speed"] · evidence
    result
    Bought grass, now level 2. Paid hay 300.
    Bought watering, now level 3. Paid wood 800. Its tutorial is docs page docs/unlocks/watering.md.
    Bought speed, now level 4. Paid carrot 500. Its tutorial is docs page docs/unlocks/speed.md.
    Game time: 23m 25s elapsed, 5h 36m 35s of budget remaining.
  61. 23m 25sstop_program
    result
    Program stopped.
    Game time: 23m 35s elapsed, 5h 36m 25s of budget remaining.
  62. 23m 35slist_programs
    result
    ## main
    def crop(x, y):
    	if (x + y) % 2 == 0:
    		return Entities.Tree
    	if x % 3 == 0:
    		return Entities.Grass
    	return Entities.Carrot
    
    def water():
    	if get_water() < 0.5 and num_items(Items.Water) > 0:
    		use_item(Items.Water)
    
    def tend():
    	c = crop(get_pos_x(), get_pos_y())
    	if can_harvest():
    		harvest()
    	if c == Entities.Carrot:
    		if get_ground_type() != Grounds.Soil:
    			till()
    	elif c == Entities…
  63. 23m 45swrite_program name="main" · evidence
    result
    Saved main (67 lines).
    Game time: 23m 55s elapsed, 5h 36m 5s of budget remaining.
  64. 23m 55srun_program name="main" seconds=240
    result
    Ran main for 4m of game time; it is still running.
    Inventory change: carrot +353, hay +292, pumpkin +648, water -11, wood +1934.
    Game time: 28m 5s elapsed, 5h 31m 55s of budget remaining.
    Output:
    (none)
  65. 28m 05sbuy_upgrade upgrades=["expand","fertilizer","watering"] · evidence
    result
    Bought expand, now level 5. Paid pumpkin 1000. Its tutorial is docs page docs/unlocks/expand_1.md.
    Bought fertilizer, now level 1. Paid wood 500. Its tutorial is docs page docs/unlocks/fertilizer.md.
    Could not buy watering: Not enough resources.
    Game time: 28m 15s elapsed, 5h 31m 45s of budget remaining.
  66. 28m 15srun_program name="main" seconds=240
    result
    Ran main for 4m of game time; it is still running.
    Inventory change: carrot -62, fertilizer +24, hay +122, water +65, wood +85.
    Game time: 32m 25s elapsed, 5h 27m 35s of budget remaining.
    Output:
    (none)
  67. 32m 25sobserve
    result
    Game time: 32m 35s elapsed, 5h 27m 25s of budget remaining.
    Program: main (running).
    Inventory: hay 600, wood 2821, carrot 396, pumpkin 296, water 69, fertilizer 26.
    Farm 8x8. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks a drone.
    Entities: Pu=pumpkin, Ca=carrot.
    y= 7  #Pu3  #Pu3  #Pu3  #Pu3 …
  68. 32m 35ssaidFixing a bug where leftover carrots blocked the pumpkin merge.
  69. 32m 35sstop_program
    result
    Program stopped.
    Game time: 32m 45s elapsed, 5h 27m 15s of budget remaining.
  70. 32m 45swrite_program name="main" · evidence
    result
    Saved main (70 lines).
    Game time: 32m 55s elapsed, 5h 27m 5s of budget remaining.
  71. 32m 55srun_program name="main" seconds=240
    result
    Ran main for 4m of game time; it is still running.
    Inventory change: carrot +361, fertilizer +24, hay +228, pumpkin +995, water -81, wood +1938.
    Game time: 37m 5s elapsed, 5h 22m 55s of budget remaining.
    Output:
    (none)
  72. 37m 05sbuy_upgrade upgrades=["lists","watering","trees","speed","debug"] · evidence
    result
    Bought lists, now level 1. Paid carrot 500. Its tutorial is docs page docs/scripting/lists.md.
    Bought watering, now level 4. Paid wood 3200. Its tutorial is docs page docs/unlocks/watering.md.
    Bought trees, now level 2. Paid hay 300. Its tutorial is docs page docs/unlocks/trees.md.
    Could not buy speed: Not enough resources.
    Bought debug, now level 1. Paid hay 50, wood 50. Its tutorial is docs page…
  73. 37m 15swait seconds=300
    result
    Waited 5m (time up). Program: main running.
    Inventory change: carrot +315, fertilizer +30, hay +236, pumpkin +1152, wood +4378.
    Game time: 42m 25s elapsed, 5h 17m 35s of budget remaining.
  74. 42m 25sresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 0/6; cost pumpkin 5000; available, not affordable
      ## Cactus Cactus! plant(Entities.Cactus)
    carrots (Carrots) level 2/10; cost wood 1250; can buy now; tutorial docs/unlocks/carrots.md
      ## Carrots Increases the yield and cost of carrot…
  75. 42m 35sbuy_upgrade upgrades=["carrots","grass","sunflowers","import","fertilizer"] · evidence
    result
    Bought carrots, now level 3. Paid wood 1250. Its tutorial is docs page docs/unlocks/carrots.md.
    Bought grass, now level 3. Paid wood 500.
    Bought sunflowers, now level 1. Paid carrot 500. Its tutorial is docs page docs/unlocks/sunflowers.md.
    Bought import, now level 1. Paid carrot 80. Its tutorial is docs page docs/scripting/import.md.
    Bought fertilizer, now level 2. Paid wood 1500. Its tutorial is…
  76. 42m 45sdocs_read path="docs/unlocks/sunflowers.md"
    result
    # Sunflowers
    [Sunflowers](objects/sunflower) collect the power of the sun. You can harvest that power. 
    
    Planting them works exactly like planting carrots or pumpkins. 
    
    Harvesting a grown sunflower yields power.
    If there are at least 10 sunflowers on the farm and you harvest the one with the largest number of petals you get `8` times more power!
    If you harvest a sunflower while there is another s…
  77. 42m 55sdocs_read path="docs/unlocks/fertilizer.md"
    result
    # Fertilizer
    At some point, waiting for the plants to grow is just not efficient enough anymore. 
    Similar to water, you will automatically receive 1 fertilizer every 10 seconds, doubling with each upgrade.
    
    Fertilizer can make plants grow instantly. `use_item(Items.Fertilizer)` reduces the remaining growing time of the plant under the drone by 2 seconds.
    
    This has some side effects.
    Plants grown w…
  78. 43m 05ssaidAdding sunflowers for power and using fertilizer on pumpkins (to grow faster and produce weird substance for mazes).
  79. 43m 05sstop_program
    result
    Program stopped.
    Game time: 43m 15s elapsed, 5h 16m 45s of budget remaining.
  80. 43m 15swrite_program name="main" · evidence
    result
    Saved main (74 lines).
    Game time: 43m 25s elapsed, 5h 16m 35s of budget remaining.
  81. 43m 25srun_program name="main" seconds=240
    result
    Ran main for 4m of game time; it is still running.
    Inventory change: carrot +837, fertilizer +48, hay +128, power +1.42, pumpkin +1152, water -16, wood +4306.
    Game time: 47m 35s elapsed, 5h 12m 25s of budget remaining.
    Output:
    (none)
  82. 47m 35sbuy_upgrade upgrades=["speed","pumpkins","timing"] · evidence
    result
    Bought speed, now level 5. Paid carrot 1000. Its tutorial is docs page docs/unlocks/speed.md.
    Could not buy pumpkins: Not enough resources.
    Bought timing, now level 1. Paid pumpkin 1000. Its tutorial is docs page docs/unlocks/timing.md.
    Game time: 47m 45s elapsed, 5h 12m 15s of budget remaining.
  83. 47m 45sstop_program
    result
    Program stopped.
    Game time: 47m 55s elapsed, 5h 12m 5s of budget remaining.
  84. 47m 55swrite_program name="main" · evidence
    result
    Saved main (79 lines).
    Game time: 48m 5s elapsed, 5h 11m 55s of budget remaining.
  85. 48m 05srun_program name="main" seconds=180
    result
    Ran main for 3m of game time; it is still running.
    Inventory change: carrot +1038, fertilizer -152, hay +88, power -1.20, pumpkin +1048, water -16, weird_substance +1166, wood +4757.
    Game time: 51m 15s elapsed, 5h 8m 45s of budget remaining.
    Output:
    (none)
  86. 51m 15sbuy_upgrade upgrades=["mazes","pumpkins"] · evidence
    result
    Bought mazes, now level 1. Paid weird_substance 1000. Its tutorial is docs page docs/unlocks/mazes.md.
    Bought pumpkins, now level 2. Paid carrot 1000. Its tutorial is docs page docs/unlocks/pumpkins.md.
    Game time: 51m 25s elapsed, 5h 8m 35s of budget remaining.
  87. 51m 25sdocs_read path="docs/unlocks/mazes.md"
    result
    # Mazes
    `Items.Weird_Substance`, which is obtained by [fertilizing](docs/unlocks/fertilizer.md) plants, has a strange effect on bushes. If the drone is over a bush and you call `use_item(Items.Weird_Substance, amount)` the bush will grow into a maze of hedges.
    The size of the maze depends on the amount of `Items.Weird_Substance` used (the second argument of the `use_item()` call).
    Without maze upg…
  88. 51m 35sstop_program
    result
    Program stopped.
    Game time: 51m 45s elapsed, 5h 8m 15s of budget remaining.
  89. 51m 45swrite_program name="maze" · evidence
    result
    Saved maze (19 lines).
    Game time: 51m 55s elapsed, 5h 8m 5s of budget remaining.
  90. 51m 55swrite_program name="mtest" · evidence
    result
    Saved mtest (3 lines).
    Game time: 52m 5s elapsed, 5h 7m 55s of budget remaining.
  91. 52m 05srun_program name="mtest" seconds=120
    result
    Ran mtest for 26s of game time; it finished.
    Inventory change: fertilizer +6, gold +320, power -4.25, water +21, weird_substance -40, wood +10.
    Game time: 52m 41s elapsed, 5h 7m 19s of budget remaining.
    Output:
    (none)
  92. 52m 41ssaidMazes work: 40 weird substance → 320 gold in ~20s. Integrating mazes into the main loop.
  93. 52m 41swrite_program name="main" · evidence
    result
    Saved main (81 lines).
    Game time: 52m 51s elapsed, 5h 7m 9s of budget remaining.
  94. 52m 51srun_program name="main" seconds=300
    result
    Ran main for 5m of game time; it is still running.
    Inventory change: carrot -80, gold +2816, hay +636, pumpkin +1260, water -2, weird_substance -84, wood +1408.
    Game time: 58m 1s elapsed, 5h 1m 59s of budget remaining.
    Output:
    (none)
  95. 58m 01sbuy_upgrade upgrades=["megafarm"] · evidence
    result
    Bought megafarm, now level 1. Paid gold 2000. Its tutorial is docs page docs/unlocks/megafarm.md.
    Game time: 58m 11s elapsed, 5h 1m 49s of budget remaining.
  96. 58m 11sdocs_read path="docs/unlocks/megafarm.md"
    result
    # Mega Farm
    This incredibly powerful unlock gives you access to multiple drones. 
    
    As before, you still start with just one drone. Additional drones must first be spawned and will disappear after the program terminates.
    Each drone runs its own separate program. New drones can be spawned using the `spawn_drone(function)` function.
    
    `def drone_function():
        move(North)
        do_a_flip()
    
    spawn_drone…
  97. 58m 21sresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 0/6; cost pumpkin 5000; can buy now
      ## Cactus Cactus! plant(Entities.Cactus)
    carrots (Carrots) level 3/10; cost wood 6250; can buy now; tutorial docs/unlocks/carrots.md
      ## Carrots Increases the yield and cost of carrots. 400% => 800…
  98. 58m 31sobserve
    result
    Game time: 58m 41s elapsed, 5h 1m 19s of budget remaining.
    Program: main (running).
    Inventory: hay 1794, wood 15978, carrot 410, pumpkin 5284, weird_substance 6, gold 1648, water 91, fertilizer 24.
    Farm 8x8. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks a drone.
    Entities: He=hedge, Tr=treasur…
  99. 58m 41sbuy_upgrade upgrades=["cactus","fertilizer","carrots","trees"] · evidence
    result
    Bought cactus, now level 1. Paid pumpkin 5000. Its tutorial is docs page docs/unlocks/cactus.md.
    Bought fertilizer, now level 3. Paid wood 9000. Its tutorial is docs page docs/unlocks/fertilizer.md.
    Bought carrots, now level 4. Paid wood 6250. Its tutorial is docs page docs/unlocks/carrots.md.
    Bought trees, now level 3. Paid hay 1200. Its tutorial is docs page docs/unlocks/trees.md.
    Game time: 58m…
  100. 58m 51sdocs_read path="docs/unlocks/cactus.md"
    result
    # Cactus
    Like other plants, [cacti](objects/cactus) can be grown on soil and harvested as usual.
    
    However, they come in various sizes and have a strange sense of order.
    
    If you harvest a fully-grown cactus and all neighboring cacti are in sorted order, it will also harvest all neighboring cacti recursively.
    
    A cactus is considered to be in sorted order if all neighboring cacti to the `North` and `…
  101. 59m 01ssaidBought cactus. Rewriting everything for multiple drones (column-split), plus a cactus sorting phase.
  102. 59m 01sdocs_read path="objects/cactus"
    result
    ## Cactus
    Cacti come in 10 different sizes. When harvested adjacent cacti that are "sorted" will also be harvested.
    
    Base growth time between 1 and 1 seconds.
    Can grow on soil.
    
    ### Plant Cost [Current cost: pumpkin=2]
    Game time: 59m 11s elapsed, 5h 49s of budget remaining.
  103. 59m 11swrite_program name="lib" · evidence
    result
    Saved lib (43 lines).
    Game time: 59m 21s elapsed, 5h 39s of budget remaining.
  104. 59m 21swrite_program name="phases" · evidence
    result
    Saved phases (122 lines).
    Game time: 59m 31s elapsed, 5h 29s of budget remaining.
  105. 59m 31swrite_program name="main" · evidence
    result
    Stop the program before editing it.
  106. 59m 41sstop_program
    result
    Program stopped.
    Game time: 59m 51s elapsed, 5h 9s of budget remaining.
  107. 59m 51swrite_program name="main" · evidence
    result
    Saved main (10 lines).
    Game time: 1h 1s elapsed, 4h 59m 59s of budget remaining.
  108. 1h 00mrun_program name="main" seconds=120
    result
    Ran main for 2m of game time; it is still running.
    Inventory change: carrot -156, fertilizer +30, hay +2300, pumpkin +10, water +6, weird_substance +10.
    Game time: 1h 2m 11s elapsed, 4h 57m 49s of budget remaining.
    Output:
    Warning: Cannot plant Entities.Pumpkin on Grounds.Grassland.
    In: pumpkin_phase <- par <- pumpkin_worker
    plant(Entities.Pumpkin)
         ^^                
    -------------------------…
  109. 1h 02mobserve
    result
    Game time: 1h 2m 21s elapsed, 4h 57m 39s of budget remaining.
    Program: main (running).
    Inventory: hay 3354, wood 3656, carrot 842, pumpkin 858, weird_substance 204, gold 1776, water 31, fertilizer 48.
    Farm 8x8. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks a drone.
    Entities: Gr=grass, Pu=pump…
  110. 1h 02mstop_program
    result
    Program stopped.
    Game time: 1h 2m 31s elapsed, 4h 57m 29s of budget remaining.
  111. 1h 02mwrite_program name="phases" · evidence
    result
    Saved phases (127 lines).
    Game time: 1h 2m 41s elapsed, 4h 57m 19s of budget remaining.
  112. 1h 02mrun_program name="main" seconds=180
    result
    Ran main for 3m of game time; it is still running.
    Inventory change: cactus +4096, carrot -146, fertilizer +8, gold +1600, hay +64, pumpkin +754, water +83, weird_substance +158.
    Game time: 1h 5m 51s elapsed, 4h 54m 9s of budget remaining.
    Output:
    (none)
  113. 1h 05msaidCactus phase works (4096 per harvest). Checking dinosaurs next.
  114. 1h 05mbuy_upgrade upgrades=["dinosaurs"] · evidence
    result
    Bought dinosaurs, now level 1. Paid cactus 2000. Its tutorial is docs page docs/unlocks/dinosaurs.md.
    Game time: 1h 6m 1s elapsed, 4h 53m 59s of budget remaining.
  115. 1h 06mdocs_read path="docs/unlocks/dinosaurs.md"
    result
    # Dinosaurs
    Dinosaurs are ancient, majestic creatures that can be farmed for ancient bones.
    
    Unfortunately dinosaurs have gone extinct a long time ago, so the best we can do now is dressing up as one.
    For this purpose you have received the new dinosaur hat.
    
    The hat can be equipped with
    `change_hat(Hats.Dinosaur_Hat)`
    
    Unfortunately it doesn't quite look like on the advertisement...
    
    If you equip …
  116. 1h 06mdocs_read path="objects/apple"
    result
    ## Apple
    Dinosaurs love them apparently.
    
    ### Plant Cost [Current cost: cactus=2]
    
    For more related information see: [Dinosaurs](docs/unlocks/dinosaurs.md)
    Game time: 1h 6m 21s elapsed, 4h 53m 39s of budget remaining.
  117. 1h 06mwrite_program name="dino" · evidence
    result
    Saved dino (30 lines).
    Game time: 1h 6m 31s elapsed, 4h 53m 29s of budget remaining.
  118. 1h 06mwrite_program name="dino" · evidence
    result
    Saved dino (32 lines).
    Game time: 1h 6m 41s elapsed, 4h 53m 19s of budget remaining.
  119. 1h 06mwrite_program name="dtest" · evidence
    result
    Saved dtest (4 lines).
    Game time: 1h 6m 51s elapsed, 4h 53m 9s of budget remaining.
  120. 1h 06mstop_program
    result
    Program stopped.
    Game time: 1h 7m 1s elapsed, 4h 52m 59s of budget remaining.
  121. 1h 07mrun_program name="dtest" seconds=300
    result
    Ran dtest for 1m 1s of game time; it finished.
    Inventory change: bone +3969, cactus -126, fertilizer +24, water +49.
    Game time: 1h 8m 12s elapsed, 4h 51m 48s of budget remaining.
    Output:
    (none)
  122. 1h 08msaidDinosaur snake gives ~4000 bones/minute. Adding to the main loop.
  123. 1h 08mwrite_program name="main" · evidence
    result
    Saved main (13 lines).
    Game time: 1h 8m 22s elapsed, 4h 51m 38s of budget remaining.
  124. 1h 08mrun_program name="main" seconds=300
    result
    Ran main for 5m of game time; it is still running.
    Inventory change: bone +3969, cactus +3970, carrot -150, fertilizer +56, gold +2432, pumpkin +304, water +167, weird_substance +24.
    Game time: 1h 13m 32s elapsed, 4h 46m 28s of budget remaining.
    Output:
    (none)
  125. 1h 13mwait seconds=300 until_affordable="megafarm"
    result
    Waited 1m 24s (megafarm is affordable). Program: main running.
    Inventory change: fertilizer +34, gold +1024, water +67, weird_substance -120.
    Game time: 1h 15m 6s elapsed, 4h 44m 54s of budget remaining.
  126. 1h 15mbuy_upgrade upgrades=["megafarm"] · evidence
    result
    Bought megafarm, now level 2. Paid gold 8000. Its tutorial is docs page docs/unlocks/megafarm.md.
    Game time: 1h 15m 16s elapsed, 4h 44m 44s of budget remaining.
  127. 1h 15mobserve
    result
    Game time: 1h 15m 26s elapsed, 4h 44m 34s of budget remaining.
    Program: main (running).
    Inventory: hay 3614, wood 3656, carrot 546, pumpkin 1916, cactus 5940, bone 7938, weird_substance 58, gold 432, water 523, fertilizer 234.
    Farm 8x8. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks a drone.
    E…
  128. 1h 15mstop_program
    result
    Program stopped.
    Game time: 1h 15m 36s elapsed, 4h 44m 24s of budget remaining.
  129. 1h 15mwrite_program name="main" · evidence
    result
    Saved main (20 lines).
    Game time: 1h 15m 46s elapsed, 4h 44m 14s of budget remaining.
  130. 1h 15mrun_program name="main" seconds=400
    result
    Ran main for 6m 40s of game time; it is still running.
    Inventory change: bone +7938, cactus +7940, carrot +451, fertilizer +39, gold +2880, hay +336, pumpkin +705, water +61, weird_substance +209, wood +2536.
    Game time: 1h 22m 36s elapsed, 4h 37m 24s of budget remaining.
    Output:
    14.22 25.02 53.26 161.25 12.37
  131. 1h 22msaidTiming shows mazes take 161s vs. mixed 12s. Writing a smarter maze solver (BFS with wall memory + treasure reuse) and making the mixed phase time-based.
  132. 1h 22mwrite_program name="maze" · evidence
    result
    Saved maze (82 lines).
    Game time: 1h 22m 46s elapsed, 4h 37m 14s of budget remaining.
  133. 1h 22mwrite_program name="mtest" · evidence
    result
    Saved mtest (6 lines).
    Game time: 1h 22m 56s elapsed, 4h 37m 4s of budget remaining.
  134. 1h 22mstop_program
    result
    Program stopped.
    Game time: 1h 23m 6s elapsed, 4h 36m 54s of budget remaining.
  135. 1h 23mrun_program name="mtest" seconds=200
    result
    Ran mtest for 2m 34s of game time; it finished.
    Inventory change: fertilizer +61, gold +1408, water +123, weird_substance -176.
    Game time: 1h 25m 49s elapsed, 4h 34m 11s of budget remaining.
    Output:
    1 152.65
  136. 1h 25msaidBFS solver was slower (compute cost). Reverting to wall-following.
  137. 1h 25mwrite_program name="maze" · evidence
    result
    Saved maze (19 lines).
    Game time: 1h 25m 59s elapsed, 4h 34m 1s of budget remaining.
  138. 1h 25mlist_programs
    result
    ## dino
    from lib import *
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	change_hat(Hats.Dinosaur_Hat)
    	go…
  139. 1h 26mwrite_program name="phases" · evidence
    result
    Saved phases (130 lines).
    Game time: 1h 26m 19s elapsed, 4h 33m 41s of budget remaining.
  140. 1h 26mrun_program name="main" seconds=400
    result
    Ran main for 6m 40s of game time; it is still running.
    Inventory change: bone +3969, cactus +8062, carrot +5232, fertilizer +32, gold +2560, hay -16, pumpkin +668, water +11, weird_substance +292, wood +18084.
    Game time: 1h 33m 9s elapsed, 4h 26m 51s of budget remaining.
    Output:
    11.24 24.83 66.81 203.31 61.24
  141. 1h 33mbuy_upgrade upgrades=["mazes","grass","pumpkins","polyculture"] · evidence
    result
    Bought mazes, now level 2. Paid cactus 12000. Its tutorial is docs page docs/unlocks/mazes.md.
    Bought grass, now level 4. Paid wood 2500.
    Bought pumpkins, now level 3. Paid carrot 4000. Its tutorial is docs page docs/unlocks/pumpkins.md.
    Bought polyculture, now level 1. Paid pumpkin 3000. Its tutorial is docs page docs/unlocks/polyculture.md.
    Game time: 1h 33m 19s elapsed, 4h 26m 41s of budget rem…
  142. 1h 33mdocs_read path="docs/unlocks/polyculture.md"
    result
    # Polyculture
    You may have already noticed that sometimes plants yield more when planted together.
    Grass, bushes, trees, and carrots yield more when they have the right plant companion. Companion preference is different for each individual plant and cannot be predicted. Fortunately, the companion preference of the plant under the drone can be measured using `get_companion()`. It returns a tuple wh…
  143. 1h 33mstop_program
    result
    Program stopped.
    Game time: 1h 33m 39s elapsed, 4h 26m 21s of budget remaining.
  144. 1h 33mwrite_program name="main" · evidence
    result
    Saved main (21 lines).
    Game time: 1h 33m 49s elapsed, 4h 26m 11s of budget remaining.
  145. 1h 33mwrite_program name="phases" · evidence
    result
    Saved phases (140 lines).
    Game time: 1h 33m 59s elapsed, 4h 26m 1s of budget remaining.
  146. 1h 33mrun_program name="main" seconds=400
    result
    Ran main for 20s of game time; it stopped with an error: The operator > cannot be used on the operands 9 and None.
    Inventory change: bone +81, cactus +10, carrot -556, fertilizer +8, pumpkin +374, water -50.
    Game time: 1h 34m 30s elapsed, 4h 25m 30s of budget remaining.
    Output:
    Error: The operator > cannot be used on the operands 9 and None.
    In: cactus_rows
    if measure() > measure(East):
              …
  147. 1h 34mwrite_program name="main" · evidence
    result
    Saved main (22 lines).
    Game time: 1h 34m 40s elapsed, 4h 25m 20s of budget remaining.
  148. 1h 34mrun_program name="main" seconds=400
    result
    Ran main for 6m 40s of game time; it is still running.
    Inventory change: bone +7938, cactus +7964, carrot +9015, fertilizer +96, gold +3328, hay +3912, pumpkin +5388, water +4, weird_substance +144, wood +29600.
    Game time: 1h 41m 30s elapsed, 4h 18m 30s of budget remaining.
    Output:
    16.23 24.55 62.3 79.21 61.69
  149. 1h 41mwait seconds=300 until_affordable="expand"
    result
    Waited 3m 34s (expand is affordable). Program: main running.
    Inventory change: carrot +8465, fertilizer +22, gold +3328, hay +4560, pumpkin +2436, water -73, weird_substance +236, wood +27944.
    Game time: 1h 45m 14s elapsed, 4h 14m 46s of budget remaining.
  150. 1h 45mstop_program
    result
    Program stopped.
    Game time: 1h 45m 24s elapsed, 4h 14m 36s of budget remaining.
  151. 1h 45mbuy_upgrade upgrades=["expand"] · evidence
    result
    Bought expand, now level 6. Paid pumpkin 8000. Its tutorial is docs page docs/unlocks/expand_1.md.
    Game time: 1h 45m 34s elapsed, 4h 14m 26s of budget remaining.
  152. 1h 45mresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 1/6; cost pumpkin 20000; available, not affordable; tutorial docs/unlocks/cactus.md
      ## Cactus Increases the yield and cost of cactus. 100% => 200%
    carrots (Carrots) level 4/10; cost wood 31200; can buy now; tutorial docs/unlocks/carro…
  153. 1h 45mobserve
    result
    Game time: 1h 45m 54s elapsed, 4h 14m 6s of budget remaining.
    Program: none running.
    Inventory: hay 12406, wood 79320, carrot 19153, pumpkin 359, cactus 17900, bone 27864, weird_substance 643, gold 14896, water 791, fertilizer 588.
    Farm 12x12. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks a d…
  154. 1h 45msaidExpanded to 12x12. Buying yield upgrades.
  155. 1h 45mbuy_upgrade upgrades=["carrots","pumpkins","grass","trees","watering","dinosaurs"] · evidence
    result
    Bought carrots, now level 5. Paid wood 31200. Its tutorial is docs page docs/unlocks/carrots.md.
    Bought pumpkins, now level 4. Paid carrot 16000. Its tutorial is docs page docs/unlocks/pumpkins.md.
    Bought grass, now level 5. Paid wood 12500.
    Bought trees, now level 4. Paid hay 4800. Its tutorial is docs page docs/unlocks/trees.md.
    Bought watering, now level 5. Paid wood 12800. Its tutorial is docs…
  156. 1h 46mrun_program name="main" seconds=600
    result
    Ran main for 10m of game time; it is still running.
    Inventory change: bone +40898, cactus +20164, carrot +10108, fertilizer +240, gold +7488, hay +12400, power +115.63, pumpkin +13536, water +256, weird_substance -624, wood +56696.
    Game time: 1h 56m 14s elapsed, 4h 3m 46s of budget remaining.
    Output:
    (none)
  157. 1h 56mwait seconds=240
    result
    Waited 4m (time up). Program: main running.
    Inventory change: cactus +20452, carrot -302, fertilizer -48, hay +400, power -132.09, pumpkin +11040, water +310, weird_substance +2496, wood +5568.
    Game time: 2h 24s elapsed, 3h 59m 36s of budget remaining.
  158. 2h 00mobserve
    result
    Game time: 2h 34s elapsed, 3h 59m 26s of budget remaining.
    Program: main (running).
    Inventory: hay 22262, wood 97484, carrot 17339, pumpkin 24935, cactus 46400, bone 68762, weird_substance 2515, gold 22384, water 1336, fertilizer 796.
    Farm 12x12. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks …
  159. 2h 00mbuy_upgrade upgrades=["fertilizer"] · evidence
    result
    Bought fertilizer, now level 4. Paid wood 54000. Its tutorial is docs page docs/unlocks/fertilizer.md.
    Game time: 2h 44s elapsed, 3h 59m 16s of budget remaining.
  160. 2h 00msaidMaze phase is the slowest (267s). Replacing the wall-follower with a target-directed DFS.
  161. 2h 00mwrite_program name="maze" · evidence
    result
    Saved maze (56 lines).
    Game time: 2h 54s elapsed, 3h 59m 6s of budget remaining.
  162. 2h 00mwrite_program name="mtest" · evidence
    result
    Saved mtest (6 lines).
    Game time: 2h 1m 4s elapsed, 3h 58m 56s of budget remaining.
  163. 2h 01mstop_program
    result
    Program stopped.
    Game time: 2h 1m 14s elapsed, 3h 58m 46s of budget remaining.
  164. 2h 01mrun_program name="mtest" seconds=200
    result
    Ran mtest for 46s of game time; it finished.
    Inventory change: fertilizer +36, gold +1440, water +73, weird_substance -120.
    Game time: 2h 2m 10s elapsed, 3h 57m 50s of budget remaining.
    Output:
    8.92
  165. 2h 02mwrite_program name="qtest" · evidence
    result
    Saved qtest (14 lines).
    Game time: 2h 2m 20s elapsed, 3h 57m 40s of budget remaining.
  166. 2h 02mrun_program name="qtest" seconds=30
    result
    Ran qtest for 2s of game time; it finished.
    Inventory change: fertilizer +2, hay +64, water +3, weird_substance -48.
    Game time: 2h 2m 32s elapsed, 3h 57m 28s of budget remaining.
    Output:
    1 (6,5)
    2 (3,7)
    3 (11,9)
    0 (4,4)
  167. 2h 02mobserve
    result
    Game time: 2h 2m 42s elapsed, 3h 57m 18s of budget remaining.
    Program: none running.
    Inventory: hay 22326, wood 43484, carrot 17339, pumpkin 24935, cactus 46228, bone 109660, weird_substance 2203, gold 25264, water 1540, fertilizer 894.
    Farm 12x12. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * mark…
  168. 2h 02msaidMultiple quadrant mazes work in parallel. Generalizing the solver to per-drone regions.
  169. 2h 02mwrite_program name="maze" · evidence
    result
    Saved maze (68 lines).
    Game time: 2h 2m 52s elapsed, 3h 57m 8s of budget remaining.
  170. 2h 02mwrite_program name="maze" · evidence
    result
    Saved maze (71 lines).
    Game time: 2h 3m 2s elapsed, 3h 56m 58s of budget remaining.
  171. 2h 03mwrite_program name="mtest" · evidence
    result
    Saved mtest (8 lines).
    Game time: 2h 3m 12s elapsed, 3h 56m 48s of budget remaining.
  172. 2h 03mrun_program name="mtest" seconds=600
    result
    Ran mtest for 6s of game time; it stopped with an error: The left hand side of the assignment didn't match the right hand side.
    Inventory change: fertilizer +5, gold +360, hay +64, water +10, weird_substance -108.
    Game time: 2h 3m 28s elapsed, 3h 56m 32s of budget remaining.
    Output:
    Error: The left hand side of the assignment didn't match the right hand side.
    In: maze_phase <- par <- maze_worker <…
  173. 2h 03mwrite_program name="maze" · evidence
    result
    Saved maze (83 lines).
    Game time: 2h 3m 38s elapsed, 3h 56m 22s of budget remaining.
  174. 2h 03mrun_program name="mtest" seconds=600
    result
    Ran mtest for 4s of game time; it stopped with an error: The index 0 was outside the bounds of the list [].
    Inventory change: fertilizer +3, gold +216, hay +64, water +6, weird_substance -84.
    Game time: 2h 3m 51s elapsed, 3h 56m 9s of budget remaining.
    Output:
    Error: The index 0 was outside the bounds of the list [].
    In: maze_phase <- par <- maze_worker <- solve_region
    if d != order[0] and (len(or…
  175. 2h 03mwrite_program name="qtest" · evidence
    result
    Saved qtest (13 lines).
    Game time: 2h 4m 1s elapsed, 3h 55m 59s of budget remaining.
  176. 2h 04mrun_program name="qtest" seconds=30
    result
    Ran qtest for 5s of game time; it finished.
    Inventory change: fertilizer +3, water +7, weird_substance -12.
    Game time: 2h 4m 16s elapsed, 3h 55m 44s of budget remaining.
    Output:
    (0,3)
    Entities.Hedge
    (0,3)
    Entities.Hedge (0,3)
  177. 2h 04mwrite_program name="maze" · evidence
    result
    Saved maze (94 lines).
    Game time: 2h 4m 26s elapsed, 3h 55m 34s of budget remaining.
  178. 2h 04mrun_program name="mtest" seconds=600
    result
    Ran mtest for 2m 33s of game time; it finished.
    Inventory change: fertilizer +123, gold +2304, hay +992, water +245, weird_substance -1956.
    Game time: 2h 7m 9s elapsed, 3h 52m 51s of budget remaining.
    Output:
    no maze Entities.Grass
    stuck
    no maze Entities.Grass
    stuck
    stuck
    stuck
    stuck
    stuck
    stuck
    no maze Entities.Grass
    stuck
    stuck
    lost 7 9 Entities.Grass
    lost 2 9 Entities.Grass
    stuck
    stuck
    stuck
    st…
  179. 2h 07msaidParallel separate mazes interfere (harvesting one clears all). Switching to one full-field maze, reused, with all drones hunting the treasure.
  180. 2h 07mwrite_program name="maze" · evidence
    result
    Saved maze (88 lines).
    Game time: 2h 7m 19s elapsed, 3h 52m 41s of budget remaining.
  181. 2h 07mwrite_program name="maze" · evidence
    result
    Saved maze (94 lines).
    Game time: 2h 7m 29s elapsed, 3h 52m 31s of budget remaining.
  182. 2h 07mwrite_program name="mtest" · evidence
    result
    Saved mtest (8 lines).
    Game time: 2h 7m 39s elapsed, 3h 52m 21s of budget remaining.
  183. 2h 07mrun_program name="mtest" seconds=300
    result
    Ran mtest for 9s of game time; it finished.
    Inventory change: fertilizer +7, gold +288, water +15, weird_substance -24.
    Game time: 2h 7m 58s elapsed, 3h 52m 2s of budget remaining.
    Output:
    8.02 288 24
  184. 2h 07mobserve
    result
    Game time: 2h 8m 8s elapsed, 3h 51m 52s of budget remaining.
    Program: none running.
    Inventory: hay 23446, wood 43484, carrot 17339, pumpkin 24935, cactus 46228, bone 109660, weird_substance 19, gold 28432, water 2063, fertilizer 1155.
    Farm 12x12. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * marks …
  185. 2h 08mwrite_program name="main" · evidence
    result
    Saved main (21 lines).
    Game time: 2h 8m 18s elapsed, 3h 51m 42s of budget remaining.
  186. 2h 08mrun_program name="main" seconds=500
    result
    Ran main for 8m 20s of game time; it is still running.
    Inventory change: bone +40898, cactus +20164, carrot -2800, fertilizer +256, gold +20160, hay +2304, pumpkin +10752, water +464, weird_substance +1080.
    Game time: 2h 16m 48s elapsed, 3h 43m 12s of budget remaining.
    Output:
    (none)
  187. 2h 16mbuy_upgrade upgrades=["megafarm"] · evidence
    result
    Bought megafarm, now level 3. Paid gold 32000. Its tutorial is docs page docs/unlocks/megafarm.md.
    Game time: 2h 16m 58s elapsed, 3h 43m 2s of budget remaining.
  188. 2h 16mwait seconds=200
    result
    Waited 3m 20s (time up). Program: main running.
    Inventory change: cactus +20700, carrot +33409, fertilizer +16, gold +8928, hay +30048, pumpkin +10608, water -228, weird_substance +2208, wood +131624.
    Game time: 2h 20m 28s elapsed, 3h 39m 32s of budget remaining.
  189. 2h 20mobserve
    result
    Game time: 2h 20m 38s elapsed, 3h 39m 22s of budget remaining.
    Program: main (running).
    Inventory: hay 55798, wood 175108, carrot 47948, pumpkin 46295, cactus 87088, bone 150558, weird_substance 2947, gold 29840, water 2379, fertilizer 1467.
    Farm 12x12. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); *…
  190. 2h 20msaidRunning well: 8 drones now. Buying more upgrades.
  191. 2h 20mbuy_upgrade upgrades=["mazes","carrots","grass","trees","watering","dinosaurs"] · evidence
    result
    Bought mazes, now level 3. Paid cactus 72000. Its tutorial is docs page docs/unlocks/mazes.md.
    Bought carrots, now level 6. Paid wood 156000. Its tutorial is docs page docs/unlocks/carrots.md.
    Could not buy grass: Not enough resources.
    Bought trees, now level 5. Paid hay 19200. Its tutorial is docs page docs/unlocks/trees.md.
    Could not buy watering: Not enough resources.
    Could not buy dinosaurs: N…
  192. 2h 20msaidDino phase is now the slowest (215s). Writing a shortcut-taking snake that stays safe along a Hamiltonian cycle.
  193. 2h 20mwrite_program name="dino" · evidence
    result
    Saved dino (89 lines).
    Game time: 2h 20m 58s elapsed, 3h 39m 2s of budget remaining.
  194. 2h 20mwrite_program name="dtest" · evidence
    result
    Saved dtest (8 lines).
    Game time: 2h 21m 8s elapsed, 3h 38m 52s of budget remaining.
  195. 2h 21mstop_program
    result
    Program stopped.
    Game time: 2h 21m 18s elapsed, 3h 38m 42s of budget remaining.
  196. 2h 21mwrite_program name="dino" · evidence
    result
    Saved dino (89 lines).
    Game time: 2h 21m 28s elapsed, 3h 38m 32s of budget remaining.
  197. 2h 21mrun_program name="dtest" seconds=300
    result
    Ran dtest for 1m 41s of game time; it finished.
    Inventory change: bone +6130, cactus -216, fertilizer +81, water +161.
    Game time: 2h 23m 19s elapsed, 3h 36m 41s of budget remaining.
    Output:
    99.54 5618
  198. 2h 23mwrite_program name="dtest" · evidence
    result
    Saved dtest (8 lines).
    Game time: 2h 23m 29s elapsed, 3h 36m 31s of budget remaining.
  199. 2h 23mwrite_program name="dtest" · evidence
    result
    Saved dtest (8 lines).
    Game time: 2h 23m 39s elapsed, 3h 36m 21s of budget remaining.
  200. 2h 23mwrite_program name="dino" · evidence
    result
    Saved dino (92 lines).
    Game time: 2h 23m 49s elapsed, 3h 36m 11s of budget remaining.
  201. 2h 23mrun_program name="dtest" seconds=300
    result
    Ran dtest for 3m 21s of game time; it finished.
    Inventory change: bone +13122, cactus -328, fertilizer +160, water +321.
    Game time: 2h 27m 20s elapsed, 3h 32m 40s of budget remaining.
    Output:
    none 11 2 10 1 82 143 124
    199.69 13122
  202. 2h 27mwrite_program name="dino" · evidence
    result
    Saved dino (92 lines).
    Game time: 2h 27m 30s elapsed, 3h 32m 30s of budget remaining.
  203. 2h 27mrun_program name="dtest" seconds=400
    result
    Ran dtest for 6m 40s of game time; it is still running.
    Inventory change: cactus -532, fertilizer +320, water +640.
    Game time: 2h 34m 20s elapsed, 3h 25m 40s of budget remaining.
    Output:
    (none)
  204. 2h 34msaidStill testing the improved snake; it's slow near full length. Waiting for it to finish.
  205. 2h 34mwait seconds=200 until_program_ends=true
    result
    Waited 41s (the program ended). Program: none running.
    Inventory change: bone +40898, cactus -32, fertilizer +33, water +65.
    Game time: 2h 35m 11s elapsed, 3h 24m 49s of budget remaining.
  206. 2h 35mwrite_program name="dino" · evidence
    result
    Saved dino (98 lines).
    Game time: 2h 35m 21s elapsed, 3h 24m 39s of budget remaining.
  207. 2h 35mrun_program name="dtest" seconds=400
    result
    Ran dtest for 2m 8s of game time; it finished.
    Inventory change: bone +40898, cactus -572, fertilizer +102, water +205.
    Game time: 2h 37m 39s elapsed, 3h 22m 21s of budget remaining.
    Output:
    126.77 40898
  208. 2h 37msaidHybrid snake: 127s (vs 215s). Back to the main loop.
  209. 2h 37mrun_program name="main" seconds=300
    result
    Ran main for 5m of game time; it is still running.
    Inventory change: bone +40898, cactus +20164, carrot -2896, fertilizer +96, gold +30528, pumpkin +10752, water +142, weird_substance +192.
    Game time: 2h 42m 49s elapsed, 3h 17m 11s of budget remaining.
    Output:
    (none)
  210. 2h 42mobserve
    result
    Game time: 2h 42m 59s elapsed, 3h 17m 1s of budget remaining.
    Program: main (running).
    Inventory: hay 36598, wood 19108, carrot 45052, pumpkin 57047, cactus 33536, bone 292504, weird_substance 2899, gold 63248, water 4185, fertilizer 2395.
    Farm 12x12. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium, 3 full); * m…
  211. 2h 42mresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 1/6; cost pumpkin 20000; can buy now; tutorial docs/unlocks/cactus.md
      ## Cactus Increases the yield and cost of cactus. 100% => 200%
    carrots (Carrots) level 6/10; cost wood 781000; available, not affordable; tutorial docs/unlocks/carr…
  212. 2h 43mbuy_upgrade upgrades=["polyculture","polyculture","polyculture","polyculture"] · evidence
    result
    Bought polyculture, now level 2. Paid bone 10000. Its tutorial is docs page docs/unlocks/polyculture.md.
    Bought polyculture, now level 3. Paid bone 50000. Its tutorial is docs page docs/unlocks/polyculture.md.
    Could not buy polyculture: Not enough resources.
    Could not buy polyculture: Not enough resources.
    Game time: 2h 43m 19s elapsed, 3h 16m 41s of budget remaining.
  213. 2h 43msaidPolyculture is now 40x multiplier — big. Implementing companion planting in the mixed phase.
  214. 2h 43mwrite_program name="poly" · evidence
    result
    Saved poly (59 lines).
    Game time: 2h 43m 29s elapsed, 3h 16m 31s of budget remaining.
  215. 2h 43mwrite_program name="ptest" · evidence
    result
    Saved ptest (4 lines).
    Game time: 2h 43m 39s elapsed, 3h 16m 21s of budget remaining.
  216. 2h 43mstop_program
    result
    Program stopped.
    Game time: 2h 43m 49s elapsed, 3h 16m 11s of budget remaining.
  217. 2h 43mrun_program name="ptest" seconds=90
    result
    Ran ptest for 1m 6s of game time; it finished.
    Inventory change: carrot +268577, fertilizer +54, hay +93248, power +2.37, water -407, wood +818448.
    Game time: 2h 45m 5s elapsed, 3h 14m 55s of budget remaining.
    Output:
    (none)
  218. 2h 45msaidPolyculture: 818k wood, 268k carrots in 60s. Buying upgrades.
  219. 2h 45mbuy_upgrade upgrades=["grass","watering","trees","pumpkins","cactus"] · evidence
    result
    Bought grass, now level 6. Paid wood 62500.
    Bought watering, now level 6. Paid wood 51200. Its tutorial is docs page docs/unlocks/watering.md.
    Bought trees, now level 6. Paid hay 76800. Its tutorial is docs page docs/unlocks/trees.md.
    Bought pumpkins, now level 5. Paid carrot 64000. Its tutorial is docs page docs/unlocks/pumpkins.md.
    Bought cactus, now level 2. Paid pumpkin 20000. Its tutorial is …
  220. 2h 45mwrite_program name="main" · evidence
    result
    Saved main (22 lines).
    Game time: 2h 45m 25s elapsed, 3h 14m 35s of budget remaining.
  221. 2h 45mrun_program name="main" seconds=600
    result
    Ran main for 10m of game time; it is still running.
    Inventory change: bone +40898, cactus +82124, carrot +314924, fertilizer +192, gold +77760, hay +248800, power -2.37, pumpkin +42960, water +1206, weird_substance +4704, wood +2031424.
    Game time: 2h 55m 35s elapsed, 3h 4m 25s of budget remaining.
    Output:
    23.98 44.24 119.71 166.98 62.87
  222. 2h 55mstop_program
    result
    Program stopped.
    Game time: 2h 55m 45s elapsed, 3h 4m 15s of budget remaining.
  223. 2h 55mbuy_upgrade upgrades=["expand","megafarm","carrots","dinosaurs","grass","watering"] · evidence
    result
    Bought expand, now level 7. Paid pumpkin 64000. Its tutorial is docs page docs/unlocks/expand_1.md.
    Bought megafarm, now level 4. Paid gold 128000. Its tutorial is docs page docs/unlocks/megafarm.md.
    Bought carrots, now level 7. Paid wood 781000. Its tutorial is docs page docs/unlocks/carrots.md.
    Bought dinosaurs, now level 3. Paid cactus 72000. Its tutorial is docs page docs/unlocks/dinosaurs.md.…
  224. 2h 55msaidNow 16x16 with 16 drones. Updating polyculture to use rectangular regions.
  225. 2h 55mwrite_program name="poly" · evidence
    result
    Saved poly (61 lines).
    Game time: 2h 56m 5s elapsed, 3h 3m 55s of budget remaining.
  226. 2h 56mrun_program name="main" seconds=900
    result
    Ran main for 15m of game time; it is still running.
    Inventory change: bone +520200, cactus +258064, carrot +780180, fertilizer +464, gold +123904, hay +590528, pumpkin +86944, water +4218, weird_substance +1504, wood +2631616.
    Game time: 3h 11m 15s elapsed, 2h 48m 45s of budget remaining.
    Output:
    22.1 49.39 256.02 138.92 61.75
  227. 3h 11mresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 2/6; cost pumpkin 120000; available, not affordable; tutorial docs/unlocks/cactus.md
      ## Cactus Increases the yield and cost of cactus. 200% => 400%
    carrots (Carrots) level 7/10; cost wood 3910000; can buy now; tutorial docs/unlocks/ca…
  228. 3h 11mbuy_upgrade upgrades=["polyculture","pumpkins","trees","grass","watering"] · evidence
    result
    Bought polyculture, now level 4. Paid bone 250000. Its tutorial is docs page docs/unlocks/polyculture.md.
    Bought pumpkins, now level 6. Paid carrot 256000. Its tutorial is docs page docs/unlocks/pumpkins.md.
    Bought trees, now level 7. Paid hay 307000. Its tutorial is docs page docs/unlocks/trees.md.
    Bought grass, now level 8. Paid wood 1560000.
    Bought watering, now level 8. Paid wood 819000. Its t…
  229. 3h 11mstop_program
    result
    Program stopped.
    Game time: 3h 11m 45s elapsed, 2h 48m 15s of budget remaining.
  230. 3h 11mlist_programs
    result
    ## dino
    from lib import *
    
    SHORT = 40
    
    def cycle_dirs(n):
    	ds = []
    	for i in range(n - 1):
    		ds.append(North)
    	for x in range(1, n):
    		d = South
    		if x % 2 == 0:
    			d = North
    		ds.append(East)
    		for i in range(n - 2):
    			ds.append(d)
    	ds.append(South)
    	for i in range(n - 1):
    		ds.append(West)
    	return ds
    
    def dino_phase():
    	n = get_world_size()
    	N = n * n
    	goto(0, 0)
    	ds = cycle_dirs(n)
    	idx = []
    	…
  231. 3h 11mwrite_program name="main" · evidence
    result
    Saved main (23 lines).
    Game time: 3h 12m 5s elapsed, 2h 47m 55s of budget remaining.
  232. 3h 12msaidNow updating the dino shortcut threshold and poly regions.
  233. 3h 12mwrite_program name="dino" · evidence
    result
    Saved dino (98 lines).
    Game time: 3h 12m 15s elapsed, 2h 47m 45s of budget remaining.
  234. 3h 12mwrite_program name="poly" · evidence
    result
    Saved poly (61 lines).
    Game time: 3h 12m 25s elapsed, 2h 47m 35s of budget remaining.
  235. 3h 12mrun_program name="main" seconds=900
    result
    Ran main for 15m of game time; it is still running.
    Inventory change: bone +260100, cactus +259312, carrot +3245089, fertilizer +464, gold +93184, hay +5204672, pumpkin +469184, water +9516, weird_substance +14816, wood +19779712.
    Game time: 3h 27m 35s elapsed, 2h 32m 25s of budget remaining.
    Output:
    48.05 44.32 279.65 158.01 62.69
  236. 3h 27mobserve
    result
    Game time: 3h 27m 45s elapsed, 2h 32m 15s of budget remaining.
    Program: main (running).
    Inventory: hay 5790046, wood 21489608, carrot 4333822, pumpkin 572135, cactus 560900, bone 814070, weird_substance 20691, gold 274512, water 20107, fertilizer 3745.
    Farm 16x16. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium,…
  237. 3h 27mstop_program
    result
    Program stopped.
    Game time: 3h 27m 55s elapsed, 2h 32m 5s of budget remaining.
  238. 3h 27mbuy_upgrade upgrades=["expand","mazes","carrots","grass","trees","watering","watering"] · evidence
    result
    Bought expand, now level 8. Paid pumpkin 512000. Its tutorial is docs page docs/unlocks/expand_1.md.
    Bought mazes, now level 4. Paid cactus 432000. Its tutorial is docs page docs/unlocks/mazes.md.
    Bought carrots, now level 8. Paid wood 3910000. Its tutorial is docs page docs/unlocks/carrots.md.
    Bought grass, now level 9. Paid wood 7810000.
    Bought trees, now level 8. Paid hay 1230000. Its tutorial …
  239. 3h 28msaidExpanded to 22x22. Fixing poly region bounds for non-divisible sizes.
  240. 3h 28mwrite_program name="poly" · evidence
    result
    Saved poly (59 lines).
    Game time: 3h 28m 15s elapsed, 2h 31m 45s of budget remaining.
  241. 3h 28mrun_program name="main" seconds=600
    result
    Ran main for 10m of game time; it is still running.
    Inventory change: cactus +467752, carrot -95488, fertilizer +480, hay +123904, pumpkin +462704, water +13274.
    Game time: 3h 38m 25s elapsed, 2h 21m 35s of budget remaining.
    Output:
    (none)
  242. 3h 38mwait seconds=600
    result
    Waited 10m (time up). Program: main running.
    Inventory change: bone +933156, cactus -3064, fertilizer +480, gold +329120, water +15360, weird_substance -15136.
    Game time: 3h 48m 35s elapsed, 2h 11m 25s of budget remaining.
  243. 3h 48mwait seconds=300
    result
    Waited 5m (time up). Program: main running.
    Inventory change: carrot +6387980, fertilizer -243, gold +89056, hay +11153408, pumpkin +426608, water +4787, weird_substance +32224, wood +45224832.
    Game time: 3h 53m 45s elapsed, 2h 6m 15s of budget remaining.
  244. 3h 53mobserve
    result
    Game time: 3h 53m 55s elapsed, 2h 6m 5s of budget remaining.
    Program: main (running).
    Inventory: hay 15837358, wood 51714440, carrot 10626314, pumpkin 949447, cactus 593412, bone 1809726, weird_substance 36195, gold 727536, water 55063, fertilizer 4518.
    Farm 22x22. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 medium…
  245. 3h 53mbuy_upgrade upgrades=["megafarm","polyculture","cactus","pumpkins","pumpkins","carrots","trees","grass","dinosaurs"] · evidence
    result
    Bought megafarm, now level 5. Paid gold 512000. Its tutorial is docs page docs/unlocks/megafarm.md.
    Bought polyculture, now level 5. Paid bone 1250000. Its tutorial is docs page docs/unlocks/polyculture.md.
    Bought cactus, now level 3. Paid pumpkin 120000. Its tutorial is docs page docs/unlocks/cactus.md.
    Bought pumpkins, now level 7. Paid carrot 1020000. Its tutorial is docs page docs/unlocks/pump…
  246. 3h 54msaidBought megafarm (32 drones), polyculture 5, and more. Updating main loop to run the slow dino phase every other loop.
  247. 3h 54mstop_program
    result
    Program stopped.
    Game time: 3h 54m 15s elapsed, 2h 5m 45s of budget remaining.
  248. 3h 54mwrite_program name="main" · evidence
    result
    Saved main (26 lines).
    Game time: 3h 54m 25s elapsed, 2h 5m 35s of budget remaining.
  249. 3h 54mrun_program name="main" seconds=900
    result
    Ran main for 15m of game time; it is still running.
    Inventory change: cactus +1909848, carrot +26694502, fertilizer +238, gold +793760, hay +23675904, pumpkin +2820416, water +19456, weird_substance +109456, wood +185735168.
    Game time: 4h 9m 35s elapsed, 1h 50m 25s of budget remaining.
    Output:
    51.4 87.41 0 359.59 67.78
  250. 4h 09mbuy_upgrade upgrades=["grass","mazes","cactus","cactus","pumpkins","carrots","trees","dinosaurs"] · evidence
    result
    Bought grass, now level 10. Paid wood 39100000.
    Could not buy mazes: Not enough resources.
    Bought cactus, now level 4. Paid pumpkin 720000. Its tutorial is docs page docs/unlocks/cactus.md.
    Could not buy cactus: Not enough resources.
    Bought pumpkins, now level 9. Paid carrot 16400000. Its tutorial is docs page docs/unlocks/pumpkins.md.
    Bought carrots, now level 10. Paid wood 97700000. Its tutorial…
  251. 4h 09mresearch
    result
    auto_unlock (Auto Unlock) level 0/1; cost pumpkin 5000; requires costs
      ## Auto Unlock Automatically unlock things. unlock(Unlocks.Megafarm)
    cactus (Cactus) level 4/6; cost pumpkin 4320000; available, not affordable; tutorial docs/unlocks/cactus.md
      ## Cactus Increases the yield and cost of cactus. 800% => 1600%
    carrots (Carrots) level 10/10; maxed; tutorial docs/unlocks/carrots.md
      ## Carrots …
  252. 4h 09mwait seconds=900 until_affordable="expand"
    result
    Waited 15m (time up). Program: main running.
    Inventory change: bone +1866312, cactus -6624, fertilizer +720, gold +1161600, water +23040, weird_substance -52976.
    Game time: 4h 25m 5s elapsed, 1h 34m 55s of budget remaining.
  253. 4h 25mwait seconds=600 until_affordable="expand"
    result
    Waited 10m (time up). Program: main running.
    Inventory change: fertilizer +480, water +15360.
    Game time: 4h 35m 15s elapsed, 1h 24m 45s of budget remaining.
  254. 4h 35mobserve
    result
    Game time: 4h 35m 25s elapsed, 1h 24m 35s of budget remaining.
    Program: main (running).
    Inventory: hay 14893262, wood 81149608, carrot 15800816, pumpkin 2929863, cactus 2064492, bone 2426038, weird_substance 92675, gold 2170896, water 115223, fertilizer 6028.
    Farm 22x22. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 …
  255. 4h 35msaidMaze got stuck at the 300-relocation limit. Fixing: harvest if the treasure doesn't move.
  256. 4h 35mstop_program
    result
    Program stopped.
    Game time: 4h 35m 35s elapsed, 1h 24m 25s of budget remaining.
  257. 4h 35mwrite_program name="maze" · evidence
    result
    Saved maze (98 lines).
    Game time: 4h 35m 45s elapsed, 1h 24m 15s of budget remaining.
  258. 4h 35mrun_program name="main" seconds=120
    result
    Ran main for 2m of game time; it is still running.
    Inventory change: carrot -623872, fertilizer +96, hay +246272, pumpkin +2971072, water +1541.
    Game time: 4h 37m 55s elapsed, 1h 22m 5s of budget remaining.
    Output:
    (none)
  259. 4h 37mstop_program
    result
    Program stopped.
    Game time: 4h 38m 5s elapsed, 1h 21m 55s of budget remaining.
  260. 4h 38mbuy_upgrade upgrades=["expand"] · evidence
    result
    Bought expand, now level 9. Paid pumpkin 4100000. Its tutorial is docs page docs/unlocks/expand_1.md.
    Game time: 4h 38m 15s elapsed, 1h 21m 45s of budget remaining.
  261. 4h 38mwrite_program name="main" · evidence
    result
    Saved main (23 lines).
    Game time: 4h 38m 25s elapsed, 1h 21m 35s of budget remaining.
  262. 4h 38mrun_program name="main" seconds=600
    result
    Ran main for 10m of game time; it is still running.
    Inventory change: cactus +8388608, carrot -986368, fertilizer +480, gold +761856, hay +524288, pumpkin +4702208, water +12398, weird_substance -24064.
    Game time: 4h 48m 35s elapsed, 1h 11m 25s of budget remaining.
    Output:
    (none)
  263. 4h 48mwait seconds=300
    result
    Waited 5m (time up). Program: main running.
    Inventory change: fertilizer +240, gold +1269760, water +7680, weird_substance -39680.
    Game time: 4h 53m 45s elapsed, 1h 6m 15s of budget remaining.
  264. 4h 53mwait seconds=300
    result
    Waited 5m (time up). Program: main running.
    Inventory change: carrot +44541422, fertilizer +240, gold +352256, hay +48137728, pumpkin +4702208, water +3439, weird_substance -10752, wood +350135808.
    Game time: 4h 58m 55s elapsed, 1h 1m 5s of budget remaining.
  265. 4h 58mobserve
    result
    Game time: 4h 59m 5s elapsed, 1h 55s of budget remaining.
    Program: main (running).
    Inventory: hay 63801550, wood 431285416, carrot 58731998, pumpkin 11205351, cactus 10453100, bone 2426038, weird_substance 15619, gold 4636688, water 142841, fertilizer 7164.
    Farm 32x32. x runs west to east, rows are listed north (top) to south.
    Cells: ground (# soil, _ grassland) + entity code + size (1 small, 2 me…
  266. 4h 59msaidMaze phase overran (796s). Buying upgrades and adding a time cap to maze reuse.
  267. 4h 59mbuy_upgrade upgrades=["cactus","mazes","dinosaurs","cactus","mazes"] · evidence
    result
    Bought cactus, now level 5. Paid pumpkin 4320000. Its tutorial is docs page docs/unlocks/cactus.md.
    Bought mazes, now level 5. Paid cactus 2590000. Its tutorial is docs page docs/unlocks/mazes.md.
    Bought dinosaurs, now level 5. Paid cactus 2590000. Its tutorial is docs page docs/unlocks/dinosaurs.md.
    Could not buy cactus: Not enough resources.
    Could not buy mazes: Not enough resources.
    Game time: …
  268. 4h 59mwrite_program name="maze" · evidence
    result
    Saved maze (106 lines).
    Game time: 4h 59m 25s elapsed, 1h 35s of budget remaining.
  269. 4h 59mstop_program
    result
    Program stopped.
    Game time: 4h 59m 35s elapsed, 1h 25s of budget remaining.
  270. 4h 59mrun_program name="main" seconds=900
    result
    Ran main for 15m of game time; it is still running.
    Inventory change: cactus +34946240, carrot +87122373, fertilizer -303, gold +1032192, hay +89581056, pumpkin +8733440, water +12854, weird_substance +605952, wood +685880832.
    Game time: 5h 14m 45s elapsed, 45m 15s of budget remaining.
    Output:
    56.29 174.68 0 146.17 68.15
    54.61 171.66 0 151.31 69.1
  271. 5h 14mbuy_upgrade upgrades=["pumpkins","cactus","mazes","dinosaurs"] · evidence
    result
    Bought pumpkins, now level 10. Paid carrot 65500000. Its tutorial is docs page docs/unlocks/pumpkins.md.
    Could not buy cactus: Not enough resources.
    Bought mazes, now level 6. Paid cactus 15600000. Its tutorial is docs page docs/unlocks/mazes.md.
    Bought dinosaurs, now level 6. Paid cactus 15600000. Its tutorial is docs page docs/unlocks/dinosaurs.md.
    Game time: 5h 14m 55s elapsed, 45m 5s of budget…
  272. 5h 14msaidAdding a time-capped dino phase to the loop for bones.
  273. 5h 14mwrite_program name="dino" · evidence
    result
    Saved dino (106 lines).
    Game time: 5h 15m 5s elapsed, 44m 55s of budget remaining.
  274. 5h 15mwrite_program name="main" · evidence
    result
    Stop the program before editing it.
  275. 5h 15mstop_program
    result
    Program stopped.
    Game time: 5h 15m 25s elapsed, 44m 35s of budget remaining.
  276. 5h 15mwrite_program name="main" · evidence
    result
    Saved main (25 lines).
    Game time: 5h 15m 35s elapsed, 44m 25s of budget remaining.
  277. 5h 15mrun_program name="main" seconds=900
    result
    Ran main for 15m of game time; it is still running.
    Inventory change: bone +26912, cactus +33552128, carrot +43793145, fertilizer +720, gold +196608, hay +44274688, pumpkin +19939328, water +16998, weird_substance -6144, wood +338166784.
    Game time: 5h 30m 45s elapsed, 29m 15s of budget remaining.
    Output:
    64.24 159.58 186.17 157.06 68.21
  278. 5h 30msaidDino at 32x32 yields too little in its time cap; removing it for the final stretch.
  279. 5h 30mstop_program
    result
    Program stopped.
    Game time: 5h 30m 55s elapsed, 29m 5s of budget remaining.
  280. 5h 30mwrite_program name="main" · evidence
    result
    Saved main (19 lines).
    Game time: 5h 31m 5s elapsed, 28m 55s of budget remaining.
  281. 5h 31mrun_program name="main" seconds=900
    result
    Ran main for 15m of game time; it is still running.
    Inventory change: bone +1152, cactus +33554432, carrot +70033940, fertilizer +720, gold +1245184, hay +73368576, pumpkin +18808832, water +13284, weird_substance -38912, wood +556737024.
    Game time: 5h 46m 15s elapsed, 13m 45s of budget remaining.
    Output:
    68.56 170.23 150.64 67.87
  282. 5h 46mbuy_upgrade upgrades=["cactus"] · evidence
    result
    Bought cactus, now level 6. Paid pumpkin 25900000. Its tutorial is docs page docs/unlocks/cactus.md.
    Game time: 5h 46m 25s elapsed, 13m 35s of budget remaining.
  283. 5h 46mwait seconds=780
    result
    Waited 13m (time up). Program: main running.
    Inventory change: cactus +67108864, carrot +44850924, fertilizer +624, gold +1048576, hay +44611072, pumpkin +18743296, water +14810, weird_substance -33792, wood +338941952.
    Game time: 5h 59m 35s elapsed, 25s of budget remaining.
  284. 5h 59mwait seconds=15
    result
    Waited 15s (time up). Program: main running.
    Inventory change: fertilizer +12, water +384.
    Game time: 6h elapsed, 0s of budget remaining. The game-time budget is used up. The run is over; stop now.
  285. 6h 00msaidI used the full 6-hour budget. The farm went from one grass tile to a 32x32 field run by 32 drones, and it produced 12 kinds of resource: hay, wood, carrots, pumpkins, cactus, bones, gold, weird substance, water, fertilizer and a little power. Rough totals, added up from the progress readings (no final count was taken): - Wood: about 2 billion - Hay and carrots: a few hundred million each - Cactus: around 170 million - Pumpkins: around 80 million - Gold: around 10 million - Bones: about 2.4 million - Water, fertilizer and weird substance: smaller amounts - Power: almost none. I never set up sunflowers properly. How the farm ran by the end: a program that repeated these steps across all the drones: 1. Pumpkins: the whole field was planted with pumpkins so they merged into one giant pumpkin. Fertilizing one batch gave weird substance as a by-product. 2. Cactus: the cacti were sorted by row, then by column, so a single harvest collected the whole field. That pays the number of cacti squared, about 8.4 million per harvest even before the last two cactus upgrades. 3. Mazes: weird substance turned a bush into a field-sized maze. All drones searched for the treasure, and each found treasure was moved to a new spot so the same maze could be reused for gold. 4. Mixed crops for 60 seconds: trees, grass, carrots and sunflowers, with each plant's preferred neighbour planted next to it. That bonus was the biggest single win: after the first upgrade it took one minute's output from about 130,000 wood to about 800,000. With the bonus fully upgraded, one cycle brought in hundreds of millions of wood. Problems along the way: - Parallel mazes failed. Harvesting the treasure in one maze clears every maze on the field, so the separate small mazes I tried wasted about 1,900 weird substance. I replaced them with one shared maze. - Maze stall. The program got stuck for about 10 minutes when a maze reached its 300-move limit for the treasure. I fixed it and added a time limit to the maze step. - Dropped dinosaur step. The snake that earns bones was too slow on the 32x32 field, so I took it out for the last half hour. - Unused upgrade: I bought the last dinosaur upgrade with about 45 minutes left, but bones barely went up afterwards (about 28,000 more), so that purchase was mostly wasted. Most upgrades ended at their maximum level. I never got to the very expensive top-tier unlocks.

Thinking is shown as the agent reported it over ACP; some agents report a summary, not the full reasoning. Tool results are cut at 400 characters; program code is in evidence.json.

spentreported alongside the score, never folded into it

What it spent

API-equivalent cost (estimate)agent-session (one point per model request)

API-equivalent estimate at list prices; not an actual charge

Tokens

Input (uncached)1,713
Cache reads13,977,503
Cache writes210,825
Output85,526
Thinking (subset of output where reported)33,940
Total14,275,567
ModelTokensEstimate
claude-haiku-5-51,419$0.00015
claude-opus-5-514,274,148$6.19

Estimate: API-equivalent estimate at list prices; not an actual charge. Price table prices-2026-10-16b. The agent itself reported $6.19 (cost reported by the agent itself; plan or subscription billing may differ).

conditionsprovenance

Limitations

  • Recorded from a harness checkout with uncommitted changes.
Run ideconomy-v1-claude-opus-s1-a1-20261016T153455Z
Taskeconomy-v1 · acb5fb455a43
Budget6h 00m game time · 10s per action · caps: 2,000 tool calls, 20 continuations, 4h 00m real time
AgentClaude Agent 0.91.0 (@agentclientprotocol/claude-agent-acp)
Applied config{"model":"opus","effort":"medium","fast":"off"}
Models reportedclaude-opus-5-5, claude-haiku-5-5
Tools availablebuy_upgrade, docs_list, docs_read, docs_search, inspect_tile, list_programs, observe, research, run_program, stop_program, wait, write_program
Harness5a28f3c7882f (uncommitted changes)
Bridge / game3ee9b950dce5 / 953fea25964f
Adaptersclaude-agent-acp 0.91.0, codex-acp 2.2.2, acp-sdk 1.8.0, mcp-sdk 1.32.1
Rubrics
economy-v1 (headline) · Σ over resources of log10(1 + produced) · 51746c5bec27
economy-weighted-v1 · scores 9.11 · log10(1 + Σ w_r × produced_r), weights from late-game sink prices · 228b39065cbd
Started / ended2026-10-16T15:34:55.181Z → 2026-10-16T16:01:33.257Z
Evidence117 items in evidence.json