Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TD3 DDPG Implementation: Move Sampling Inside Gradient Step LoopFix implementation mismatch #147

Merged

Conversation

alessandroassirelli98
Copy link
Contributor

This pull request addresses a discrepancy between the original TD3 and DDPG paper's algorithm and the current implementation in the repository. Specifically, the original implementation performs the sampling step outside of the gradient step loop, which diverges from the methodology outlined in the paper. We have corrected this by moving the sampling process inside the gradient step loop, aligning the implementation more closely with the intended algorithmic procedure described in the original paper and SpinningUp description.

@Toni-SM
Copy link
Owner

Toni-SM commented Apr 16, 2024

Hi @alessandroassirelli98

Great!

Please, also update:

  • docs

    • | :green:`# sample a batch from memory`
      | [:math:`s, a, r, s', d`] :math:`\leftarrow` states, actions, rewards, next_states, dones of size :guilabel:`batch_size`
    • | :green:`# sample a batch from memory`
      | [:math:`s, a, r, s', d`] :math:`\leftarrow` states, actions, rewards, next_states, dones of size :guilabel:`batch_size`
  • CHANGELOG under the following version (create it if it doesn't exist)

    ## [1.2.0] - Unreleased
    ### Fixed
    - YOUR_FIX_IMPLEMENTATION_SHORT_DESCRIPTION
    

@alessandroassirelli98
Copy link
Contributor Author

Hi @Toni-SM !
I see the current version is 1.1.0.
Should I just add a comment on that version in the changelog, like so?
Screenshot from 2024-04-16 17-29-56

@Toni-SM
Copy link
Owner

Toni-SM commented Apr 16, 2024

I see the current version is 1.1.0.

Version 1.1.0 is already released (see: https://github.com/Toni-SM/skrl/releases)

New additions/changes/fixes (like the one you proposed) will be released under version 1.2.0. Please, use this for CHANGELOG:

## [1.2.0] - Unreleased
### Fixed
- YOUR_FIX_IMPLEMENTATION_SHORT_DESCRIPTION

@Toni-SM Toni-SM merged commit a3fb36c into Toni-SM:develop Apr 17, 2024
1 check passed
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.

None yet

2 participants