Idle behaviour would probably only need data about the nearest chunks and only if a new activity is to be started. Also there is no need to make the biter do idle stuff if nobody is looking - so it only needs to be calculated when the chunk is currently on (or adjacent to chunks beeing) on the screen.ratchetfreak wrote: βTue Nov 13, 2018 5:01 pmYou are forgetting the memory cost of accessing large swaths of the map to make your complex AI decisions.Oktokolo wrote: βTue Nov 13, 2018 12:48 pm Of course would AI cost CPU time - but AI is relatively easy to parallelize and Factorio can't currently fully utilize 8 hyperthreads / 4 cores (wich i consider to be mainstream now). So additional biter AI could come for free (almost as Factorio still needs to get events to the AI and results to the renderer).
The reason to not improve biter AI for 0.17 is probably a todo list overflow.
Factorio is memory access bound.
Other advanced AI could profit from having a highly optimized structure to use for the high-level decision making instead of scanning chunks directly.
A graph of biter bases, player bases and weighted connections between them could be used for detecting whether that biters that are nearby but separated by a lake should bother to react to clouds or not. Such a graph would only need updating on world changes (player uses landfill, destroys cliffs, bases get added or removed).
Rampant uses a scent map for keeping track of a chunk's deadlyness and uses that for attack target decisions.
There is no way, to make the world more believable without using some memory and CPU resources for it. There is no free lunch. But memory footprint of the required state and helper structures could be relatively small. AI also is something that is pretty easy to toggle on and off - by option or when the game detects UPS drops.