public static class PerceptionInputsWhat an agent's senses say, as a utility consideration and as a sensor.
Remarks
doc 37 § Part 4's ⚠ on IUtilityInput: a perceived count is Vixen.Ai.Perception's, because Vixen.Ai may not see a sense. It is the second implementation of that seam that is not a delegate and not a blackboard key — which is the point of the rule, since a seam whose only implementations read a key is a seam shaped like a key.
⚠ An input is normalised and a sensor is not. "Three of them" is what a blackboard key wants and "0.6 of the most I care about" is what a curve wants, so the same question has two front ends: PerceivedCount for a consideration and CountSensor for a key. Normalising in the sensor would make the key useless to a GOAP condition, which counts.
Methods (4)
public static IUtilityInput PerceivedCount(PerceptionSystem perception, SenseMask senses = All, int most = 4)How many things an agent currently senses, as a fraction of a maximum.
public static IUtilityInput NearestPerceived(PerceptionSystem perception, SenseMask senses = Sight, float range = 20)How far the nearest currently-sensed thing is, as a fraction of a range.
public static ILocalWorldSensor CountSensor(PerceptionSystem perception, SenseMask senses = All)How many things an agent senses, as a count on a numeric key.
public static ITargetSensor NearestSensor(PerceptionSystem perception, SenseMask senses = Sight, bool currentOnly = true)The nearest thing an agent senses, as a place and a thing.
Used by (2)
- SeamTestsVixen.Ai.Nodes.Tests
- VillageVixen.Ai.Nodes.Tests