From d391e308d1a3e0fbcb7d2dd25a0964bf26e69757 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Sat, 11 Apr 2026 23:44:13 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20max=5Fdirmag=207=E2=86=929=20=E2=80=94?= =?UTF-8?q?=20report=20against=20full=20dir=C3=97mag=20combinatorial=20spa?= =?UTF-8?q?ce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flat+epsilon can hit any of the 9 dir×mag combos. Reporting against 7 (old reachable-without-epsilon count) showed 9/7 which is confusing. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/ml/src/trainers/dqn/trainer/training_loop.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ml/src/trainers/dqn/trainer/training_loop.rs b/crates/ml/src/trainers/dqn/trainer/training_loop.rs index 665dc085e..a1813db8e 100644 --- a/crates/ml/src/trainers/dqn/trainer/training_loop.rs +++ b/crates/ml/src/trainers/dqn/trainer/training_loop.rs @@ -1872,9 +1872,9 @@ impl DQNTrainer { let active_factored = active_dirmag * active_ord * active_urg; let diversity_pct = (active_factored as f64 / total_factored_space as f64) * 100.0; - // Max reachable dir*mag = (b0-1)*b1 + 1: Short and Long each have b1 mag options. - // Flat forces mag=Half, so only 1 of the 3 Flat cells is reachable. - let max_dirmag = (b0.saturating_sub(1)) * b1 + 1; // 2*3+1 = 7 (of 9 total) + // Max dir*mag = b0 * b1 = 9 (full combinatorial space). + // Epsilon exploration can hit any combo including Flat×{Small,Full}. + let max_dirmag = b0 * b1; info!( "Epoch {}/{}: Action diversity={}/{} ({:.1}%) — dir*mag={}/{} order={}/{} urgency={}/{}", epoch + 1, self.hyperparams.epochs,