7 Commits

Author SHA1 Message Date
2335e9556d feat: v2-A engine breadth — structural reductions, MDL/Pareto, differentiable export, SRBench families
Batch 3 of the expansion-v2 roadmap, all deterministic/offline/std-only with
honest capability boundaries.

crates/lawsynth-reduce (new): deterministic symmetry & separability detection.
Numerical-derivative probe (finite differences replace AI-Feynman's trained NN
gradients) over a reconstructed Cartesian grid; additive/multiplicative
separability + difference/sum/product/ratio symmetries. Every detection is a
HYPOTHESIS verified by reconstruction residual, never a proof; non-grid data is
honestly rejected (NotReconstructed). 17 tests.

crates/lawsynth-score: two-part MDL objective (L_data + L_model in nats) and
O(n log n) pareto_front_2d (sort-then-sweep), verified equal to the O(n^2)
front across 12 deterministic sets. +5 tests; crate fmt-normalized to config.

python/lawsynth export.py (new): to_sympy/to_torch/to_jax + dep-free
numeric_derivatives anchor. Constants+params hoisted into one trainable vector
so autograd reaches every coefficient (Neural-ODE vector field). Backends
absent here degrade gracefully (MissingDependencyError subclasses ImportError).
Faithful to native simulate at 1.1e-16. 10 tests + 6 honest skips.

benchmarks: SRBench Feynman (15: 12 static algebraic relations as honest
capability-boundaries, 3 dynamics-framed ODEs executed at R2~=1.0) and
black-box (4 systems, predictive R2 + parsimony, no ground truth) families.
Fixes a pre-existing _runner.py failure where Strogatz cases leaked into the
legacy contract suite. 31 benchmark tests.

specs/structural-reductions: boundary spec (detection-is-a-hypothesis contract).
2026-08-18 15:04:43 +03:00
771f89b099 feat(v2-A/v2-B): weak-form, implicit dynamics, FROLS/SSR/trapping, SRBench harness
Four expansion-v2 items (finished after a session-limit interruption):

Weak/integral-form discovery (crates/lawsynth-weakform, specs/weak-form) — the top
noise-robustness technique from PySINDy: integrate candidates against compactly-
supported test functions, NO differentiation of noisy data. ~23x lower coefficient
error than finite-difference strong-form under noise. 20 tests, deterministic.

Implicit/rational dynamics (crates/lawsynth-implicit, specs/implicit-dynamics) —
SINDy-PI alternating-LHS nullspace solve; recovers rational laws (Michaelis-Menten)
explicit regression can't express. Honest degree-2 identifiability limit documented
(multi-dimensional nullspace); residual-floor + derivative-preferring tie-break for
canonical selection. 10 tests.

Optimizer breadth (lawsynth-sparse) — FROLS (orthogonal-least-squares, ERR
ordering), SSR (stepwise), trapping (stability-biased); --solver frols|ssr|trapping.
24 tests; default path byte-identical.

SRBench harness (benchmarks/) — 18 Strogatz ODE systems + scoring + a determinism
column (byte-identical on replay — a metric no stochastic competitor can report).
3/3 Strogatz recovered at R²=1.0. srbench_report.py + 5 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 14:49:27 +03:00
13d696183d feat(product): ship report/explain/compare/forecast, Study SDK, Studio screens
Product depth across all three surfaces (PRODUCT.md captures the vision):

CLI — new lawsynth-report crate (self-contained HTML reports with inline SVG
trajectory + phase-portrait charts) and five product commands: report, explain
(plain-language laws), compare (world diff), forecast (what-if interventions),
library (local world index). Demonstrated end-to-end on a damped oscillator.

SDK — high-level Study workflow (from_csv -> discover -> explain -> simulate/
forecast -> report -> save/load), stdlib HTML report generator, and notebook
rich _repr_html_ display. Quickstart example recovers the oscillator exactly
(R2=1.0) and writes a 30KB report.

Studio — 5 interactive screens (discovery canvas, equation explorer, regime
timeline, uncertainty lens, world lab) composing the shared TS packages through
a reactive state-store; typecheck-clean.

Also: benchmark execution deepened 9 -> 18 real cases (causal + regime families
now scored against ground truth); cross-service integration tests (gateway->
artifact proxy, scheduler<->worker lifecycle over real sockets).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 21:05:39 +03:00
b5da90b795 feat: discovery Pareto frontier + regime/uncertainty stages + benchmark execution engine
Discovery (§8/§16): add Pareto-frontier construction over the multi-objective
candidate score vector (DiscoveryResult.frontier + pareto_frontier()), opt-in
regime segmentation (result.regimes), and bootstrap uncertainty attachment;
CLI --pareto/--regimes flags. Benchmarks: a real generate->run->score->classify
execution engine driving the compiled CLI (9 supported cases end-to-end, 21
honest capability boundaries).

Rust workspace 329->342 tests; benchmarks +8 tests. clippy -D warnings clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 17:00:40 +03:00
5828d99939 dragon warrior 2026-08-16 22:04:11 +03:00
6997f22be0 dr doom 2026-08-16 21:04:23 +03:00
6a9ce627e0 asdoruyu 2026-08-16 20:29:23 +03:00