Vixen
c7401864
csharp
public sealed class RoundRobinGovernor

A window that walks the population, wide enough to keep everybody inside a stated interval.

Read the guide page for this →

Remarks

Round-robin rather than most-important-first, and doc 34's governor is why. Spending a budget on the most important characters in order gave the first thirty-seven everything and stranded the rest — a plan is not a queue. Here every agent is in the window exactly once per pass, so an agent that misses its slot ticks later rather than never.

⚠ MaximumInterval is a floor, and it outranks the budget. A population that cannot fit inside the interval at the budgeted width gets a wider window and an OverBudget plan, because an agent that reacts eight seconds late is not a saving — it is a bug report about the AI being broken. The budget bounds the ordinary case; the floor bounds the bad one.

Importance is deliberately absent. What matters is a game's to say, and the seam for it is this interface — a distance-LOD governor that widens the window near the player is doc 37's second shipped implementation and lands with perception, where there are positions to read.

Fields and properties (2)

  • public int Budget

    How many agents may think in one tick, in the ordinary case.

  • public int MaximumInterval

    The most ticks an agent may wait for its turn.

Methods (1)

  • public AgentSchedule Plan(long tick, int population)

    Works out this tick's window.

Used by (4)

  • AgentGovernorTestsVixen.Ai.Tests
  • AiSchedulingTestsVixen.Ai.Tests
  • AiSystemVixen.Ai
  • AiSystemTestsVixen.Ai.Tests