archive by month
Skip to content

basic strategy reasoning

Bots are strangely ignorant of strategy. The strategies they follow are mostly hand-coded plans and rules. Other skills that look strategic are largely, it seems to me, not due to strategy knowledge but to the working of lower-level skills.

Many bots know how to counter the enemy’s unit mix. In Steamhammer that’s called “strategy”, but it’s a generous term. Do any bots know about high-level plans and recognize which ones are effective? Possibly Krasi0, whose mechanisms are secret. Often there is a simple method like “I’m killing more than I’m losing, I should keep this up” versus “I’m losing too much, let’s try the next option.” Killerbot by Marian Devecka appears to be pretty good at that, it’s also generous to call it strategy.

When to keep the pressure on and when to step back and consolidate is a basic strategy decision. When one of Steamhammer’s pressure openings has broken through, Steamhammer has no idea that it can win quickly by keeping the pressure on. It has cut drones in its build, and it wants to shore up its economy, and that can give a stubborn opponent a chance to stay in the game—in a longer game, maybe Steamhammer will mess up and lose. To be sure, it can be a delicate judgment: It you have a decisive advantage, be decisive; if you have a modest advantage, getting ahead in economy is a way to keep your advantage.

Bots commonly have a virtually fixed level of aggression. When it comes to army movements, Steamhammer believes in keeping its units as forward as possible, and it has company. Many other bots build up and then move out for a timing attack; XIMP by Tomas Vajda and LetaBot by Martin Rooijackers are big examples, but it’s common to many other bots. I think the timing is usually fixed or decided by simple rules.

There’s nothing wrong with a timing attack at a good timing, but if it doesn’t win outright then you have to follow up. You need a strategy for the rest of the game. One of the basic tenets of strategy is that it is advantageous to defend a fixed position: You can siege tanks, build cannons, burrow lurkers, take high ground, form a concave, position units to hit a bridge, and so on. Conversely, it is advantageous to attack an enemy that is on the move or otherwise out of a strong defensive position. Many bots use this principle when they try to contain the enemy. I believe they have scope to use it more deeply.

Another basic is that more resources are better. Bots follow that principle too: They like to take bases for themselves and destroy enemy bases, they like to make workers and to kill enemy workers. So here are 2 simple principles that bots know—yet I don’t notice any bot that seems to understand how the principles interact. A constant level of aggression is not correct. If you are ahead in resources and army, what you want to do is prevent enemy action while you increase your lead. If you keep harassment losses down and prevent the enemy from expanding, while you can expand yourself, then you are on the road to winning. Containing the enemy is only one way. You can also scout and react to enemy attempts to expand or move out. Use both principles together: Let the enemy move out of their defensive position, and strike them while they are weaker. I haven’t seen a bot do that. Before you switch into frontal attack, wait until you are maxed, maybe even until the enemy is mined out. You are winning, there is no hurry!

If you’re behind, you might try to safely extend your defensive position to another base so you can expand (a natural plan for terran). Or you might try harass your way back to a good position. In any case, you have to fight more efficiently to have a chance.

I think this kind of strategic play should emerge naturally in a bot which does sufficiently faithful tactical analysis. No actual strategy reasoning should be needed. I also expect that there are quicker ways to start getting the capability. I’m seriously considering whether and how to get some high-level strategy decisions in for AIIDE. Steamhammer is far too willing to beat its head against a wall when it should step back and wait.

Trackbacks

No Trackbacks

Comments

Antiga / Iruian on :

I think Purplewave is an interesting example, where almost every opening regardless of how chessy attaches to a midgame and a lategame plan, so it doesn't get stuck as much on unit mixes and stop progressing like many other bots.

Jay Scott on :

It is interesting, yes, and there are definite advantages. In Steamhammer, I have followed the opposite principle that after the opening, the bot should figure out its plan by itself, with no further hints. So far, it leaves play more stereotyped and limited. My theory is that in the long run, it will help Steamhammer get smarter faster.

Dan on :

Marian may chime in here, but my take on Killerbot's tech transitions is that they're all based on fairly fixed conditions of either the bot or its opponent, ie. in ZvP going 2 Hatch Muta or 5 Hatch Hydra depending on whether the opponent is opening with FE; and then, if opening 2 Hatch Muta, switching from Muta-Ling to Hydralisks when it takes a third base.

And frankly, I think that's in most cases better than "change when something isn't working" because although the latter is more adaptable, it relies on having already failed to switch. You want to switch before failing! So once again the onus falls on the author to correctly identify conditions for transitions.

Actually I think McRave has the only example I can think of in outcome-based decisionmaking, where once upon a time (perhaps no longer) his combat hysteresis increased as his units died, ie. the loss of units in combat by either side compelled him to fight longer, avoiding the waffling issues common to bots (but also being very all-in).

McRave on :

I think you're right on Killerbot here, his ZvP is 2 hatch muta or 5 hatch hydra. I haven't seen him transition off the 2 hatch muta because either bot was dead by then.

I did scrap the unit death padding when I changed my combat sim. I may look into adding it again, as it was kind of a unique perspective, but required some deeper assessment and usage:

1) Losing 1-2 more Goons than my opponent in an early game PvP caused my units to be hesitant to re-engage. Is this right? Depending on the build, it could be wrong or right.

2) Killing 1-2 more Goons in the same situation, my units may suicide for workers. Again, is this right?

It needed more information, such as enemy build vs my build. I liked it because it tried to negate human error in how I calculate the strength of units. On a units death, I would feed that value as an opposing force with a descending value over time. Regardless of the arbitrary value I chose to represent a units strength, it's a 1:1 exchange.

Part of what I struggled with was bleeding too many units and not regrouping when I came out ahead. Maybe it's a good idea to assess only my own units lost, maybe it's better to only use it for early game engagements. There's probably a better usage for this concept, but I think it would be beneficial to incorporate it for specific matchups.

Marian on :

Yes the transitions that I use are quite simple conditions.
There is a class called Strategy(indeed a generous name) that detects several hard coded conditions each frame. Each build than can decide to use one of these values to transition from one build to another.
Since the build steps are { unit/tech/upgrade, total count, arbitrary condition } it is very easy to switch build and change plan.
For ZvP the basic builds are muta+ling and mass hydras, if FE is detected than extra base is taken. There are several conditions in place to determine whether hydras or mutas are used and they can be switched at any point.
New conditions or builds can be actually added with ease and I personally believe this is the strongest part of my bot. Unit control/tactical decision making is likely the weakest.

Dan on :

I've actually always admired how your micro is focused on the skills that matter most. There's no fancy kiting or dodging, but your units fight decisively and are rarely wasted.

Marian on :

I guess I'm always more critical about my "child".
As I'm not very happy about how mutas usually behave and dragoon micro causes my hydras to be very undecisive(e.g. vs Locutus). Maybe a move attack micro suggested in one of the recent blogs would help here.
On the other hand I am quite happy with lurkers and drones.

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options

Submitted comments will be subject to moderation before being displayed.