Scout, Scout, Scout
Bot responses only get better with more information, not less.
One tiny scout — one worker — could have changed the whole match. Storing what it sees, checking if there’s no expansion at the natural base less than three minutes in, could flag that something funny’s going on and trigger a code response.
Cancel That
When a building is under construction and starts taking damage, coding a function to cancel the building when it drops below 10% HP can reclaim precious minerals your bot can use for a response. It could be the difference between getting that defensive unit out or hitting the loss screen.
Flexible Build
“What should it build next?” is one of those choices bot makers get tripped up on because you don’t play the game yourself. “Just build a little of everything” might seem like a good default, but telling your bot to walk blindly down tech tree paths can leave it wide open.
Code in build orders that produce an army able to handle most race matchups but that stay flexible enough to respond. You can find good ones on Spawning Tool by searching for economic builds with your bot’s race letter (Protoss, Zerg, Terran) vs X. Example: “P v X” means Protoss vs all races. Or use a Bronze to GM build, like this Terran one from PiG.
Play the opening right, and you won’t have to hack in a dozen edge-case patches later.