From dd049d9a4c0b4cba51d15e8b808a06005fc7507e Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Wed, 27 May 2026 15:46:59 +0200 Subject: [PATCH] fix(rl): reward clamp bootstrap WIN=1.0 LOSS=3.0 (was 0.5/0.5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The clamp bounds were bootstrapped at ±0.5 (matching the old ±0.5 atom span) instead of the intended asymmetric WIN=1.0, LOSS=3.0. This caused: (1) apply_reward_scale clamped at ±0.5 instead of [-3,+1], (2) the C51 atom span EWMA target = max(1.0, 0.5) = 1.0 → V_MIN never moved because target min(-1.0, -0.5) = -1.0 = bootstrap. Now: WIN=1.0 (positive reward ceiling), LOSS=3.0 (loss-aversion asymmetry per pearl_audit_unboundedness). Atom span will EWMA from [-1, +1] toward [-3, +1] over ~2100 steps (α=0.001). Co-Authored-By: Claude Opus 4.7 --- crates/ml-alpha/src/trainer/integrated.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ml-alpha/src/trainer/integrated.rs b/crates/ml-alpha/src/trainer/integrated.rs index 831e1365e..003420968 100644 --- a/crates/ml-alpha/src/trainer/integrated.rs +++ b/crates/ml-alpha/src/trainer/integrated.rs @@ -2686,8 +2686,8 @@ impl IntegratedTrainer { // outliers." V_MAX/V_MIN seeded to the original C51 // [-1, +1] span as the canonical floor — the ratchet // in `rl_reward_clamp_controller` only grows magnitude. - (crate::rl::isv_slots::RL_REWARD_CLAMP_WIN_INDEX, 0.5), - (crate::rl::isv_slots::RL_REWARD_CLAMP_LOSS_INDEX, 0.5), + (crate::rl::isv_slots::RL_REWARD_CLAMP_WIN_INDEX, 1.0), + (crate::rl::isv_slots::RL_REWARD_CLAMP_LOSS_INDEX, 3.0), (crate::rl::isv_slots::RL_REWARD_CLAMP_MARGIN_INDEX, 1.5), (crate::rl::isv_slots::RL_REWARD_CLAMP_RATIO_INDEX, 3.0), (crate::rl::isv_slots::RL_REWARD_CLAMP_CLIP_RATE_TARGET_INDEX, 0.05),