Ever get that feeling playing SC2 where you know something bad is about to happen?
When your stomach tightens because the enemy’s expansion is missing, the gas timing is too late, and your brain screams, “cheese is coming!”. That’s intuition, the kind of thing the pros live by, and the kind of thing I’ve been trying to teach a bot.
But what’s actually happening under that instinct? The mind is a pattern-recognition machine, and like any machine, there’s calculations behind it.
I wanted to turn that into a bot’s policy.
Let me share what I learned.
🛠️ In the Workshop
PiG_Bot: Fixed a bug where Disruptor’s novas weren’t updating every step to get the right target. Now we can watch squishy bots go splat 😈
Are you a member and want your bot update featured in the workshop section? Shoot me a message
Making Good Policy
Imagine you’re playing and you arrive at the opponent’s base at 1:35 in game time, and take in the information that the Spawning Pool is 70% done. Is the opponent rushing?
Your intuition says so because you know a Spawning Pool is one signal, but you don’t want to overreact, so you get more information and find your opponent has no expansion and has very few workers. Now you’re 100% sure and change up your actions.
True or false signals that add up to confidence to take action. That’ll be our bot’s policy
Many bot makers use behaviour trees to set policy:
If Spawning Pool -> Then build defense.
But as you add more signals: How many drones at 1:00? Is there an expansion or not? Is there Gas?, etc etc,
It ends up being too rigid and hard to maintain as the signals grow.
Weighted Approach
During a chat with Mindme, the maker of Top Bot NegativeZero, he mentioned how he uses a weighted evaluation table — basically a decision matrix — to help the bot rank what it sees. chef’s kiss 😍
Think of it as giving your bot a way to weigh clues. The more evidence piles up, the higher the total confidence, like humans do subconsciously.
Example table of signals that add up to 1 to trigger a response
Your accuracy comes down to:
How good your signals are and how reliably your bot can see them
How you score those signals
How you weight them against each other
Tweak those over time, feed it more feedback, and suddenly your bot starts to look like it’s thinking.
My Experiments
I’ll be testing using machine learning to bridge further the gap between rigid, hard‑coded policies and something closer to adaptive intuition
Using a scikit-learn model to help identify Zerg rushes more precisely. The hardest part is wrangling replay data , I’m looking at SC2 Reader and a promising community project, SC2 Replay Toolbox. Both could turn match data into intuition fuel.
🗒️ ./run Weekly Challenge:
Create a policy that detects one or more of the following before the final signal:
LaughNGamez gave PiG_Bot some screen time this week. It’s still rough around the edges — I just fixed the disruptor targeting system — but you can really see the progress.