# Sac Off Policy Replay

> Build and sample validated off-policy replay batches for Soft Actor-Critic recovery harnesses.

- Skill: `yzj623/sac-off-policy-replay` (Agent Skill)
- Install (CLI): `npx get-skill add yzj623/sac-off-policy-replay`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yzj623/sac-off-policy-replay/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: yzj623 (https://skillmd.com/u/yzj623)
- Updated: 2026-11-19
- Page: https://skillmd.com/skills/yzj623/sac-off-policy-replay

---


# SAC Off-Policy Replay

Use this skill when a SAC experiment needs a compact replay-buffer abstraction that stores transitions and produces deterministic minibatches. Do not compute SAC losses here.

## Inputs
- Transition records containing `state`, `action`, `reward`, `next_state`, `done`, and `log_prob`.
- Optional integer sample indices.

## Outputs
- A validated replay batch.
- Summary counts and deterministic sampled transitions.

## Workflow
1. Validate every transition has the required fields.
2. Convert numeric fields to finite floats and `done` to bool.
3. Preserve the stored transition order.
4. Sample by explicit indices so tests and recovery runs are reproducible.

## Validation
Run `python tests/test_replay.py` or validate the full skill tree with the Distiller validator.

## Limitations
This is a bounded recovery utility, not a high-throughput production replay buffer.

