Junk Wars Saga Part III: The Comeback

0xhank
dfdao
Published in
6 min readMar 28, 2022

This is the third installment of a casual series about dfdao’s journey in Dark Forest Round v0.6.5. I’m 0xhank, dfdao’s chief historian. (Check out Part I and Part II, if you missed them).

It was February 24, and the Dark Forest round was more than halfway done. Cha0sg0d and I had flown to his house after ETHDenver and were camped out in his basement, or, as we called it, the Bridge. We each had a laptop and used his family’s Mac as the center of operations. At all times, we had access to our engineering (VSCode), communication channels (Discord), and control panel (the game itself).

Cha0sg0d at the helm

Now, it was two in the morning, and our intended game-winning strategy, Moby Dick, was failing. We were down hundreds of millions of points to our rivals, Orden GG, and the deficit was growing. Fortunately, we had a plan to come back and win the game.

Developing our New Strategy

We knew we had to use capture zones, one of the round’s scoring methods, to our advantage. But the question remained: how?

First, we read source code to fully understand them. Capture zones are small circles that move around the map every 20 minutes. If a player successfully gains ownership of a planet currently within a zone, they can invade it. Then they must wait around four hours to be able to capture an invaded planet for points.

A capture zone

We observed that the movement of capture zones was completely random. We would need to spread our empire as far as possible to have the best chance of invading planets when new zones appeared. The zones change every 20 minutes, which may seem like a long time, but the configuration of the current round meant our planets needed to be either very close or extremely fast. We had to fully upgrade the speed of all our planets so we could reach distant capture zones in time. We also needed to stockpile and place wormholes, an artifact that allows quickly moving energy around between planets, on our empire.

We noticed from the scoring system of capture zones that it is far more lucrative to claim a high-level planet than a small one. A level two planet earns 400 times fewer points than a level nine (250,000 versus 100 million). We used Cecco’s score database to find that Orden’s strategy was to only capture the largest planets in capture zones. This explained why their point total would go unchanged for some time, and suddenly spike once they captured a large planet.

Points for winning each type of planet

Cha0sg0d had a bright thought. What if, instead of focusing on the points of a single planet, we consider the distribution of planets? Even though level two planets are worth 400 times less than level nine planets, they are 16,000 times more likely to appear. If we captured all available level two planets and all available level nine planets, we could expect to earn 40 times more points from our level two captures!

Expected value of planet levels with planet rarity factored in

The only problem with invading all possible planets in a capture zone was space junk. This was another new feature for this round, which added points to our junk pile every time we moved to an unowned planet. Once our junk pile was full, we could no longer capture new planets. We had to develop a way to bulk abandon all small planets we didn’t need.

With all our strategic elements in place, we were ready to plan and execute our plan to catch up to Orden.

Execution

We split our efforts into three parts: stockpiling wormholes; expanding our empire; and building plugins to automate invading, capturing and abandoning planets.

Stockpiling Wormholes

While Velorum was hard at work piloting, Doug Binder was busy designing the Artifact Depo, a smart contract and associated plugin that enabled transferring artifacts to dfdao. Doug’s plugin would allow generous allies to donate their wormholes directly to our empire, which we could then use to quickly transfer energy around our empire. We connected most of our wormholes to the Mothership, a planet with 1024x energy regen that originally was used for feeding the Moby Dick, but was repurposed for invading capture zones.

We posted on Twitter, imploring our friends to help us catch Orden. To sweeten the deal, we offered donors a share of ten percent of governance over our trophy planet. We didn’t have an Astral Colossus this round, but the Artifact Depo allowed us to have permissionless, on-chain contributions from our community. Donations started pouring in, from our pals Ner0nzz, ClassicJordon, Paikus, and many more. We soon built the Dark Forest Autobahn across our empire, allowing us to snipe planets in capture zones.

The Artifact Depo plugin for artifact contributions

Expanding Our Empire

With a new strategy and a stockpile of wormholes, Velorum set to work expanding our empire. He abandoned all of our smallest planets, giving us enough junk to spread. Fortunately, much of the surrounding area was owned by our allies, like David Ryan, Modukon, and Bulmenisaurus. However, in order to move closer to the center of the map, where capture zones were more concentrated, we needed to bulldoze some smaller empires. To these players, we sincerely apologize, but then again, we had a job to do. Velorum also upgraded all of our planets to have maximum speed, and began invading planets in nearby capture zones.

Our network of purple wormholes connected from the Mothership to planets with upgraded speed.

Building Plugins

Despite our considerable advances, Velorum was still invading, capturing, and abandoning each planet manually. Despite his tireless efforts, he was missing out on many smaller planets, which were the key to our capture zone strategy. He needed tools that would automate the process, so Cha0sg0d, I, and the rest of our technical team set to work building three key plugins.

Cha0sg0d designed our first plugin, Crawl Capture Zones. After the user selected a source planet and capture zone, the plugin would automatically find all the planets within the capture zone and simultaneously move to all of them. I built the next one, Bulk Abandon, with optimization from MJ. This plugin would automatically find the ten smallest planets in our empire (that didn’t need to be invaded or captured) and instantly abandon all of them. This plugin kept our space junk from maxing out. Finally, Modukon built an automatic Invade and Capture plugin that would find all planets in our empire that hadn’t been invaded or captured and would do so.

For those of you who are interested in our custom client and the plugins we used, the code has been open sourced here. Disclaimer: Our plugins haven’t been used since late February and might require some testing before use.

Our Crawl Capture plugin in action

With these three brilliant plugins at our disposal, we watched our score start to skyrocket, scoring 20–30 million points per hour. Now we could only grind and pray that it was enough to catch Orden. Even as we began slowly approaching them, their huge empire and capturing of large planets allowed them to jump out of our reach as they captured large planets.

It was at this point Velorum and cha0sg0d pulled a legendary series of all-nighters to continually pilot our empire. Any time someone wasn’t piloting Orden would gain on us, so they (along with help from myself and others) worked around the clock to keep earning points.

But would it be enough to catch the mighty Orden? We weren’t sure, which is why we decided to pester them with our secret weapon: the Death Star. Stay tuned to hear the Death Star saga in our final installment.

--

--