public sealed class EnvironmentQueryA list of generators and a list of tests: "where should I stand", answered by scoring candidate points the way a utility set scores candidate actions.
Remarks
Doc 37 § D14, built. Unreal's EQS generates candidate points, runs scored tests over them and takes the best; utility scoring generates candidate actions, runs scored considerations over them and takes the best. Those are the same machine, so this is a IScoredCandidateSet`1 and its scoring goes through CandidateScoring — the same weighted geometric mean, with the same zero rule, as UtilitySet.
⚠ A list asset, not a second node graph. Generators, then tests in order, and no wiring decisions anywhere — which is what Unreal's EQS editor also is, once you look past the fact that it is drawn on a graph canvas: a root with a fixed list of children.
⚠ Cheap tests first is the author's decision and the query honours the order. A filtering test rejects a point and the run stops reading it, so putting a trace above a distance check costs a raycast per point that a subtraction would have thrown away. The editor says so; the runtime does not reorder, because a runtime that reordered would make a query's cost unpredictable and its behaviour depend on a heuristic nobody can see.
Fields and properties (6)
public Symbol NameWhat it is called.
public ReadOnlySpan<IQueryGenerator> GeneratorsWhat makes the candidates.
public ReadOnlySpan<QueryTest> TestsWhat filters and scores them, in order.
public int EstimateHow many points the generators expect to make.
public QueryOrigin LastOriginWhere the last Run was measured from.
public int CandidateCount
Methods (7)
public EnvironmentQuery(Symbol name, IQueryGenerator[] generators, params QueryTest[] tests)Creates a query.
public bool Run(in AgentContext context, in QueryOrigin origin, QueryResults results)Runs it.
public QueryPoint CandidateAt(int index)One of them.
public Symbol CandidateName(int index)What one candidate is called, for a table, an overlay and a diagnostic.
public int FactorsOf(int index)How many factors score one candidate.
public Symbol FactorName(int index, int factor)What one of a candidate's factors is called.
public float ScoreOf(in AgentContext context, int index, Span<float> detail = default(Span<float>))Scores one candidate, and optionally reports every factor it read.
Used by (12)
- EnvironmentQueryLibraryVixen.Ai
- QueryBindingVixen.Ai.Nodes
- QueryContentCompilerVixen.Ai
- QueryContentTestsVixen.Ai.Tests
- QueryPreviewTestsVixen.Ai.Diagnostics.Tests
- QueryRunnerVixen.Ai.Nodes
- QueryScorerExitCriteriaTestsVixen.Ai.Tests
- QueryTestPurposeTestsVixen.Ai.Tests
- RunQueryNodeTestsVixen.Ai.Nodes.Tests
- WorldQueryTestsVixen.Ai.Nodes.Tests
- QueryDocumentVixen.Editor.AssetEditors
- QueryViewVixen.Editor.AssetEditors