Skip to content

Add entropy field to ActorCriticInfo and PPOInfo#1808

Merged
QuantuMope merged 1 commit into
pytorchfrom
PR/andrew/add-entropy
Oct 4, 2025
Merged

Add entropy field to ActorCriticInfo and PPOInfo#1808
QuantuMope merged 1 commit into
pytorchfrom
PR/andrew/add-entropy

Conversation

@QuantuMope

Copy link
Copy Markdown
Contributor

Adds an explicit entropy field that can be used for entropy regularization. Useful if the entropy must be computed from some custom distribution that is not in dist_utils.py's _get_builder_map.

@QuantuMope
QuantuMope requested a review from emailweixu October 3, 2025 16:50
# Otherwise, we will compute it from the provided action_distribution.
if info.entropy is not ():
entropy = info.entropy
entropy_for_gradient = info.entropy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use info.log_prob in this case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this would result in a monte carlo estimate of the entropy, right? For me, I have access to the analytical entropy.

@QuantuMope
QuantuMope merged commit a74759c into pytorch Oct 4, 2025
2 checks passed
@QuantuMope
QuantuMope deleted the PR/andrew/add-entropy branch October 4, 2025 00:49
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.

2 participants