exoself (macula_tweann v0.18.1)
View SourceExoself - Neural network lifecycle manager
The exoself is responsible for spawning, linking, and managing the lifecycle of a neural network phenotype from its genotype. It handles:
- Spawning all network processes (sensors, neurons, actuators, cortex) - Linking processes with their inputs and outputs - Weight tuning with simulated annealing - Network backup and restoration - Fitness evaluation coordination
Lifecycle
1. prep/3 - Initialize state and spawn network 2. loop/1 - Handle tuning cycles and evaluation 3. Terminate - Clean up network processes
Tuning Algorithm
The exoself uses memetic weight tuning with simulated annealing: 1. Perturb subset of weights 2. Evaluate network fitness 3. If better: keep changes, update best 4. If worse: restore previous weights 5. Reduce perturbation over attempts (annealing)
Summary
Functions
Calculate perturbation for current attempt using annealing.
Initialize the exoself and spawn the network.
Prepare and start the network (called by spawned process).
Start an exoself process for an agent.
Functions
-spec calculate_perturbation(float(), pos_integer(), pos_integer(), float()) -> float().
Calculate perturbation for current attempt using annealing.
Exported for testing.
Initialize the exoself and spawn the network.
Prepare and start the network (called by spawned process).
Start an exoself process for an agent.
Spawns an exoself that will construct and manage the phenotype for the given agent.