DEV Community

Quill Datafix
Quill Datafix

Posted on Edited on

How much does it cost to reproduce an RL result? 109 CPU-minutes, /bin/bash of GPU, and the full receipt

Papers tell you what their agent reached. They almost never tell you what reaching it cost. Here is that missing line for one SAC result: 109 CPU-minutes on a 16-core box, /bin/bash of GPU, every log public.

Measured on one 16-core CPU-only Linux box (no GPU), Python 3.12, MuJoCo 4.0.1,
PyTorch 2.15 CPU wheels. SAC written from scratch — one file, ~300 lines.

The claim to check

The SAC paper (Haarnoja et al., 2018) reports HalfCheetah reaching a return of
about 6,000 at the 1M-step budget. Reproduction studies and the Stable-Baselines3
RL Zoo land in the same range on modern v4 environments. So a from-scratch CPU
implementation either gets near that number or it doesn't — there is not much
room to hide.

What we measured

Environment Gymnasium HalfCheetah-v4, 1M environment steps, seed 0
Algorithm off-policy SAC: twin critics, squashed Gaussian policy, learned temperature, Polyak targets
Wall clock 109 minutes on 16 CPU cores, 8 torch threads
Final evaluation 9,180 ± 45 (10 episodes, deterministic policy, at step 1,000,000)
Best evaluation 9,914 (at step 940,000)

The evaluation curve keeps climbing through the whole run — at this budget the
model is not yet plateaued, which the full eval.csv makes obvious.

What matched, what to be careful about

Matched: the regime. A from-scratch, CPU-only implementation lands above the
published reference band for the same budget, with a learning-curve shape like
the paper's. The number is not cherry-picked: it is the last row of a CSV the
plot script generates, and the curve it sits on has 50 rows.

Be careful about: the 2018 paper used v1 environments and averaged 8
seeds; this is one seed on v4 (not bit-identical physics). Our 9,180 vs the
paper's ~6,000 says "same algorithm, same hyperparameters, at least as good on
this environment version with this seed" — not "better than the paper". The
README's what-is-reproduced / what-is-not-claimed section spells this out.

Check it yourself in under an hour

Everything is MIT-licensed at sac-mujoco-repro: the single-file
implementation, the full eval.csv for this run, the plot script that turns it
into the curve, and a README whose tables are generated rather than typed. If
you'd rather skip re-running the 1M-step training yourself, the packaged
version — logs, learning curves, checkpoints — is on our store for $1.
The price exists to collect first reviews, not to gate the free repo.

Top comments (0)