How it works - Ai production priorization

Post Reply
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

How it works - Ai production priorization

Post by Stratego (dev) »

related to \viewtopic.php?f=218&t=9482 topic i opened here to show the AI production priorizations

Here is the list of steps that a factory (eg. TC) does when determining its next production:

stage 1. TASKS: get production based on tasks (most important - not yet fulfulled (by living units) - tasks first)
-> in general it produces units for the given task (only tasks that were not taken by already produced units(!) eg. attack. or heal, or occupy tasks)
-> in case of Attack task it checks if it can upgarde* the given unit type - so it is possible to get a unit upgrade instead of unit itself for the same unit if that would be trained in same factory.
stage 2. DEFAULT Productions: IF NO any production from above stages (eg. a blaksmith building that trains nothing else than techs) than check the default techs (if there any tech set will be selected to produce)
stage 3. AI determines techs: IF NO any production from above stages than will try to figure out an upgrade* or a buff tech (property changer - eg. +1 range to all archers) tech based on the AI player actual Army
stage 4. Any buildable random anything: IF still NO any production from above stages it will select a random producable anything (unit/tech)


(*in all above cases only HARD AI will invent upgrade and prop changer techs, easy AI will not go that way)
Post Reply

Return to “Ao* Engine Knowledge base”