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.
Comments
Antiga / Iruian on :
Jay Scott on :
Dan on :
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 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 :
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 :
Marian on :
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.