Difference between revisions of "Automatic base building"
Line 70: | Line 70: | ||
⚫ | |||
⚫ | Generally, to be all used from 2 source labs, all labs must be placed within 2 tiles of the main center lab. Alternatively, reactions can be chained further distance, with smaller throughput. [[File:Infinilabs.png|left|thumb|100x100px|Labs in a figure 8 or 'infinity' symbol shape, hallway allows pass-though and 2 position filling of all labs]] |
||
Line 78: | Line 76: | ||
+ | |||
+ | |||
⚫ | |||
⚫ | Generally, to be all used from 2 source labs, all labs must be placed within 2 tiles of the main center lab. Alternatively, reactions can be chained further distance, with smaller throughput. [[File:Infinilabs.png|left|thumb|100x100px|Labs in a figure 8 or 'infinity' symbol shape, hallway allows pass-though and 2 position filling of all labs]] |
||
Line 91: | Line 93: | ||
⚫ | |||
⚫ | |||
⚫ | |||
Line 103: | Line 102: | ||
⚫ | |||
⚫ | |||
+ | |||
⚫ | |||
[[File:TowerB.png|left|thumb|112x112px|A Hallway style tile single-fill tower cluster.]] |
[[File:TowerB.png|left|thumb|112x112px|A Hallway style tile single-fill tower cluster.]] |
||
+ | |||
Revision as of 15:57, 21 April 2021
Automatic base building is the process of finding, claiming and, building up a claimed room without using the UI and direct user input. For many fully a fully automatic bot is the end-goal and automatic base building is a large step.
Types
There's a few types of automatic bases, depending on method used.
Bunker
The easiest by far is to have a pre-defined 'bunker' containing all structures you are intent on using and simply finding an open area to place it. The 'center' of the bunker acts as an anchor and from there you can generate the structures of your pre-determined bunker based on their relative position to the anchor. As long as the space is there, there should be no conflicts in the generation.
Stamp/Tile-sets
Normally using a core tile/stamp, you can then determine locations for other pre-defined tile-sets/stamps to be placed around your anchor dependent on the terrain in the room. This allows for a bit more flexibility in rooms that do not have large-open spaces that bunkers can not fit in, while still allowing for already designed and known-to-work types of tiles insuring for example, that labs are in-range of other labs for reactions, extensions are in reachable and manageable locations, spawns have open area for creeps to exit, and so on.
Extensions
Extension 'field' or groups come in many different shapes and sizes, and can be one-set, or many smaller tiles.
Labs
Generally, to be all used from 2 source labs, all labs must be placed within 2 tiles of the main center lab. Alternatively, reactions can be chained further distance, with smaller throughput.
Towers
Towers do not 'have to' be clustered in one spot, while it does make them easier to fill, it means they are also averaged damage from location.
Anchor & central fill clusters
An 'anchor' or center fill location is a location for buildings that can take 1+ creeps to manage and can be relatively small / have the rest of the base planned around.
Dynamic/Pattern Generation
Using a given open area, you can generate a structure or set of structures grouped together based on some basic rules. Some examples would include generating extension fields for one or more fillers to fill, calculating the best position for towers to sit for maximum damage on walls (instead of in a tight fill-group pattern), and so on.
Useful Algorithms
There are several useful algorithms to take into consideration when automatically building your base.
Distance-Transform
Using the Screep's terrain, you can use Distance Transformation to have natural walls be barrier pixels and swamps/plains to be allowed. Using this, you can then create a matrix/object/array of all positions with a score of how much open space is available around a given roomPosition. This is direly useful to know how much you can fit in an area, without having user input.
Flood Fill
Flood Fill is useful for defining or testing areas to make sure they are secure (like walls around a base) or defining areas into groups. Filling an area and gathering room positions allows you to use these positions later, for whatever purpose you see fit.
Minimum Cut
Minimum Cut is useful for well sized rampart & wall placment.