Candidate chunks are given scores to determine which one of them should be expanded into. This score takes into account various settings noted below. The iteration is over a square region centered around the chunk for which the calculation is done, and includes the central chunk as well. Distances are calculated as Manhattan distance.
The pseudocode algorithm to determine a chunk's score is as follows:
player = 0
for neighbour in all chunks within enemy_building_influence_radius from chunk:
player += number of player buildings on neighbour
* building_coefficient
* neighbouring_chunk_coefficient^distance(chunk, neighbour)
base = 0
for neighbour in all chunk within friendly_base_influence_radius from chunk:
base += num of enemy bases on neighbour
* other_base_coefficient
* neighbouring_base_chunk_coefficient^distance(chunk, neighbour)
score(chunk) = 1 / (1 + player + base)
enabled | :: boolean | Whether enemy expansion is enabled at all. |
Whether enemy expansion is enabled at all. | ||
max_expansion_distance | :: uint | Distance in chunks from the furthest base around to prevent expansions from reaching too far into the player's territory. Defaults to |
Distance in chunks from the furthest base around to prevent expansions from reaching too far into the player's territory. Defaults to | ||
friendly_base_influence_radius | :: uint | Defaults to |
Defaults to | ||
enemy_building_influence_radius | :: uint | Defaults to |
Defaults to | ||
building_coefficient | :: double | Defaults to |
Defaults to | ||
other_base_coefficient | :: double | Defaults to |
Defaults to | ||
neighbouring_chunk_coefficient | :: double | Defaults to |
Defaults to | ||
neighbouring_base_chunk_coefficient | :: double | Defaults to |
Defaults to | ||
max_colliding_tiles_coefficient | :: double | A chunk has to have at most this high of a percentage of unbuildable tiles for it to be considered a candidate to avoid chunks full of water as candidates. Defaults to |
A chunk has to have at most this high of a percentage of unbuildable tiles for it to be considered a candidate to avoid chunks full of water as candidates. Defaults to | ||
settler_group_min_size | :: uint | The minimum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to |
The minimum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to | ||
settler_group_max_size | :: uint | The maximum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to |
The maximum size of a biter group that goes to build a new base. This is multiplied by the evolution factor. Defaults to | ||
min_expansion_cooldown | :: uint | The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to |
The minimum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to | ||
max_expansion_cooldown | :: uint | The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to |
The maximum time between expansions in ticks. The actual cooldown is adjusted to the current evolution levels. Defaults to |