Artificial Intelligence in KaM Remake
- AI consists of 2 big pieces - Mayor (entity that build town and trains citizens) and General (entity that does defenses and army command).
- Mayor is flexibly scripted to build houses in certain order and counts, but they do depend on AI settings and situation
- Mayor has a CityPlanner module by its command. This module receives request to find a place for house and pics the best spot (somewhat randomly)
- AI is planned to have a set of random properties (they will be scriptable) that determine its character (Strong, Wood/Iron warfare, Speed, Defensive/Offensive). In next demo they will be assigned randomly - so each AI can be quite different from the other.
- AI will cheat, but the cheating will be scriptable as well. At minimum level AI will cheat only to avoid stucking without stone to build Quarry for example. At highest cheat level - AI will have just unlimited resources and stamp out armies
- General first impulse will be to set up defenses (although it can be an option later on, maybe rusher AI is fun too)
- To build defences General needs to find best places for them. Best tactic here is to defend at narrow passages.
- Passages will be found by using NavMesh. Building NavMesh over KaM maps is work-in-progress now ..
Ideal defense places are marked on this map by hand. Note that they all go between natural obstacles:
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de