Skip to content

Alpha-3: 4-Stage Curriculum + N-Step DQN + Pro Analytics

Pre-release
Pre-release

Choose a tag to compare

@dzaczek dzaczek released this 13 Feb 17:38
· 2662 commits to main since this release

Alpha-3 — Full Training System Overhaul

4-Stage Curriculum with Dynamic Gamma

Stage Name Gamma Promote Criteria
S1 FOOD_VECTOR 0.80 avg_food>=5 AND avg_steps>=50 (200 ep window)
S2 WALL_AVOID 0.90 avg_steps>=80 AND wall_death<3% (200 ep window)
S3 ENEMY_AVOID 0.95 avg_steps>=120 (200 ep window)
S4 MASS_MANAGEMENT 0.99 Final stage

Core Changes

  • N-step returns (n=3) — reward signal propagates 3x faster
  • Dynamic gamma per stage (effective horizon: 5→10→20→100 steps)
  • Compound promotion — S1 requires BOTH food AND survival thresholds
  • Tightened criteria — prevents premature stage advancement (previous run stuck at S3 after 8k eps)
  • New rewards: enemy_approach_penalty, boost_penalty, expanded food_shaping clamp
  • Softened S3 enemy penalties (2.0→1.0 proximity, 1.0→0.5 approach) to prevent paralysis

Professional Analytics Suite (13 Charts)

  1. Main Dashboard (Bollinger bands, percentile steps, food SMA, loss, epsilon+LR, death area)
  2. Curriculum Stage Progression (timeline with color bands)
  3. Per-Stage Distributions (violin + box plots)
  4. Hyperparameter Tracking (epsilon, LR, beta, loss EMA)
  5. Correlation Scatter Matrix (12 plots with Pearson r + R² trend lines)
    5b. Correlation Heatmap + Ranked Strongest Correlations
  6. Rolling Performance Percentile Bands (P10-P90)
  7. Death Analysis (pie, grouped bars, histogram, rolling heatmap)
  8. Food Efficiency (ratio tracking, cumulative, per-stage box)
  9. Reward Distributions per Stage
  10. Learning Detection (CDF early/late, volatility, segmented trends)
  11. Goal Progress Gauges
  12. HP Analysis (parallel coordinates, Epsilon×LR sweet spot heatmap, top 5% vs bottom 5%)

Breaking Changes

  • Requires full training reset (new checkpoint format with n-step buffers + dynamic gamma)
  • Old 3-stage curriculum replaced with 4-stage
  • Old chart PNG files removed from repo

Previous Issues Fixed

  • Bot stuck at Stage 3 after 8000+ episodes (avg_steps=42, 99.7% snake death, flat rewards)
  • Root cause: S1 promoted after only 100 eps with trivial avg_food>=3 threshold
  • S2→S3 promoted without real wall avoidance mastery