Batch reactor
A first-order reaction
Run it yourself with:
uv run python examples/batch_reactor/train_hybrid.pyResults
Default settings, seed 0: 60 CMA-ES generations for the parametric trunk, then 800 AdamW steps for the residual. The k-reveal plot is the whole story — the parametric trunk cannot see pH, so all its curves are flat, and the hybrid model's curves track the truth across the pH range:


The validation points (triangles) at (20 °C, 5.3) and (30 °C, 6.8) were never fitted. The residual bought one model with the pH shape to approach them, instead of one Arrhenius fit per bin.
The batch-reactor page continues in part two, the RL example, which freezes this fitted trunk and learns a catalyst-activity policy on top of it.