build_reflex_mapping
Creates a custom pattern morphology and wires source-to-destination cortical areas in one call, combining morphology creation and mapping updates for reflex circuit setup.
Instructions
Create a custom patterns morphology and wire src->dst with it in one call.
Combines create_morphology + update_cortical_mapping. Pass compact
pattern rows, not an enumerated voxel table:
.. code-block:: python
voxel_mappings = [
{"src": ["*", "*", "*"], "dst": ["?", "?", "?"]},
{"src": [382, "*", "*"], "dst": ["?", "?", 0]},
]Tokens: *, ?, !, ?+N, ?-A:?+B, exact ints. Enumerated
exact dumps that share one offset are rejected. On a PositionalServo
absolute OPU, dest z=0 is max command; nonzero dst z is allowed (the decoder takes
the mean of active z, so it mixes with other commands on the channel) and returns
warnings. For stance-relative offsets see build_stance_relative_mapping.
By default the new mapping is appended; pass replace_existing=True to
wipe existing rules first.
synaptic_delay_bursts must be >= 1 (the backend rejects a zero axonal delay during
synapse regeneration); it defaults to 1. A value < 1 is rejected up front, before the
morphology is created, so no orphan morphology is left behind.
Plasticity controls:
plasticity_flag enables learning on the mapping (legacy STDP path).
plasticity_mode is the new explicit selector:
* "off" - no learning (equivalent to plasticity_flag=False);
* "stdp" - classic correlation-based Hebbian STDP;
* "rstdp" - reward-modulated STDP. Requires
eligibility_decay_bursts (>=1) and modulators: one or more
synaptic.reward modulator ids (positive magnitude rewards, negative
punishes). Their driver areas must be driven by non-plastic input only;
the server's wireheading lint rejects mappings that violate this.
When plasticity_mode is omitted, the server falls back to "stdp" if
plasticity_flag=True, otherwise "off".
Optional max_weight and plasticity_eta forward to the same mapping rule
keys accepted by :func:update_cortical_mapping. LTP/LTD are i8; use
plasticity_eta to scale the weight update when a fractional learning rate
is needed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"src_area_id": "<src_area_id>",
"dst_area_id": "<dst_area_id>",
"morphology_name": "<morphology_name>",
"voxel_mappings": "<voxel_mappings>",
"postsynaptic_current_multiplier": "<postsynaptic_current_multiplier>"
},
"name": "build_reflex_mapping"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_weight | No | ||
| modulators | No | ||
| dst_area_id | Yes | ||
| src_area_id | Yes | ||
| ltd_multiplier | No | ||
| ltp_multiplier | No | ||
| plasticity_eta | No | ||
| voxel_mappings | Yes | ||
| morphology_name | Yes | ||
| plasticity_flag | No | ||
| plasticity_mode | No | ||
| replace_existing | No | ||
| morphology_scalar | No | ||
| plasticity_window | No | ||
| plasticity_constant | No | ||
| synaptic_delay_bursts | No | ||
| eligibility_decay_bursts | No | ||
| postsynaptic_current_multiplier | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||