archive by month
Skip to content

experience with Steamhammer’s new map analysis

I’ve been trying out Steamhammer’s new map analysis for a while. It’s time to talk about it a little.

When I removed BWTA, the DLL file dropped to less than half its size. BWTA and its dependencies are big. It feels like a burden lifted. When I can get rid of BOSS too, the size will shrink again.

I settled on Zone as the name. The most straightforward replacement of BWTA::Region * is with const Zone *; I kept the pointer representation so I wouldn’t have to redesign any other data structures. Some uses only care about zone IDs and can be slightly simpler (and microscopically faster). Zones don’t have as many features as regions. A zone data structure has only a few fields; I don’t need anything fancy.

Unlike BWTA, there is no separate data structure to represent chokes. If you want to know how choke-like a place is, call the.tileRoom.at(const TilePosition & tile), which looks up the approximate distance between the walls around a given tile (as measured in 8x8 walk tiles, at least in the current version). At a main base entrance, a typical tileRoom is 9; at a natural base entrance, a typical tileRoom is 21; in an open area, tileRoom is much larger. The tile room is calculated at game start from the inset of each walk tile, accessible via the.inset.at(), which is the distance from the walk tile to the nearest unwalkable walk tile (BWEM calls this the “altitude”). The tile room algorithm uses a simple approximation to estimate the room from the inset in one pass.

After dropping BWTA, the first thing I did was run test games on random, mostly large and irregular, Blizzard maps. It was delightful to start up quickly without cached data.

There are still bugs on some maps, affecting the plan recognizer and the scouting worker’s looping path. The scout path needs to be rewritten anyway, it was never very good, but it will take time. I’m not entirely surprised, but still I didn’t realize how closely Steamhammer’s behavior is tuned to the exact regions returned by BWTA.

Still still next: Longer-term Steamhammer plans. Apparently “next” means at some point this year.

Trackbacks

No Trackbacks

Comments

krasi0 on :

It may not seem to be the case right now, but from what you shared, I think that you still have a lot of remaining work on your homegrown TA library. Only time will tell ;)

Jay Scott on :

Agreed. No new features are essential for now, but many new features are on my list as useful.

Barcode on :

I probably missed it somewhere in previous entries about your TA, but what were the reasons for not using BWEM or BWEM-community instead of BWTA/rolling your own?

Jay Scott on :

BWTA is large, clunky, buggy, and has license issues. It has to go. All actively developed bots should aspire to move away from it.

BWEM is good and I could use it. My original reason to avoid it is that it doesn’t do everything I want. I had the idea that it was structurally difficult to extend it as I wanted. Then again, what I have written so far also doesn’t do everything I want yet.

A more objective reason is that a monoculture is limiting. Variety is good in itself. Though I notice that some of my independent decisions are similar to BWEM because BWEM has good ideas.

Maybe the underlying reason is a preference to write it all myself, so all the parts can be custom fitted and optimized for each other. My goal is not the best performance in the short run, but in the long run. Someday I will write a replacement for FAP too, though it will not be a combat simulator as such.

jtolmar on :

What exactly is tile room? Maybe do a post on how it's calculated?

Jay Scott on :

It’s a measure of how wide a choke is—and how wide an open area is. I’ll post details in the new release posts with the change list, probably early next month.

Tully Elliston on :

Useful metric because Zerg want to fight where there is plenty of tilespace, for surrounds.

Jay Scott on :

Distance from the wall useful for micro for all races. You don’t want to get trapped against a wall and unable to retreat—which happens to Steamhammer’s hydras all the time... and its vultures... and its dragoons. You want to catch the circling enemy scout worker: Stay farther from the wall than it is, and you’ll take a shorter path. And other uses.

Tile room is useful more for tactical decisions, and again for all races. Defend a choke and you protect all spaces behind it. When retreating, fall back behind a choke and then make a stand. The tile room tells you how wide the choke is, so you can decide whether your army is the right size to defend it—a small army can’t hold a wide choke, a large army isn’t needed for a narrow choke. On the other side, wide open areas are needed to space out tanks or lurkers, or to surround before engaging, or to place buildings where they don’t interfere with unit flow. There are tons of uses.

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.