Skip to content

A calculus domain graded by two derivatives that must agree - #36

Merged
punnerud merged 1 commit into
mainfrom
feat/calculus-battery
Aug 12, 2026
Merged

A calculus domain graded by two derivatives that must agree#36
punnerud merged 1 commit into
mainfrom
feat/calculus-battery

Conversation

@punnerud

Copy link
Copy Markdown
Owner

A calculus domain graded by two derivatives that must agree, and more physics

The battery gains calculus -- derivatives at a point through chain-rule
compositions, exact definite integrals, tangent slopes, and quadratics built
FROM their roots so the truth exists by construction. The truth for every
question comes from mpeqs.calculus, and the domain tests grade each question
through BOTH of its derivative paths -- symbolic and dual-number autograd -- so
no answer rests on either implementation alone.

Physics gains free fall, acceleration and kinetic energy, formula always stated
in the question, heights BUILT from the answer so three decimals state them
exactly. The %g trap struck again on the way -- six significant digits turned
3575.745 into "3575.74", a question whose stated figure disagreed with its
graded answer -- and the round-trip test caught it before any model saw it.

The first live run caught the GRADER being wrong twice, which is the better
direction:

  • a model answered -42.666667 for -128/3 -- MORE precise than the grader's
    4-decimal ceiling -- and was marked wrong for it. matches() now accepts 6
    down to 2 decimal places: an answer must never fail for exceeding the
    grader's precision.
  • light_travel never asked for decimals, so "182 seconds" against 182.13 was
    the model rounding reasonably and the question being underspecified. It now
    asks for two decimal places.

Measured live against qwen3 after the fixes: 19/22 (86%), seven of eleven
groups perfect, pinned. The remaining misses are genuine model errors -- a
dropped chain factor and a forgotten square root -- of exactly the kind the
reasoning loop's machinery exists to catch when these questions arrive through
it rather than bare.

mpeqs floor raised to 0.4.0, verified by grep after the edit, because a silent
replace-miss on this exact line has happened before.

… physics

The battery gains calculus -- derivatives at a point through chain-rule
compositions, exact definite integrals, tangent slopes, and quadratics built
FROM their roots so the truth exists by construction. The truth for every
question comes from mpeqs.calculus, and the domain tests grade each question
through BOTH of its derivative paths -- symbolic and dual-number autograd -- so
no answer rests on either implementation alone.

Physics gains free fall, acceleration and kinetic energy, formula always stated
in the question, heights BUILT from the answer so three decimals state them
exactly. The %g trap struck again on the way -- six significant digits turned
3575.745 into "3575.74", a question whose stated figure disagreed with its
graded answer -- and the round-trip test caught it before any model saw it.

The first live run caught the GRADER being wrong twice, which is the better
direction:

* a model answered -42.666667 for -128/3 -- MORE precise than the grader's
  4-decimal ceiling -- and was marked wrong for it. matches() now accepts 6
  down to 2 decimal places: an answer must never fail for exceeding the
  grader's precision.
* light_travel never asked for decimals, so "182 seconds" against 182.13 was
  the model rounding reasonably and the question being underspecified. It now
  asks for two decimal places.

Measured live against qwen3 after the fixes: 19/22 (86%), seven of eleven
groups perfect, pinned. The remaining misses are genuine model errors -- a
dropped chain factor and a forgotten square root -- of exactly the kind the
reasoning loop's machinery exists to catch when these questions arrive through
it rather than bare.

mpeqs floor raised to 0.4.0, verified by grep after the edit, because a silent
replace-miss on this exact line has happened before.
@punnerud
punnerud merged commit 689ad95 into main Aug 12, 2026
6 checks passed
@punnerud
punnerud deleted the feat/calculus-battery branch August 12, 2026 19:41
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