distribution_l0_sensors (faber_neuroevolution v1.2.4)

View Source

Distribution Silo L0 Sensors - Collects and normalizes sensor inputs for TWEANN.

Part of the Liquid Conglomerate v2 architecture. This module collects network and distribution metrics for the L0 load balancing TWEANN.

Responsibilities

1. Collect network metrics (peer load, latency, bandwidth) 2. Track island topology state 3. Monitor migration success rates 4. Normalize all values for TWEANN input 5. Handle cross-silo input signals

Usage

%% Start the sensor collector {ok, Pid} = distribution_l0_sensors:start_link(Config),

%% Update with peer metrics distribution_l0_sensors:update_peer_metrics(Pid, PeerMetrics),

%% Get current sensor vector SensorVector = distribution_l0_sensors:get_sensor_vector(Pid), %% Returns: [0.45, 0.23, ...] (14 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.

Record that a migration just happened.

Start the sensor collector with default configuration.

Start the sensor collector with custom configuration.

Update cross-silo signal from another silo.

Update evaluation queue depth.

Update island topology information.

Record a migration result (success or failure).

Update peer metrics from mesh.

Functions

get_sensor_vector()

-spec get_sensor_vector() -> [float()].

Get ordered sensor vector for TWEANN input.

get_sensor_vector(Pid)

-spec get_sensor_vector(pid()) -> [float()].

Get ordered sensor vector from specific server.

get_sensors()

-spec get_sensors() -> map().

Get named sensor map.

get_sensors(Pid)

-spec get_sensors(pid()) -> map().

Get named sensor map from specific server.

handle_call(Request, From, State)

handle_cast(Msg, State)

handle_info(Info, State)

init(Config)

record_migration_time()

-spec record_migration_time() -> ok.

Record that a migration just happened.

start_link()

-spec start_link() -> {ok, pid()} | ignore | {error, term()}.

Start the sensor collector with default configuration.

start_link(Config)

-spec start_link(map()) -> {ok, pid()} | ignore | {error, term()}.

Start the sensor collector with custom configuration.

terminate(Reason, State)

update_cross_silo_signal(SignalName, Value)

-spec update_cross_silo_signal(atom(), float()) -> ok.

Update cross-silo signal from another silo.

update_evaluation_queue(Depth)

-spec update_evaluation_queue(non_neg_integer()) -> ok.

Update evaluation queue depth.

update_island_topology(Topology)

-spec update_island_topology(map()) -> ok.

Update island topology information.

update_migration_result(Success)

-spec update_migration_result(boolean()) -> ok.

Record a migration result (success or failure).

update_peer_metrics(PeerMetrics)

-spec update_peer_metrics(map()) -> ok.

Update peer metrics from mesh.

PeerMetrics should be a map: #{peer_id => #{load => L, latency => Ms, bandwidth => Mbps}}