Vixen
c7401864
csharp
public sealed class SensorSet

Every sensor a world's agents read through, and the pass that runs them: globals once, locals per agent.

Read the guide page for this →

Remarks

Doc 37 § D13's four kinds, and the pass is where the taxonomy pays for itself. A global sensor runs once and its answer is written to every agent's board; a local one runs per agent. For "is it night" over a thousand villagers that is one query against a thousand, which is the entire reason the split exists.

⚠ A global's answer is cached at Begin and never re-read. An agent late in the pass must see the same night as one early in it — a sensor asked per agent would let the clock advance mid-pass and give two agents standing beside each other different weather, which is the class of bug nobody looks for.

⚠ Sensors write keys; they do not decide anything. A sensor that chose an action would be a planner, and the whole arrangement of this library is that there are exactly three of those. What a sensor is for is making the world sayable on a blackboard, so that a tree's decorator, a utility set's consideration and a GOAP domain's world key all read one number that was measured once.

Fields and properties (3)

  • public int LocalCount

    How many sensors run per agent.

  • public int GlobalCount

    How many run once a pass.

  • public int Passes

    How many times Begin has run the globals.

Methods (8)

Used by (3)

  • AiSystemVixen.Ai
  • SeamTestsVixen.Ai.Nodes.Tests
  • VillageVixen.Ai.Nodes.Tests