promptdojo_

Mission: overfit, then recover — step 7 of 7

Checkpoint

One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.

The mission end to end, deterministically. Build the curves: train_loss[e] = round(2.0 * 0.8e, 3); val_loss[e] = round(2.0 * 0.8e + max(0, e - 6) * 0.08, 3), for 15 epochs — train falls forever, validation turns upward after epoch 6. Run early stopping with patience 3, print every second epoch up to the stop as f"epoch {e:>2} train={...:.3f} val={...:.3f}", then f"stopped at epoch {stop_e}, kept epoch {best_e} (val={best:.3f})" and finally "train kept falling past the turn:" — proving the divergence signature.

full-screen editor opens — close anytime to keep reading.