-
Notifications
You must be signed in to change notification settings - Fork 13
Brain Format
A network of neurons using a dictionary for quick access.
Connections between these neurons are mapped using a simple "Source->Target" text format.
Ten example brains are included in the custom brains folder
-
type: Categorizes the neuron's role, such assensor,core,hidden, orcustom -
position: An [x, y] array for visual rendering. (format: always "dosidicus") -
metadata: Contains descriptive information:name,description,author,version,created,modified
Neurons are stored in a dictionary where the key is the unique neuron ID (e.g., "hunger").
Each neuron object includes:
-
type: Categorizes the neuron's role, such as "sensor", "core", "hidden", or "custom". -
position: An [x, y] array for visual rendering. -
is_sensor/is_core/is_custom: Boolean flags defining the neuron's nature. -
is_binary: Boolean. If true, the neuron typically operates in an on/off state (common for sensors like can_see_food). -
activation: The starting value for that neuron (often 50.0 for core needs or 0.0 for sensors/hidden layers).
Connections are stored in a dictionary where the key uses a specific arrow syntax: "SourceID->TargetID"
- Value: A float representing the connection weight (e.g.,
"cleanliness->happiness": 0.141). - Self-Correction: Neurons can connect to themselves (e.g.,
"can_see_food->can_see_food": -0.8).
The state object mirrors the neurons' current activation values. It serves as a snapshot of the squid's internal "feelings" or sensor readings at a given moment.
- It includes the current values for both named neurons and hidden layers.
- Binary sensors are recorded as booleans in this section (e.g.,
"can_see_food": false).
Specific sections to handle how the brain appears when running in the simulator:
-
neuron_shapes: Maps neuron IDs to geometric shapes:circle,square,diamond, orpentagon. -
neuron_positions: Position data for the brain tool Network tab
The Output Bindings system allows neurons to trigger external actions
(see: brain_neuron_hooks and brain_neuron_outputs)
-
neuron_name: The neuron being monitored. -
output_hook: The function to trigger (e.g., "neuron_output_change_color"). -
trigger_mode: Defines when the hook fires (e.g., "above", "below", or "falling"). -
threshold: The value the neuron must hit to trigger the hook. -
hook_params: Configuration for the specific action, such as RGB colour values.
Output bindings can be created and edited using the Brain Designer
🦑 Raise digital squids whose brains grow & rewire themselves through Hebbian learning and Neurogenesis