Vixen
caa30e12
csharp
public interface IFactorSource

How many factors a candidate has, and what each of them reads.

Read the guide page for this →

Remarks

⚠ A struct with a generic constraint rather than an interface reference, so the loop devirtualises and nothing is allocated to score a candidate. A utility agent scores a handful of actions five times a second; an environment query scores every factor of every generated point, of which there may be hundreds. One boxed reader per point per query would be an allocation in the middle of the frame the whole design exists to avoid.

A factor is already normalised and already through its curve: it is in [0,1], and zero is a veto.

Fields and properties (1)

  • int Count

    How many factors there are.

Methods (1)

  • float Factor(int index)

    Reads one, in [0,1].

Used by (4)

  • CandidateScoringVixen.Ai
  • FactorSpanVixen.Ai
  • FactorsVixen.Ai
  • SeamTestsVixen.Ai.Nodes.Tests