AI Spatial Query & AISense classes

Having done some investigation and asked a few questions here about AI, I think it is fair to say that the AIPerceptionComponent, AISense classes (including helper structs) and AISystem are some what incomplete. They are incomplete in the sense that I can see interfaces and methods available for doing certain things (certainty, GenericTeamID for example), but nothing implements them. Based on this, here are my questions:

  1. Any timeline on the future of the AI system mentioned above? (When will it be more complete and which features are higher priority than others?)
  2. It doesn’t seem to do any spatial queries and instead, it simply allocates all sources into a list. This doesn’t seem efficient when we have a large number of stimuli and so am I missing something or is that something that’s actually missing?
  3. If the answer for No.2 is to use EQS, I would like to know how well does it scale. Ideally I would like some numbers if available such as when N is 10, query goes for 1ms and when N is 100, it is 1.5ms.
  4. If the answers from above indicates that I need to implement my own spatial query (due to I won’t get the update in time or you guys aren’t planning to make such thing for AI), any recommendations and/or suggestions? I am looking for things to look out for, possible incompatibilities.

Thanks!
Oscar

Hey Oscar,

That’s true, we’re not done with PerceptionSystem just yet, but there’s no one actively working on it right now.

Now to address your specific questions:

  1. Clearing up the whole GenericTeamID mechanics is highest priority, but due to limited AI programmers resources it will have to wait at least 6 months. Can’t give you any specific dates on any of generic AI systems.
  2. Um… I’m not sure what you mean. We could use an optimized spatial querying structure to speed up hearing sense for example (and other that broadcast info based on location) but that’s it. PerceptionSystem is for gathering data.
  3. Yes, EQS is the way to go. It scales rather well, but numbers heavily depend on the queries you build. The only way to be certain is to build your own test case. Remember EQS is extremely easy to expand, so if you’re not happy with out-of-the-box generators you can easily implement your own, optimized with game-specific constraints in mind.
  4. I would suggest using EQS as a framework, and expand it by implementing performant tests and generators. In terms of spatial querying octree and kdtree (and other flavors of trees) are usually the way to go. Again, which one to pick depends heavily on specific game’s requirements.

Hope it helps.

Cheers,

–mieszko

Thank you Mieszko :slight_smile: