Skip to content

MEx building issue when metal spot is occupied by non-metal extractor #32

@merijnvdk

Description

@merijnvdk

This problem is most clearly observed when playing the infamous plains and passes map ;).

Plains and passes is a map with very small extractor radius combined with slightly bigger metal spots. In fact the extractor radius is smaller than the mex building footprint. What happens is the metal spot detection algorithm detects several (mex) spots close to each other around each metal spot. This in itself is not a problem. However when the bot starts building mexes, it cannot build them as close to eachother as suggested by the metal spot list. As a result the bot places the mine as close as possible to the requested location. But due to the small extractor range, this means it actually builds completely off spot (because it cant build closer). And when requesting the next nearest metal spot, this same spot will be returned (because it is closest and because no mex covers the spot). As a result it will continue to build bigger and bigger circles of mexes around this spot.

In this map the problem is offcource caused by the small extractor radius compared to the mex footprint and metal spot size. However, this same issue could conceivably arise if something else covers access to a metal spot. Most likely to happen on maps with small extractor radiuses.

I have a possible solution for this problem. Currently, when a mex is completed, its location is stored in the takenmexes map. For this the actual location of the mex is used. If instead of the actual location, the requested location (as from metal map) is stored, then the problem on plains and passes ceases to exist (I tested this). It now builds only one mex for every metalmap spot, and if it is not able to cover the spot, then he builds a mine off-spot, but at least he doesnt keep trying that one spot he cannot reach.

slogic: title is updated (original was "Mex spot detection/building can mess up when area is occupied")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions