Skip to content

feat(rsi): diagnostic evolution brain, L2 Co-STEER fix, MAP-Elites grid, L3 lab & DPO trajectories - #26

Merged
ZhuLinsen merged 1 commit into
mainfrom
feat/diagnostic-evolution-brain-l2-mapelites-and-l3-lab
Nov 21, 2026
Merged

ZhuLinsen merged 1 commit into
mainfrom
feat/diagnostic-evolution-brain-l2-mapelites-and-l3-lab

Conversation

@ZhuLinsen

Copy link
Copy Markdown
Owner

Stacked PR: Targets feat/evolution-observatory-council-replay-and-pages (PR #25). Merge #25 first, then retarget/merge this PR into main.

改了什么 / What Changed

  1. Failure-Driven Entry Bottleneck X-Ray (src/alphaevo/rsi/diagnostics.py)

    • Added pure structural analyzer (ConditionPassRate, StrategyBottleneckReport, analyze_entry_bottlenecks) computing per-condition pass rates and identifying chokepoints (zero_signal_lockout, choke_condition, and_conjunction_starvation, over_filtered, healthy) without inspecting returns or recording into TrialLedger.
    • Wired per-round diagnostics in RSIEvolutionEngine (src/alphaevo/rsi/engine.py) and exported POST /api/strategies/diagnose (Web Studio) and alphaevo_diagnose_bottlenecks (MCP tool).
  2. L2 Co-STEER Semantics Fix & PIT-Safe Factor Templates (src/alphaevo/rsi/co_steer.py)

    • Attached bottleneck_hint to BlindSpotCluster.
    • Fixed BlindSpotMiner.steer so L2 factor synthesis triggers only when signal_count >= 10, and routes "or"-logic strategies' synthesized factors to entry.filters (preserving triggers vs guards semantics) rather than mutating the OR trigger pool.
    • Added two PIT-safe pure-OHLCV factor templates (trend_alignment_slope_20d, downside_vol_ratio_10d) plus Arena --l2/--no-l2 toggle (enable_l2_factors).
  3. Council Structural Unlock & Expanded Exit Levers (src/alphaevo/rsi/council.py)

    • Updated HeterogeneousCouncil.generate_candidates and _build_heuristic_proposals to accept blind_spot & bottleneck, prioritizing structural OR-unlock, deduplicated coordinated bundles, and guard-product choke pruning (guard_group_pass_rate < 0.25) on zero_signal_lockout.
    • Expanded exit tuning across pct, atr, rr, and trailing, interleaved by failure cluster.
  4. DPO Trajectory Flywheel (src/alphaevo/rsi/trajectory.py)

    • Added JSONL evolution step & DPO preference-pair exporter (RSITrajectoryStep, DPOPreferencePair, RSITrajectoryExport, build_rsi_trajectory, export_rsi_trajectory), automatically exporting rsi_trajectory.jsonl and rsi_dpo_pairs.jsonl when output_dir is set.
  5. MAP-Elites 3×3 Archive SVG & Web Studio / MCP / Arena Upgrades

    • src/alphaevo/arena/: Added map_elites_cells, synthesized_factors, total_l2_factors_synthesized, enable_l2_factors, inline 3×3 render_map_elites_svg, and embedded MAP-Elites grid in render_arena_html.
    • src/alphaevo/web/: Added POST /api/strategies/diagnose, POST /api/rsi/mechanism-ab (L3 Meta-RSI Harness A/B Lab), #enable-l2, #bottleneck-box, #lab-map-elites, #btn-export-dpo, and live SSE/stream payloads (map_elites_svg, bottleneck_report, dpo_pairs).
    • src/alphaevo/mcp/server.py, SKILL.md, README.md, docs/README_CN.md, AGENTS.md, CHANGELOG.md: Updated docs and registered alphaevo_diagnose_bottlenecks & alphaevo_mechanism_ab (11 MCP tools total).
    • tests/unit/test_phase7_diagnostic_brain_l2_mapelites_l3_dpo.py: Added comprehensive unit, cold-import, L2 PIT, MAP-Elites, DPO, Web/MCP, and Tier-2 Null Audit tests.

为什么 / Why

  • Previously, zero-signal strategies stalled in L1 evolution because heuristic proposals tuned thresholds blindly instead of diagnosing AND-conjunction starvation or guard chokepoints first.
  • L2 Co-STEER previously injected factors inconsistently on zero-signal or OR-trigger strategies.
  • Closes the L1 → L2 → L3 observability loop across Web Studio, Arena HTML, CLI, and MCP without touching the L0 Truth Kernel (src/alphaevo/truth/, src/alphaevo/evaluator/metrics.py).

验证情况 / Verification

  • ruff format --check src/ tests/unit/test_phase7_diagnostic_brain_l2_mapelites_l3_dpo.py → 134 files already formatted
  • ruff check src/ tests/ scripts/ → All checks passed!
  • mypy src/alphaevo/ --ignore-missing-imports → Success: no issues found in 133 source files
  • pytest tests/unit/ tests/integration/ -q --tb=short -m "not network" → 1075 passed, 2 warnings
  • Out-of-tree built wheel smoke test (alphaevo-0.2.0-py3-none-any.whl): CLI, MCP ping, and alphaevo arena run --rounds 2 (4 strategies, 22 council deliberations, 0 L0 promotions, 11 vetoes / 6 prosecutor, Portfolio Return +3.70%, Sharpe 1.41, MaxDD 1.7%, Shadow Hash Chain VERIFIED) passed (WHEEL SMOKE OK).
  • rsi_reversion benchmark (bundled_snapshot, 2025-02-11 → 2026-04-10, max_rounds=4, max_candidates_per_round=3): R0 baseline 0 sig (fit=0.010) → R1 OR unlock 79 sig (fit=0.152) → R4 exit calibration 44 sig, 52% wr, +4.01% avg (fit=0.397, stepping_stone); L2 synthesized intraday_range_compression_10d.
  • Tier-2 Null Audit (n_worlds=2, L1+L2 enabled): passed=True, false_promotions=0.
  • git diff --stat feat/evolution-observatory-council-replay-and-pages -- src/alphaevo/truth/ src/alphaevo/evaluator/metrics.py → empty (L0 Truth Kernel untouched).

风险点与免责声明 / Risks & Disclaimer

@ZhuLinsen
ZhuLinsen changed the base branch from feat/evolution-observatory-council-replay-and-pages to main November 21, 2026 14:29
…er fix, MAP-Elites grid, L3 mechanism lab & DPO trajectory export
@ZhuLinsen
ZhuLinsen force-pushed the feat/diagnostic-evolution-brain-l2-mapelites-and-l3-lab branch from d9ee9ef to 47538dc Compare November 21, 2026 14:30
@ZhuLinsen
ZhuLinsen merged commit b535e02 into main Nov 21, 2026
7 checks passed
@ZhuLinsen
ZhuLinsen deleted the feat/diagnostic-evolution-brain-l2-mapelites-and-l3-lab branch November 21, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant