archive by month
Skip to content

funny map analysis picture

It turns out there are a lot of ways to calculate regions and chokes. In the course of putting one together, I’ve been doing some other map analysis that should be useful for micro and pathfinding. Here is one that doesn’t work yet, a color-coded debug drawing which is supposed to show the room available around each walk tile: How much space is there for a unit or army to fit into? If you know a path, you can check the tiles to find out which units are small enough to travel the path. Or you can figure out how many of your units fit behind the enemy mineral line—should you go there?

incorrect and funny-looking dot diagram

Unfortunately, it’s no good as it stands. Among other mistakes, it claims there is no room in places where there obviously is. It makes a funny picture, though.

Like BWEM, I also calculate the distance from the nearest unwalkable tile. Iron makes good use of that information. That code worked correctly on the first try....

Trackbacks

No Trackbacks

Comments

Bryan S Weber on :

I've actually got some very crisp code that calculates the space around each minitile and stores it in a 2D-vector "map_veins_". Occupied mini-tiles are marked with a 0. It works, and I honestly don't think it can be optimized much further:

https://github.com/BryanSWeber/CUNYAIModule/blob/master/Map_Inventory.cpp#L344

These were those mysterious map veins my bot kept printing out.

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.