The Farmer Was Replaced by Opus 5.5

November 2026 Matheus Kunzler Maldaner 9 min read
The first minutes of the game on a small farm

For better or worse (likely worse), in the past couple weeks I got back into games in the midst of PhD applications. After finally maxing out my TownHall 18 on Clash of Clans, I was browsing Steam to find games to spend time on. I 100%'d "1 million coins" in about a couple hours and then stumbled upon "The Farmer Was Replaced", a game I had played before but which at the time did not have any achievements, and since I am a completionist, and have been making some effort to code by hand as an exercise to not forget the basics, I saw it as the perfect game to play.

The Leaderboard

After spending a decent amount of time 100%ing the current game (there's a mining DLC which I did not buy), I was curious to see how much frontier models could optimize a full run of the game and enter the game's leaderboard, with the initial goal of breaking into #1000 global. The leaderboard I went for is called Fastest_Reset, where you start the game from nothing and race to buy the Leaderboard unlock, which costs 2 million bones and 1 million gold (currencies in the game). I fed Claude some known scripts found online (more below), the game rules, ran a few scripts in-game which would create .txt files into my actual drive so Opus could see my current game progress, and pointed it that way with the one goal to crack #1000. Opus was given access to run the game and polish the script iteratively, checking how much we had to improve each step of the way to cut our time down to whatever time the 1000th player had.

Balls's Script

At this point Opus started using a script made by Balls, which on its own achieved a time of 1:15:42.9, reaching rank #486 on the leaderboard. Since that was already inside the top 1000, the goal became the top 100, and after a first round of tweaks I submitted a 1:14:01 that moved me up to #373. Opus found that skipping the hats (you can change the hat in your drone, and are purely cosmetic) saved about 41 seconds, that skipping the unlocks that came with the mining DLC helped too, that capping upgrades at a certain level (Grass 6, Trees 6, Watering 7, Polyculture 3 and Megafarm 4) was faster than buying every level, and that buying Fertilizer 3 before Mazes was also faster, while forcing an extra farm expansion or keeping a bigger power reserve only made the run slower, and at the end managed to get within about 80 seconds of the top 100 solely by optimizing this known script.

The Fastest_Reset leaderboard from #99 to #101, with #100 at 58:41.920.
The leaderboard around #100 on November 10. The cutoff was 1:00:06 while Opus was tuning Balls's script, and it has since dropped to 58:41.9.

Starting From Scratch

At this point I was curious whether 1. starting from the known script was limiting Opus capabilities and 2. whether Opus 5.5 xhigh would be able to start from scratch and come up with a stronger script capable of potentially make top 10 globally. The first two scripts it wrote from scratch were both slower than Balls's (1:42:30 and then 1:27:28). Since I had usage to spare and my weekly limits were reseting soon, I had it spawn 20 subagents to research different parts of the game and optimize it based on what the runs and experiments Opus 5.5 Med had run previously. Seven of them each researched one part of the game (the early game and basic crops, power and sunflowers, bones and the dinosaur, gold and mazes, pumpkins and cactus, how many ticks each line of the game's language costs, and the purchase order and endgame), seven more double checked each of those claims against the game's decompiled code, one lead merged everything into a single plan, one wrote the script, three reviewed it (for API mistakes, deadlocks and speed) and one fixed what they found. That second took about 100 minutes and about 1.6M subagent tokens, and an earlier try with only 7 analysts died because my laptop went to sleep because my laptop charger has not been too reliable recently.

The New Script

After a few hours (including a pause while I gave a presentation at UB Hacking in NY) Opus came up with a new script that (after some debugging runs where it could man my computer via a small PowerShell script that uses Windows APIs to bring the game window to the front, checks that the game really is in front and that the pixels where the run button should be have the right colors, clicks into the game and presses F5 to start the run, and then puts my previous window and mouse cursor back where they were) that optimized the game in a few ways, each of them checked against the game's code. Clips below are from final clip.

The main change was planting one mixed field, carrots and trees in a checkerboard with grass in between (left picture), so almost every plant sits next to the companion it wants and gives 5x the harvest (which the game gives a bonus to). It also waters each crop once right when it's planted and harvests sunflowers from most petals to fewest, which keeps their 8x power bonus (power doubles the drone's speed).

Four drones harvest a round of sunflowers on the 8x8 farm and plant a mixed field of carrots and trees in a checkerboard with grass in between (2x speed)
At the very end, drones plant sunflowers on the right half of the farm for power while the left half is already running its mazes (real speed)

For the bones currency, the dinosaur (a snake game inside the game) heads straight for each apple while its tail is short and then loops over every tile. The script also grows its own Weird Substance for the gold mazes by spreading infection between its trees, and stays on a 16x16 farm instead of buying late upgrades to expand the farm since those would not pay off before the run ends.

The dinosaur heads straight for each apple while its tail is short, then joins a loop that visits every tile of the 16x16 farm (2x speed)
The last million gold, with 16 drones split across four 8x8 mazes, each group chasing its own treasure (real speed)

This script not only beat Balls script by over 30 minutes (39:56 on the leaderboard against the published 1:15:42), but got Opus to #28 on the global leaderboard with a 39:56.089, up from my previous #373.

Fastest_Reset times up to #28

Balls's script with tweaks Opus's own script
#1
22:48
#2
24:50
Top 100
1:00:06
Balls's script, as published #4861:15:42.9
First round of tweaks #3731:14:01
Tuned Balls's script simulated1:01:25
Own script v1 simulated1:42:30
Own script v2 simulated1:27:28
Own script v3, 20 subagents simulated40:06
Own script v3, submitted #2839:56.1
Show as a table
RunTimeHow it was measured
Balls's script, as published1:15:42.9Leaderboard submission, rank #486
First round of tweaks1:14:01Leaderboard submission, rank #373
Tuned Balls's script1:01:25simulate(), average of seeds 1 to 3
Own script v11:42:30simulate(), seed 1
Own script v21:27:28simulate(), seed 1
Own script v340:06simulate(), average of seeds 1 to 3
Own script v3, submitted39:56.089Leaderboard submission, Global Rank #28
Reference, #2 on the leaderboard24:50.234Leaderboard
Reference, #1 on the leaderboard22:47.8Leaderboard
Reference, top 100 cutoff1:00:06Leaderboard, at the time of the tuning
Lower is better. Every row marked with a rank is a real leaderboard submission, and the rows marked simulated come from the game's own simulate() on fixed seeds.

Opus on My Screen

Not satisfied with not being the best overall in the world, Opus continued its tests while I used the laptop by quickly taking control of my screen, tabbing into the game, performing a quick action (such as pressing "run" on a script it had just written straight into the game's save folder, which the game reloads on its own) and tabbing out, such that I could keep doing my work (almost) uninterrupted. Each test used the game's own simulate() function on a fixed seed, which plays a roughly 40 minute run in a minute or two of real time and always gives the same result for the same seed.

Letting It Run Overnight

After #28 I told Opus the PC was all its own and to keep going until the top 10, and then to try different algorithms and go for #1. To test ideas without me, it set up a small queue on my laptop that copies a new version of the script into the save folder, writes a runner that calls simulate() on 3 fixed seeds, presses run in the game and saves the results, which by the end took a little over 2 minutes per test. On top of that it ran rounds of 7 subagents, where 6 of them each owned one part of the run (like the early game, power, pumpkins, the snake or the endgame), prototyped their ideas in a homemade emulator of the game's tick costs and then got 5 actual tests each in the queue. The last agent then merged anything that beat the best version by 12 seconds or more and checked it on 9 seeds, and then Opus submitted it with leaderboard_run, which averages 5 fresh runs into one leaderboard time. Somewhere along the way I told it to stop once a full round gained less than 15 seconds.

Each round took somewhere between 2 and 4 hours. Before the first one, Opus copied the upgrade order the top players use, which alone saved about 3 minutes, and the rounds after that added things like four shared mazes for the final gold, better snake loops and a script that loads in under a second instead of four (the setup code runs on the clock too). Round 4 even got faster by skipping an upgrade, since the extra snakes needed to pay for Polyculture 3 cost more time than it saved.

Round 7's pumpkins, with 16 drones each walking a precomputed loop over its part of the field while grown pumpkins merge into giant ones (2x speed)
Cactus sorting on the 16x16 farm, where the drones swap cacti until every row and column is in order, since a sorted field pays out all at once (about 3x speed)

The game gives the exact same time for the same seed every single run, but adding even one function to the script costs a tick when it loads, and since watering and crop growth draw from the same random numbers, that one tick re-rolls the whole run (at one point Opus deleted an unused dictionary entry just to pay for a new function and keep the early game identical).

Fastest_Reset, overnight rounds

#1
22:48
#2
24:50
Own script v3 #2839:56.1
Before the rounds #1835:42.9
Round 1 #932:43.5
Round 2 #830:17.6
Round 3 #529:09.6
Round 4 #428:17.7
Round 5 #327:38.6
Round 6 #327:17.4
Round 7, final #327:14.9
Show as a table
RunTimeHow it was measured
Own script v339:56.089Leaderboard submission, Global Rank #28
Before the rounds35:42.884Leaderboard submission, rank #18
Round 132:43.471Leaderboard submission, rank #9
Round 230:17.588Leaderboard submission, rank #8
Round 329:09.601Leaderboard submission, rank #5
Round 428:17.728Leaderboard submission, rank #4
Round 527:38.556Leaderboard submission, rank #3
Round 627:17.436Leaderboard submission, rank #3
Round 7, final27:14.863Leaderboard submission, rank #3
Reference, #2 on the leaderboard24:50.234Leaderboard
Reference, #1 on the leaderboard22:47.8Leaderboard
Lower is better

#3 in the World

The game's Fastest_Reset result screen showing run_completed 27:05.553, Personal Best 27:05.553 and Global Rank #3, next to the top seven of the leaderboard with Matheus1512 at #3.
Round 7's version run once more on November 11, which came in at 27:05.553 and kept #3

Round 5 got us to #3 on the evening of November 9, and rounds 6 and 7 kept shaving time off until a resubmission of round 7's version landed a 27:14.863 at around 3am on November 10 (its 10 leaderboard runs averaged about 27:13, and the fastest single one was a 26:35). In about a day and a half of mostly unattended work, the script went from 39:56 to 27:14 and from #28 to #3 out of more than 4,500 players on the board.

Why We Stopped at #3

By the point we got to #3 Opus was optimizing for mere seconds. Our best time was around 27 minutes, and #1 sat at an absurd 4+ MINUTES ahead. While looking into how those players may have done it, Opus found the exact same 24:50.2 for #2 in a snapshot of the leaderboard someone saved on September 29 which is before the game's November 2 patch (which patched some exploits and seemingly did not clear the leaderboard), while #1's run has no date we could find. I have no idea how either of those runs was done but since Opus was optimizing for mere seconds, and the theory that there were powerful exploits that were now patched, #3 felt like a decent place to end the story.

The top seven of the Fastest_Reset leaderboard. #1 const arch 22:47.800, #2 Cheese 24:50.234, #3 Matheus1512 27:14.863, #4 Chin Music 27:48.860, #5 ShadowTurtle 28:41.037, #6 Proton 29:31.603, #7 Creator 29:36.731.
Leaderboard as seen on November 10th, 2026. #2 and #1 are still minutes ahead

Project Timeline

Nov 5, 2026
The default Balls's script gets 1:15:42.9 (#486), and 1:14:01 w/ claude tweaks (#373)
Nov 6, 2026
Further Optimized Balls's script get 1:01:25 in simulate()
Nov 7, 2026
Made from scratch v1 and v2 scripts get 1:42:30 and 1:27:28. 20 subagent rewrite a new v3 script, and get the first test seed run under 40 minutes
Nov 8, 2026
Opus submits v3 at 39:56.089, getting Global Rank #28. Overnight optimizations take it to 35:42.884 (#18)
Nov 9, 2026
Opus breaks top 10 after midnight (32:43.471, #9), then multiple rounds of optimization passes take it to #8, #5, #4 and finally #3 (27:38.556)
Nov 10, 2026
The seventh and last optimization pass gets 27:14.863 (#3). With #1 and #2 seemingly out of reach as Opus has begun optimizing for seconds, and the winners are several minutes ahead, I decide to end the loop

I plan to write more about random afternoon side projects, like adding Claude Code to my Carplay or recently getting an iPhone app to ~1k users. I found that the "need for perfection" limits the frequency of my posts (both here and on my research Instagram) so forgive any typos in this blog or non coherent story telling lol

The entire final run that got top 3 sped up, with a final time of 27.14 seconds

Tools used: PowerShell, ffmpeg, TFWR own Python-like language, GPT Image Gen, Claude Opus 5.5.

Matheus is graduating from his master's in December 2026, and is currently working on benchmarking LLMs in team-based games with unwritten rules, before joining Mem0 in the Spring as a research engineer intern.

@matheusresearch matheus.wiki email