Bardo.AgentManager.Cortex (Bardo v0.1.0)
View SourceThe Cortex is the central coordination element of a neural network agent.
Overview
The Cortex manages the synchronization and communication between all components of a neural network agent:
- Sensors: Receive information from the environment
- Neurons: Process information through activation functions
- Actuators: Act on the environment based on neural outputs
It orchestrates the sense-think-act cycle by:
- Triggering sensors to gather input from the environment
- Coordinating the forward propagation of signals through the neural network
- Ensuring actuators receive their control signals to interact with the environment
- Managing the timing and synchronization of the entire process
Key Responsibilities
- Network Coordination: Ensures all neurons, sensors, and actuators operate in coordination
- Cycle Management: Controls the timing of sensing, processing, and acting phases
- Message Routing: Directs signals between appropriate network components
- State Management: Maintains the state of the neural network across operational cycles
Implementation Details
Each Cortex is implemented as an Erlang process that communicates with other processes (sensors, neurons, actuators) through message passing. This leverages the BEAM VM's concurrency model for efficient parallel processing across the neural network.
Summary
Functions
Activates a neural network with the given inputs.
Creates a neural network (cortex) from a genotype.
Initialize the cortex process.
Initializes the cortex.
Reactivate the Cortex after it's gone inactive.
Spawns a Cortex process belonging to the Exoself process that spawned it and calls init to initialize.
Terminates the cortex.
Sync the Cortex with an actuator, providing fitness and status. Used in the cycle coordination process.
Functions
Activates a neural network with the given inputs.
This is a simplified implementation for basic examples and testing.
Creates a neural network (cortex) from a genotype.
This is a simplified implementation for basic examples and testing. It creates an in-memory neural network without spawning processes.
Initialize the cortex process.
Initializes the cortex.
Reactivate the Cortex after it's gone inactive.
Spawns a Cortex process belonging to the Exoself process that spawned it and calls init to initialize.
Terminates the cortex.
Sync the Cortex with an actuator, providing fitness and status. Used in the cycle coordination process.