Enhance AI Decision-Making with Environment Query System (EQS)

Enhance AI Decision-Making with Environment Query System (EQS)

Table of Contents

  • Introduction
  • What is Environment Query System (EQS)?
  • Items in EQS
  • Useful Scripts in EQS
  • Useful Objects in EQS
  • Main Sentence of EQS
  • Tests in EQS
  • Common Test Settings
  • Main Tests in EQS
  • Useful Notes in EQS
  • Example: Creating an EQS
  • Conclusion

Introduction

In today's article, we are going to talk about the Environment Query System (EQS). EQS is a system that allows AI characters to receive information about their surroundings. It is a powerful tool that can be used to enhance the logic and decision-making capabilities of AI characters in a Game environment. EQS can help AI characters find the most suitable items or locations based on various criteria.

What is Environment Query System (EQS)?

The Environment Query System, also known as EQS, is a system that enables AI characters to Gather information about their environment. It provides a framework for defining and running tests on items in a game environment, allowing AI characters to make informed decisions based on their surroundings. EQS uses a series of tests to evaluate the suitability of items and select the most appropriate ones for a given situation.

Items in EQS

In EQS, items are objects that cover specific areas in the game environment. These items have a weight and their color indicates their weight. EQS runs a series of tests to determine the most suitable items based on their weight. By varying the density of items and their distribution, EQS can provide AI characters with a range of options to choose from.

Useful Scripts in EQS

One of the most useful scripts in EQS is EQS Tester. This script allows visualizing EQS items in the editor and makes it easier to create queries. By adding EQS Tester to a game object, it becomes a querier, allowing AI characters to make queries about their environment.

Useful Objects in EQS

Another important object in EQS is the Environment Query. This scriptable object holds EQS settings and can be attached to the EQS Tester script as a field. The Environment Query object allows for the customization of EQS parameters and helps define the behavior of AI characters based on their environment.

Main Sentence of the Environment Query (EQ)

The main sentence of the Environment Query defines the Shape of the EQS area and the spacing between items. It allows for the variation of item density and distribution. Additionally, the main sentence defines the Trace mode, which determines whether EQS should be attached to Navmesh or a layer to exclude unwanted objects from EQS queries.

Tests in EQS

Tests are checks that items in EQS have to pass to be considered suitable for a given situation. EQS can run multiple tests to evaluate the suitability of items. Tests in EQS determine the weight of an item, filter items, or perform both weight calculation and item filtering.

Common Test Settings

In EQS, there are several common test settings that can be configured based on the desired behavior. The test purpose setting defines whether a test affects an item's weight, filters items, or does both. Score settings specify the operations used to calculate an item's weight. The filter setting defines the range of allowed values for an item based on its weight.

Main Tests in EQS

There are several main tests in EQS that can be used to evaluate the suitability of items. The distance test checks the distance from an item to a specified target. The has path test checks if there is a path between two specified points. The slope test checks the slope angle of an area, which can be useful for defining climbable terrain. The overlap test checks if an item is overlapped by a selected geometric shape, such as a sphere or a cube. The trace test checks the visibility zone by performing an array cast from the query to items and checking for any intersections.

Useful Notes in EQS

EQS is a part of the AI tree and can be accessed through nodes. The "Run EQS Query" node allows AI characters to run EQS queries and specify which EQ object to use. By using this node, AI characters can make informed decisions based on their surroundings and the information retrieved from EQS.

Example: Creating an EQS

Now that we have covered the basic concepts of EQS, let's create an example. In our example, we have an AI Character that needs to find a target while avoiding obstacles. By using EQS, we can improve the logic of our AI character and make it more efficient in finding the target.

Conclusion

EQS is a powerful tool that can enhance the decision-making capabilities of AI characters in a game environment. By utilizing EQS, AI characters can gather information about their surroundings and make informed decisions based on their environment. With the ability to run tests on items and evaluate their suitability, EQS opens up new possibilities for creating intelligent and dynamic AI behavior.

Most people like

Find AI tools in Toolify

Join TOOLIFY to find the ai tools

Get started

Sign Up
App rating
4.9
AI Tools
20k+
Trusted Users
5000+
No complicated
No difficulty
Free forever
Browse More Content