Steamhammer’s resource box
I continue to prepare Steamhammer for CIG as best I can in the short time since I relaid my plans. I had to abandon 2 more ambitious changes when they busted their time boxes, but my log shows about 20 minor improvements. Each one helps in some situations—probably. Nothing is as well tested as it should be. Steamhammer does do better against some test opponents. I think that overall the improvement is definite though not great, and I have a little time left.
MicroDK mentioned somewhere (maybe it was in Microwave’s update note?) that Arrakhammer fixed a problem in the resource box used to avoid placing buildings in the mineral line. Steamhammer loves to manner its own minerals and gas (that means putting buildings in the way so they interfere with mining), but fixing it had never come to the top of my queue. Today I decided it was the issue with the best effort/payoff ratio.
Oh wow, this code inherited from UAlbertaBot is not at all good for Steamhammer! It calculates a single rectangle “avoid placing buildings here” for the main base minerals. It pays no attention to the gas geyser or to other bases. It was good enough for UAlbertaBot, which barely expands and doesn’t build much, but not so for Steamhammer.
My fix is similar in idea to Arrak’s, though my implementation looks completely different. I did away with the single-purpose resource box and relied on the more general building tile reservation map. I marked certain tiles near the minerals and geyser as reserved, so that nothing can be built there. For the geyser, I was careful to reserve the adjacent clockwise tiles which cause gas mining workers to take long paths around, and I tried to leave other tiles alone. For example, if the gas is straight up from the hatchery, then a building in front of the extractor on the left looks as though it should be in the way, but doesn’t interfere with mining. A building touching on the right, even at the corner, can cause bizarre paths for a drone leaving the extractor. There are some tricky cases of diagonally placed geysers where Steamhammer reserves too many tiles, but it’s not harmful.
Looking at the pattern of reserved tiles for different bases, I was able to spot one case where theoretically Steamhammer might be able to manner its minerals. But I couldn’t get it to happen in practice. This should completely fix an irritating problem.
I’ll release Steamhammer 1.4.5 after CIG submission closes. It’s a change of plans; I decided there was no reason not to.
Comments
MicroDK on :
Jay Scott on :