public sealed class SharedBlackboardA blackboard several agents read, writable only inside a scope on one thread.
Remarks
A distinct type rather than a flag, because sharing is the parallelism hazard and it should be a decision somebody made. A tree step is safe to run over chunks precisely because it touches one agent's memory and one agent's board; a service writing a key that another agent's decorator observes is a cross-agent edge, and an edge that arrived by accident is a race nobody can see in a diff.
So the shared board is written in a single-threaded phase and read freely for the rest of the frame. Opening a scope is what says "this is that phase", and a write outside one — or from a worker while one is open elsewhere — throws rather than corrupting a value half the population is about to read.
⚠ Reads are not gated, and that is the bargain. Nothing here makes a read that races an open scope safe; what it does is make the write phase a place in the frame rather than a convention. Squad coordination, a shared threat list and a group's current objective are what this is for, and doc 37 § Where it stops is explicit that the policy over them is a game's.
Fields and properties (3)
public Blackboard ValuesThe board. Reads are free; writes need an open Scope.
public BlackboardLayout LayoutIts shape.
public bool IsWritingWhether a write scope is open.
Methods (2)
public SharedBlackboard(BlackboardLayout layout)Creates one over a layout.
public SharedBlackboard.Scope BeginWrite()Opens the write phase.
Used by (4)
- AgentContextVixen.Ai
- AiSystemVixen.Ai
- ScopeVixen.Ai
- SharedBlackboardTestsVixen.Ai.Tests