Schemas / AI
rig.ai.behavior
v1.0.0 · stable maturity: draft 1 field 1 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
nodes |
array<object>min 1 items | required | Tree nodes. Exactly one node omits parent (the root) |
Behavior tree. Format when present. Compose rig.meta.named for a label.
Each node:
sequence runs children in id order until one fails. selector until one succeeds. parallel runs every child. Success policy for parallel is the host's.
action is a name the host implements, the same idea as a shared actionId on rig.ui.action. It is not a callback. An unknown name fails that node. Source text, when it travels, is rig.media.code on its own entity; this tree does not embed it.
Blackboard values are ordinary components on entities. Tick state stays in the host.
A learned map from sensors to drives is rig.ai.policy. This tree may name an action the host implements by stepping that policy. The tree does not store weights.
JSON Schema
Resolves at https://rig.works/schemas/rig.ai.behavior.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.ai.behavior.schema.json",
"title": "rig.ai.behavior",
"type": "object",
"additionalProperties": false,
"properties": {
"nodes": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"kind"
],
"properties": {
"id": {
"$ref": "./_defs.schema.json#/$defs/uint"
},
"parent": {
"$ref": "./_defs.schema.json#/$defs/uint"
},
"kind": {
"type": "string",
"enum": [
"sequence",
"selector",
"parallel",
"condition",
"action"
]
},
"action": {
"$ref": "./_defs.schema.json#/$defs/string"
}
}
}
}
},
"required": [
"nodes"
],
"x-rig-maturity": "draft"
}