on a nexus looking

signals your bot is ready to expand

Oct 2nd 2025

Why hello Reader,

How do players like Serral, Dark, or Maru know when to take a 4th base? That question hit me while watching PiG_Bot’s latest replay when it got into a new ladder division. After its build order, it tried to expand right when it was under attack 😖. Rekt… but it showed that the simple worker saturation check I started with just wasn’t cutting it anymore. So what signals do the best players rely on before expanding, and how can we translate those into something our bots can use?

🔁 In Case You Missed It

video preview

I Coded the Safest Path Through Hell

I challenged myself to code a StarCraft II probe that can’t die. Instead of repeating the same mistakes, this bot learns from every failure—using pathfinding, heatmaps, and a little simulated memory—to survive an obstacle course full of danger.

Will it figure out the safest path… or die trying?

“Make sure you don’t get into a situation where you have a bad economy and you can’t macro.”
– Day[9]

You can’t micro your way out of a bad economy. When human players are deciding to expand, they’re basically weighing three questions:

Do I have enough income for the army I want?

Idle production time is a clear signal bot.state.score.idle_production_time tells you the total time any structure capable of producing a unit is sitting idle. Long idle times mean your bot doesn’t have the resources to spend effectively.

Am I running out of available resources?

A quick and dirty way to check is comparing workers to mineral patches. Once you’ve got more than two workers per patch, it usually means some are just waiting around instead of mining. Next, count the fields in range of your base with bot.mineral_field.closer_than(10, townhall) (rule of thumb: 8 at a regular, 6 at a gold). Then check how much is left with .mineral_contents (each field starts at 1500). Repeat the same for gas.

If you want to go deeper, track the collection rate (bot.state.score.collection_rate_minerals + bot.state.score.collection_rate_vespene). A shrinking slope in that curve is your early warning sign that income is about to decline.

Is it safe to expand?

Knowing if it’s safe to expand means your bot needs situational awareness. Start with a simple count: how many bases do you control versus what’s available on the map? Next, look at vision, how much of the map your bot can see. Finally, compare army strength. A combat simulator or checking the enemy’s army value will tell you if you’re ahead enough to defend a new base.

🛠️ In the Workshop

PiG_Bot has moved up in divisions after a refactor on its expansion logic. All your bases belong to us… safely.
Botato is on an upward trend after fixing bunker placement, next to add speedmining and cheese detection.

🗒️ ./run Notes:

What to do now

  • log these signals every couple of steps: idle_production_time, minerals + vespene/mineral collection_rate, mineral_fields_in_range, near_empty_fields, army_value_ratio.
  • compute three booleans: spending, depletion, safety.
  • Logic: Safety first → Resource starvation or Base depletion

Grab the sample code

All those applications and still no interviews?

Let’s fix that.

Pick a time and we’ll go over what’s not working and how to stand out

[Schedule here]

May the Bugs Be Ever In your Favour🪲

Email Preference:
Unsubscribe | Update your profile | 113 Cherry St #92768, Seattle, WA 98104-2205