lc_l2_controller (faber_neuroevolution v1.2.4)

View Source

L2 Strategic Controller for Liquid Conglomerate Silos.

Part of the Liquid Conglomerate v2 architecture. This module implements the L2 strategic layer that learns to tune L1's hyperparameters based on long-term L0 performance.

Architecture

L2 is the slowest-evolving layer that: - Observes L0 performance over many τ_L1 cycles - Outputs adjustments to L1's hyperparameters - Provides a stable strategic platform for the adaptation hierarchy

Learning Mechanism

L2 learns through slow evolution or Bayesian optimization: 1. Tiny population (3-5 L2 variants) or single individual with exploration 2. Each L2 variant's settings tested over many L1 cycles 3. Fitness = long-term cumulative L0 performance 4. Very slow evolution (τ_L2 = 5 min for Resource, 10000 evals for Task)

Usage

%% Create L2 controller for a silo Config = #{ silo_type => task, morphology_module => task_l0_morphology, tau_l2 => 300000, % 5 minutes l1_hyperparameters => task_l0_morphology:l1_hyperparameters() }, {ok, Pid} = lc_l2_controller:start_link(Config),

%% Update with L1 performance (called every τ_L1) lc_l2_controller:observe_l1_performance(Pid, L1Metrics),

%% Get current L1 hyperparameter settings L1Hyperparams = lc_l2_controller:get_l1_hyperparameters(Pid),

Summary

Functions

Get current L1 hyperparameter settings.

Get performance summary for diagnostics.

Observe L1 performance metrics.

Start L2 controller with configuration.

Functions

get_l1_hyperparameters(Pid)

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

Get current L1 hyperparameter settings.

get_performance_summary(Pid)

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

Get performance summary for diagnostics.

handle_call(Request, From, State)

handle_cast(Msg, State)

handle_info(Info, State)

init(Config)

observe_l1_performance(Pid, L1Metrics)

-spec observe_l1_performance(pid(), map()) -> ok.

Observe L1 performance metrics.

Called every τ_L1 with L1's performance summary

start_link(Config)

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

Start L2 controller with configuration.

terminate(Reason, State)