From 7fc455ebff4c367ec6e6333788ba3b0f7b2f4409 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Thu, 16 Apr 2026 19:57:13 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20widen=20E1=20Q-correction=20clamp=20?= =?UTF-8?q?=C2=B12.0=20=E2=86=92=20=C2=B110.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Q-mean drifted to +4.6 but E1 correction was capped at -2.0. The model needs full correction range to keep Q-values calibrated. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/ml/src/trainers/dqn/trainer/enrichment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ml/src/trainers/dqn/trainer/enrichment.rs b/crates/ml/src/trainers/dqn/trainer/enrichment.rs index 5505566d2..f704ec399 100644 --- a/crates/ml/src/trainers/dqn/trainer/enrichment.rs +++ b/crates/ml/src/trainers/dqn/trainer/enrichment.rs @@ -48,7 +48,7 @@ pub(crate) struct HindsightExperience { /// Output of one enrichment cycle. #[derive(Debug, Clone)] pub(crate) struct EnrichmentResult { - /// E1: additive correction to Q-targets (clipped ±2.0). + /// E1: additive correction to Q-targets (clipped ±10.0). pub q_correction: f32, /// E2: next-epoch epsilon. pub epsilon: f32, @@ -148,7 +148,7 @@ fn compute_q_correction(trades: &[EvalTrade]) -> f32 { .map(|t| t.predicted_q - t.pnl) .sum::() / trades.len() as f32; - (-bias).clamp(-2.0, 2.0) + (-bias).clamp(-10.0, 10.0) } /// E2: Adaptive epsilon — performance-driven exploration rate.