AI or artificial intelligence is the "mind" which controls CPU players in Glest. AI in Glest is rule based, following a set of rules at intervals.
Ruleset[]
Rule name | Interval | Function |
---|---|---|
AiRuleWorkerHarvest | 2s | Finds an idle harvester unit and tells it to harvest a resource. |
AiRuleRefreshHarvester | 20s | Finds a harvester that is harvesting and re-assigns it to harvest a resource based on new priorities. |
AiRuleScoutPatrol | 10s | If there are a minimum of 8 fighting units, send a unit out to scout the map (one of the other players start location). |
AiRuleUnBlock | 3s | If there are blocked units (units that are surrounded by other units) then tell units surrounded the blocked unit(s) to move away. |
AiRuleReturnBase | 5s | If there are idle units send them back to the base. |
AiRuleMassiveAttack | 1s | If there are enemies in the sight of the AI player and the AI players base has at least 8 fighting units; then attack enemies anywhere on the map. If the AI players base has less than 8 fighting units, attack enemies within 25 cells of the base first. |
AiRuleAddTasks (CPU Mega) | 5s | If there are no existing tasks queued or there are less than 4 worker units try to add one of the following tasks (in priority order shown below): 1. If there are less than 4 worker units, produce more workers.
|
AiRuleAddTasks (CPU Easy) | 5s | If there are no existing tasks queued or there are less than 4 worker units try to add one of the following tasks (in priority order shown below): 1. If there are less than 4 worker units, produce more workers.
|
AiRuleAddTasks (other difficulties) | 5s | If there are no existing tasks queued or there are less than 4 worker units try to add one of the following tasks (in priority order shown below): 1. If there are less than 4 worker units, produce more workers.
|
AiRuleProduceResourceProducer | 5s + 60s | If the faction uses a resource on the map and it is consumable and we have < 0 produce a harvester for that resource. If the faction uses a resource on the map and it is static and we have < 20 produce a harvester for that resource. |
AiRuleBuildOneFarm | 10s | Find a unit that can produce a unit which has resource cost for a consumable resource if we have none of them (eg, need at least 1 farm). |
AiRuleProduce | 2s | If we have a queued task to produce something, then this command will decide exactly what should be produced. |
AiRuleBuild | 2s | What this rule does: If we have a queued task to build something, then this command will decide exactly what should be built. |
AiRuleUpgrade | 2s | If we have a queued task to upgrade something, then this command will decide exactly what should be upgraded. |
AiRuleExpand | 30s | If there are resources on the map used by the faction and we have 'seen' that resource, expand close to that resource, otherwise send scout to look for resources |
AiRuleRepair | 10s | If we have a damaged 'base', and we have units that can repair it, then send them to repair the base. Otherwise just look for the first damaged unit and try to repair it. |