REVISITING ENVIRONMENT QUERY SYSTEM
12.10.2021 23:11
[1. Информационные системы и технологии]
Автор: Vash Y., postgraduate, department assistant, Department of software systems, Uzhhorod National University, Uzhhorod;
Rol M., assistant, Department of software systems, Uzhhorod National University, Uzhhorod
The AI systems in modern games requires useful features and tools from the game engine software. There are many architectural patterns and algorithms to solve variety of AI-related problems, like: FSM, Behavior Tree, Path finding algorithms. Modern games require realistic agent behavior which tends to inventing new features. Such feature was made by Epic Games in Unreal Engine 4 [1] called Environment Query System (EQS) [2].
Environment Query System solve problem of collecting, filtering and scoring information about environment around the AI agent. EQS consists of few based abstractions: generators, tests and contexts.
Generators represent logic that has set of rules which collect data in certain area. For example, generators can provide points around fixed locations sorted in grid or circle. Generators can apply additional logic (pre-pass filtering) to provide list of locations that meets the requirements.
Test, in case of EQS, represent a simple rule which can determine the score of the location (or object) in environment. For example, there are distance tests which provide score to certain location or object within the environment to decide how far location is, or is the location beyond certain distance threshold. There are variety of tests inside Unreal Engine 4 EQS system like: distance, trace, project, dot, overlap, pathfinding. Test can contain information about curve which will be used to determine score for each location, minimum and maximum values which will be considered inside scoring algorithm. Additionally, each test can have purpose option which indicates the algorithm of processing the location or object. For instance, the same distance test can evaluate locations closer to context or filter out all location that will be beyond certain distance value.
Context in terms of EQS represent set of data which describes the certain location, actor or set of locations and actors. Contexts are used inside both generators and tests to provide additional parameters. For example, context of the trace test provides information about trace start location. It can be represented by actor (game player or AI agent) or specified location vector.
Each EQS query requires Querier context that represent caller or initial data for EQS generators. Additionally, each EQS query can return single best matching result, all results or specific percent of success results. By default, return values describes in vector or object data types.
Environment Query System provides high-quality mechanism to gather information about surroundings and objects, pick useful data which can be used to help make more clear and dynamic behavior logic in general. Unreal Engine 4 have strong integration of EQS with Behavior Trees [3] and EQS editor with graphics user interface to increase programming and debugging speed.
References:
1. Unreal Engine 4 Documentation – [Electronic Resource] – Access mode: https://docs.unrealengine.com/en-US/index.html
2. Environment Query System – [Electronic Resource] – Access mode: https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/ArtificialIntelligence/EQS/
3. Behaviour Tree Overview – [Electronic Resource] – Access mode: https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/ArtificialIntelligence/BehaviorTrees/