Persistence v2: fitness header, best-gating, atomic writes, binary-dir location #94

Closed
opened 2026-08-26 07:35:54 +02:00 by SirStone · 1 comment
Owner

Parent

Spec #92 (round-end checkpointing).

What to build

Weight files gain a metadata header (format marker + stored fitness) above the float lines; loaders accept legacy headerless files and rank them never-better (−inf); saving becomes temp-file + atomic rename within the same directory; the weights directory resolves at runtime to the directory of the running binary, injectable so tests can redirect it; a best-gating decision is available (replace iff strictly greater, ties keep incumbent).

Acceptance criteria

  • New-format file writes header above 745 floats and round-trips through load
  • Legacy headerless file loads unchanged and ranks never-better
  • Gating accepts strictly-better, rejects tie and worse
  • Simulated kill mid-write leaves the previous file intact (atomic rename)
  • Weights directory resolves beside the running binary at runtime; test override works
  • Persistence self-check extended and green

Blocked by

None — can start immediately.

## Parent Spec #92 (round-end checkpointing). ## What to build Weight files gain a metadata header (format marker + stored fitness) above the float lines; loaders accept legacy headerless files and rank them never-better (−inf); saving becomes temp-file + atomic rename within the same directory; the weights directory resolves at runtime to the directory of the running binary, injectable so tests can redirect it; a best-gating decision is available (replace iff strictly greater, ties keep incumbent). ## Acceptance criteria - [ ] New-format file writes header above 745 floats and round-trips through load - [ ] Legacy headerless file loads unchanged and ranks never-better - [ ] Gating accepts strictly-better, rejects tie and worse - [ ] Simulated kill mid-write leaves the previous file intact (atomic rename) - [ ] Weights directory resolves beside the running binary at runtime; test override works - [ ] Persistence self-check extended and green ## Blocked by None — can start immediately.
SirStone added the ready-for-agent label 2026-08-26 07:35:54 +02:00
Author
Owner

Superseded — dropping per-enemy weights, pivoting to global-only weights + improved GA/network.

Superseded — dropping per-enemy weights, pivoting to global-only weights + improved GA/network.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SirStone/SirRoboGarage#94