simvx.core.ai.blackboard

Blackboard: the shared key-value store deciders read and write.

Perception writes percepts into a Blackboard; deciders (behaviour trees, state machines, utility scorers, or an LLM brain) read them, and high-level deciders write intent (current goal, mood, target) that low-level deciders execute. An optional parent chain lets a squad share intent: a child board falls back to its parent for keys it does not define locally, so a squad-lead brain can publish one shared goal that every member reads while keeping per-member scratch state private.

Module Contents

Classes

Blackboard

A dict-like store with optional parent fallback.

API

class simvx.core.ai.blackboard.Blackboard(initial: collections.abc.Mapping[str, Any] | None = None, *, parent: simvx.core.ai.blackboard.Blackboard | None = None)[source]

A dict-like store with optional parent fallback.

Initialization

__slots__

(‘_data’, ‘_parent’)

get(key: str, default: Any = None) Any[source]
set(key: str, value: Any) None[source]
has(key: str) bool[source]
delete(key: str) None[source]
update(mapping: collections.abc.Mapping[str, Any]) None[source]
clear() None[source]

Clear only this board’s local entries (parent untouched).

local_keys() list[str][source]
as_dict(*, inherited: bool = True) dict[str, Any][source]

Flatten to a plain dict; local keys shadow inherited ones.

child() simvx.core.ai.blackboard.Blackboard[source]

A new board that falls back to this one for missing keys.

__getitem__(key: str) Any[source]
__setitem__(key: str, value: Any) None[source]
__delitem__(key: str) None[source]
__contains__(key: str) bool[source]
__iter__() collections.abc.Iterator[str][source]
__len__() int[source]
__repr__() str[source]