fix: widen E1 Q-correction clamp ±2.0 → ±10.0

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) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-04-16 19:57:13 +02:00
parent 017393cd0f
commit 7fc455ebff

View File

@@ -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::<f32>()
/ trades.len() as f32;
(-bias).clamp(-2.0, 2.0)
(-bias).clamp(-10.0, 10.0)
}
/// E2: Adaptive epsilon — performance-driven exploration rate.