Skip to content

feat(rsi): semantic genetic crossover, hybrid L1/L2 diagnostic council, ablation benchmark & persistent Studio save - #27

Merged
ZhuLinsen merged 3 commits into
mainfrom
feat/semantic-crossover-hybrid-l2-and-ablation-benchmark
Nov 22, 2026
Merged

ZhuLinsen merged 3 commits into
mainfrom
feat/semantic-crossover-hybrid-l2-and-ablation-benchmark

Conversation

@ZhuLinsen

Copy link
Copy Markdown
Owner

改了什么 / What Changed

  1. Semantic DSL Genetic Crossover (src/alphaevo/rsi/crossover.py, src/alphaevo/rsi/engine.py, src/alphaevo/rsi/trajectory.py)

    • Added SemanticCrossoverBreeder (exit_graft, filter_graft, trigger_blend) enforcing complexity caps, structural deduplication, and StrategyMutator-compatible exit change descriptors checked by SelfCritic / Prosecutor.
    • Wired secondary-parent elite crossover into StockRSIEngine.run() (crossovers_tried, crossovers_kept, secondary_parent_id), DPO trajectory export (RSITrajectoryStep.secondary_parent_id), Arena snapshots, and render_evolution_tree_svg (dashed purple #a855f7 crossover edges + 🧬X badges).
  2. Bottleneck-Aware Hybrid LLM L1 Council & Hybrid L2 Co-STEER (src/alphaevo/rsi/council.py, src/alphaevo/rsi/co_steer.py)

    • Added _format_diagnostic_context and HeterogeneousCouncil.audit_changes, routing live StrategyBottleneckReport, BlindSpotCluster, active ExecutableScars, and Charter mission notes directly into Proposer/Prosecutor LLM & CLI prompts with graceful deterministic fallback on malformed/missing responses.
    • Upgraded BlindSpotMiner with transient hybrid LLM factor synthesis (_try_llm_synthesize), AST whitelist + runtime PIT lookahead rejection, causal quantile threshold calibration (_calibrate_causal_threshold), and 7 cluster-ordered pure-OHLCV templates (added close_location_value_5d and atr_expansion_ratio_14d).
  3. Reproducible Multi-Strategy Ablation Benchmark (src/alphaevo/rsi/benchmark.py, CLI, Web, MCP)

    • Added run_evolution_benchmark & render_benchmark_markdown comparing baseline vs. l1_only vs. l1_l2_crossover under locked chronological holdout + optional Tier-2 Null Audit.
    • Added alphaevo rsi benchmark CLI command, POST /api/rsi/benchmark, and MCP tool alphaevo_benchmark_strategies (12 MCP tools total).
  4. Persistent Studio Save & Arena / Docs / Pages Sync

    • Added POST /api/strategies/save + Web Studio Save Champion to Store (#btn-save-champion), Ablation Benchmark panel (#btn-benchmark), and Arena CLI flags (--crossover/--no-crossover, --proposer-model, --prosecutor-model).
    • Verified GitHub Pages deployment (https://zhulinsen.github.io/alphaevo/ via arena-daily.yml) and updated README.md, docs/README_CN.md, SKILL.md, AGENTS.md, and CHANGELOG.md.

为什么 / Why

  • Bridges isolated single-parent local search with structure-preserving cross-elite recombination (exit_graft, filter_graft, trigger_blend) while preserving strict L0 falsification gates.
  • Ensures LLM L1 proposers, LLM prosecutors, and LLM L2 Co-STEER factor generators consume exact bottleneck X-rays and scar constraints instead of blind heuristics alone.
  • Gives researchers a one-command ablation harness (baseline vs l1_only vs l1_l2_crossover) and one-click champion persistence inside Web Studio.

验证情况 / Verification

  • .venv/bin/ruff format --check src/ tests/unit/test_phase8_crossover_hybrid_l2_benchmark.py → 136 files already formatted
  • .venv/bin/ruff check src/ tests/ scripts/ → All checks passed!
  • .venv/bin/mypy src/alphaevo/ --ignore-missing-imports → Success: no issues found in 135 source files
  • Lazy CLI startup (LAZY CLI OK) & Node --check on Web Studio + Arena HTML scripts (web_ui rc=0, arena_html rc=0) passed.
  • .venv/bin/pytest tests/unit/ tests/integration/ -q --tb=short -m "not network" → 1083 passed, 2 warnings
  • Tier-2 Null Audit (test_tier2_null_audit_zero_false_promotions_with_l2_and_crossover, n_worlds=2, L1+L2+Crossover enabled) → passed=True, false_promotions=0.
  • Out-of-tree built wheel smoke test (alphaevo-0.2.0-py3-none-any.whl in clean /tmp/phase8-smoke venv): alphaevo version, alphaevo mcp ping, alphaevo arena run --rounds 2 (4 strategies, Portfolio Return +3.70%, Sharpe 1.41, MaxDD 1.7%, Shadow Hash Chain VERIFIED), and alphaevo rsi benchmark --rounds 2 --no-null-audit (WHEEL SMOKE OK).
  • GitHub Pages workflow arena-daily.yml run 44914629099 succeeded (evolve-arena + deploy-pages) → live at https://zhulinsen.github.io/alphaevo/.
  • git diff --stat main -- src/alphaevo/truth/ src/alphaevo/evaluator/metrics.py → empty (L0 UNTOUCHED OK).

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

@ZhuLinsen
ZhuLinsen merged commit b38cf61 into main Nov 22, 2026
7 checks passed
@ZhuLinsen
ZhuLinsen deleted the feat/semantic-crossover-hybrid-l2-and-ablation-benchmark branch November 22, 2026 02:48
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