Skip to content

test(ddpg): deeper DDPG coverage — multi-episode critic-loss trend + in-loop Polyak soft-update - #123

Merged
belarusian merged 1 commit into
mainfrom
build39/ddpg-deep-coverage
Sep 4, 2026
Merged

test(ddpg): deeper DDPG coverage — multi-episode critic-loss trend + in-loop Polyak soft-update#123
belarusian merged 1 commit into
mainfrom
build39/ddpg-deep-coverage

Conversation

@belarusian

Copy link
Copy Markdown
Owner

TICKET-054 / issue #122.

Adds two closed-loop DDPG tests to tests/test_ddpg_integration.py (no production-code change):

  • test_multi_episode_critic_loss_trend: runs a deterministic closed-loop, multi-episode training loop (8 episodes x 12 steps, critic update per step through the public get_allocation API) and asserts the critic actually learns — the mean critic loss over the later third of updates is at least 25% below the earlier third (measured ~57-68% reduction for seed=42).
  • test_soft_update_targets_track_online_in_loop: verifies the Polyak soft-update (_soft_update_targets, the real update used by the production loop in core.py) in context — after training, target actor/critic weights are close to but not identical to the online weights, and the target critic's Q-estimate on a probe batch is close to the online critic's.

Closes #122

…-update coverage

TICKET-054 / issue #122. Two new closed-loop tests in
tests/test_ddpg_integration.py:
- test_multi_episode_critic_loss_trend: multi-episode loop, later-third
  mean critic loss < earlier-third (critic actually learns).
- test_soft_update_targets_track_online_in_loop: Polyak targets track
  online networks inside the loop (weights close-but-not-identical,
  target critic Q-estimate near online).
No production-code change.
@belarusian
belarusian merged commit 966d8eb into main Sep 4, 2026
1 check passed
@belarusian
belarusian deleted the build39/ddpg-deep-coverage branch September 4, 2026 01:44
belarusian added a commit that referenced this pull request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deeper DDPG coverage: multi-episode critic-loss trend + in-loop Polyak soft-update

1 participant