EQS places a cheap filter as the last step of a query when using auto-sort for single item results if there is only one filter.
Found via [Link Removed] which is quoted below:
Environmental Query system (EnvQuerySystem) not running all filters before scoring. According to the documentation: https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/EQS/EQSNodeReference/EQSNodeReferenceTests/ "Filtering is done before scoring to avoid calculating the score on filtered out items." But in changelist: https://github.com/EpicGames/UnrealEngine/commit/4f632f9aeaededbad3217c16ea8f363b4ab12a3c#diff-4ee0472dc63aa767380b5e[…]0197051d5317a28987475229b453 The code was changed to run trying to run the most expensive filter last after scoring (the changelist says its fixing jira ticket (jira UE-69990), but I dont think there is any way for me to get visibility into that issue). In our game we have some eqs that look as follows: GenerateActorsOfClass. GameplayTagFilter (cost low) PathfindingScore (cost high) When auto sorting is enabled, the order of tests becomes PathfindingScore (cost high) GameplayTagFilter (cost low) Because there is only one filter and the code now has no consideration for cost of scoring. I've solved it in the short term by authoring the eqs as: PathfindingScore (cost high) GameplayTagFilter (cost low) GameplayTagFilter (cost low) So the ordering becomes: GameplayTagFilter (cost low) PathfindingScore (cost high) GameplayTagFilter (cost low) But that is less than ideal because it requires custom eqs authoring and its wasted work. It would be useful to understand the original bug that was trying to be solved, and then we can author code to support both cases (probably by not setting a HighestFilterCost if all the filtering costs are low).
[Link Removed] that was used as basis for [Link Removed].
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-137553 in the post.
0 |
Component | UE - AI - EQS |
---|---|
Affects Versions | 4.25plus |
Target Fix | 5.3 |
Created | Dec 14, 2021 |
---|---|
Resolved | Oct 3, 2022 |
Updated | Aug 21, 2023 |