Skip to content

fix(sac): discount entropy backup in target - #110

Open
zjn20030811 wants to merge 1 commit into
rail-berkeley:mainfrom
zjn20030811:fix/sac-entropy-target
Open

fix(sac): discount entropy backup in target#110
zjn20030811 wants to merge 1 commit into
rail-berkeley:mainfrom
zjn20030811:fix/sac-entropy-target

Conversation

@zjn20030811

Copy link
Copy Markdown

When backup_entropy is enabled, critic_loss_fn currently subtracts temperature*log_prob after bootstrapping, so terminal transitions receive an entropy correction and the correction is not discounted. This change builds the next-state value first and applies the discount and mask to both Q and entropy terms, with focused regression tests for terminal and non-terminal targets. Tests: pytest serl_launcher/tests/test_sac.py -q (2 passed). Fixes #93

Apply the entropy backup inside the discounted, terminal-masked next-state value and cover both entropy and non-entropy targets with deterministic tests.

Fixes rail-berkeley#93
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.

SAC code doesn't appropriately implement target_q

1 participant