task_l0_sensors (faber_neuroevolution v1.2.4)
View SourceTask Silo L0 Sensors - Collects and normalizes sensor inputs for TWEANN.
Part of the Liquid Conglomerate v2 architecture. This module collects evolution statistics and transforms them into normalized inputs for the L0 hyperparameter-tuning TWEANN.
Responsibilities
1. Collect evolution statistics from neuroevolution_server 2. Compute derived metrics (velocities, trends) 3. Normalize all values to appropriate ranges for TWEANN input 4. Handle cross-silo input signals 5. Maintain state for velocity and trend calculations
Usage
%% Start the sensor collector {ok, Pid} = task_l0_sensors:start_link(Config),
%% Update with new evolution stats (called by neuroevolution_server) task_l0_sensors:update_stats(Pid, Stats),
%% Get current sensor vector (ordered list) SensorVector = task_l0_sensors:get_sensor_vector(Pid), %% Returns: [0.82, 0.65, 0.12, ...] (16 values)
Summary
Functions
Get ordered sensor vector for TWEANN input.
Get ordered sensor vector from specific server.
Get named sensor map.
Get named sensor map from specific server.
Set the realm for event publishing.
Start the sensor collector with default configuration.
Start the sensor collector with custom configuration.
Update archive statistics.
Update cross-silo signal from another silo.
Record a crossover outcome (success or failure).
Record a mutation impact (fitness change).
Update with new evolution statistics.
Update with new evolution statistics (specific server).
Functions
-spec get_sensor_vector() -> [float()].
Get ordered sensor vector for TWEANN input.
Returns a list of 21 float values in the order defined by task_l0_morphology:sensor_names/0.
Get ordered sensor vector from specific server.
-spec get_sensors() -> map().
Get named sensor map.
Get named sensor map from specific server.
-spec set_realm(binary()) -> ok.
Set the realm for event publishing.
Use this to dynamically update the realm when a training session starts. Events will be published to the topic for the specified realm.
Start the sensor collector with default configuration.
Start the sensor collector with custom configuration.
-spec update_archive_stats(map()) -> ok.
Update archive statistics.
Expected keys in Stats map: - size: current archive size - max_size: maximum archive size - avg_fitness: average fitness in archive - fitness_variance: fitness variance in archive - avg_generation: average generation of entries (for staleness)
Update cross-silo signal from another silo.
-spec update_crossover_success(boolean()) -> ok.
Record a crossover outcome (success or failure).
-spec update_mutation_impact(float()) -> ok.
Record a mutation impact (fitness change).
-spec update_stats(map()) -> ok.
Update with new evolution statistics.
Update with new evolution statistics (specific server).