Expand description
Bounded, renderer-independent perception, decisions and work scheduling. Hosts supply candidates and authoritative occlusion queries. Deferred sight never counts as a fresh sighting; decisions cannot manufacture combat hits.
Structs§
- Candidate
- Cover
Reservation - A value snapshot of an active cover lease, in simulation time.
- Decision
Change - Decision
Edge - First matching edge wins. all/none refer to host-authored sensor bits. None as source matches any state. Matching the current destination holds that state and blocks lower-priority edges without resetting its timer.
- Decision
Edge Explanation - All guard checks for an edge, even when an earlier edge wins or its source
does not match. No sensor callbacks run: guards inspect supplied bits only.
See
DecisionExplanation::edgesandDecisionState::explain. - Decision
Explanation - A read-only snapshot of one proposed update, borrowing only the graph.
Stores constant-size metadata and lazily explains at most
MAX_DECISION_EDGESedges, without allocating. Later updates of the source state do not change this snapshot. SeeDecisionState::explainfor usage. - Decision
Graph - An immutable, bounded graph in authored priority order. Multi-state cycles are allowed: each update follows at most one edge.
- Decision
State - Enemy
Config - Enemy
Controller - Constant-space controller. Identity supplies a deterministic strafe phase; no random global state, heap allocation, renderer, transport or damage access.
- Enemy
Input - Enemy
Intent - Enemy
Status - Constant-size snapshot of the controller’s latest successfully applied input. Reading this snapshot never advances time or consumes a transition.
- Hearing
- Memory
- Fixed-capacity memory. Current-tick sight always takes precedence over hearing. Older hearing can update a remembered position; it never grants current sight.
- Memory
Settings - Noise
- Noise
Buffer - Retains newest sounds on saturation. Age once per simulation tick, then publish accepted gameplay sounds. Consumers should exclude their own source ID.
- Observer
- Radio
Contact - Round
Robin - Round-robin slots over the host’s stable dense agent array. Deletion/reordering is allowed between calls. Every remaining index is visited within ceil(n/k) calls while population and allowance stay fixed. No per-call allocation.
- Sight
- Slots
- Squad
Board - Target
Selection - Target
Selection Report - Constant-size explanation of one selection. Scores describe this call only.
TisCandidatefor sight selection andTrackfor memory selection. - Target
Selector - Opt-in, allocation-free target retention using a finite, nonnegative score margin. Keep one selector per observer/selection stream and call it after sensing on actual simulation ticks. Reset it when restarting that stream.
- Track
- Unoccluded
- Work
Budget - Work
Counts - Shared per-tick allowances. Counts include rejected work attempts; actual navigation work is charged only after the incremental search consumes it.
Enums§
- AiError
- Decision
Edge Outcome - An edge’s disposition for one proposed update. See
DecisionState::explain. - Decision
Graph Error - The first invalid graph setting or edge, returned without allocating.
Edge indices refer to the original slice in priority order. See
DecisionGraph::validatefor check ordering and an example. - Detection
- Enemy
Attack Phase - Phase of the existing reaction/cooldown timers, not a separate action queue. Recovery takes precedence when both timers are running.
- Enemy
State - Sense
- Squad
Role - Target
Selection Reason - Why an opt-in
TargetSelectorselected or released its target.
Constants§
Traits§
- Visibility
Query - True means the host’s authoritative static/dynamic world permits sight. Implementations should ignore the observer/target bodies and enforce layers.
Functions§
- select_
target - Budgeted deterministic priority selection. Non-finite scores are ignored; equal scores prefer the lower ID. Stops as soon as work is deferred, so an unbounded iterator cannot exhaust the frame. All returned targets passed sight.
- turn_
towards - Angular speed limit, including a deterministic antiparallel fallback.