seeing the creep
It always strikes me as strange when I see a bot pass by unexpected creep and fail to realize what it means. It’s somewhat common: You’re scouting around for enemy zerg bases, perhaps near the end of the game, and units spot creep at the edge of their vision. And... nothing. I’ve even seen large armies bypass a vulnerable base to strike at the defended natural, simply because no actual zerg buildings came into view, only a slice of creep that implied they were there.
Of course, if some bots do recognize creep, it might be hard to notice. I would see a game in which nothing odd happened, instead of a game in which a base was overlooked. Maybe a lot of bots have this skill.
I’ve held off putting creep recognition into Steamhammer because it seemed tricky. What conclusions can you draw when you see creep? Maybe it’s a destroyed base, and the creep is not finished disappearing. Maybe a long string of creep colonies extended creep this far; you have to find the source of the creep to know. Maybe it is neutral creep from a neutral building—that happens on a few maps.
Today I smacked myself in the head, which I knew was made of wood because there’s a solution that makes it easy to draw conclusions: Remember the creep you’ve already seen! Doh! So easy! When you spot new creep on ground that you know used to be bare, it can only have gotten there due to an enemy hatchery or creep colony. Look through the buildings that you know about, and check whether there is one to explain the creep. If not, you have a new scouting goal.
It can’t be neutral creep, because neutral creep spreads before the game starts. It could still be due to a destroyed enemy building, but that will happen mainly when you have just destroyed the enemy building and kept on going, seeing new areas of creep. But even if you make a mistake, the only consequence is that you posted a new scouting goal. You will scout the area, see the disappearing creep, and no further alarms will ring.
BWAPI provides hasCreep() for visible tiles and isExplored() (whether you have ever seen the tile) for all tiles. BWAPI does not provide a way to find out what tiles are covered with neutral creep at the start of the game. Steamhammer has a map of the last frame that each tile was seen, used when exploring for enemy presence, and probably most bots have something similar. Initialize the map of creep to whatever creep you can see from your starting position (likely your own if you are zerg), and fill in the rest of the map with “no creep here”. The rest is obvious.
An alternative is to remember destroyed enemy buildings and use them as potential explanations of any creep you see. That allows mistakes too; you might be late to realize that zerg is rebuilding, because you explained the creep you saw as disappearing creep from a destroyed building.
Of course, you can do better if you have an exact model of how creep spreads and disappears. I’m sure the model could be extracted from OpenBW. It will be more complicated. In principle, you could use detailed knowledge to put tighter constraints on the location and timing of the building generating the creep. It seems like a lot of work for little gain.
I’ve looked into creep recognition before, for early game scouting. See how far zerg creep spreads. I expect that creep colonies spread creep in a way similar to hatcheries. When you see a bit of creep, you can figure out the area that the building generating the creep must be in—and you can probably rule out some of the area immediately, because you can see it is empty.
Comments
Joseph S Huang on :
Marian on :
Probably the easiest algorithm would be to check if scouted creep is near expansion location/mineral patch/geyser.
Usually the zerg base is "packed" enough for this to be true.