Skip to content

Conversation

@tareknaser
Copy link
Member

This pull request introduces the GaussianNoise class and reorganizes the reinforcement learning test suite.

Implementation Details:

  • GaussianNoise Class:
    • GaussianNoise class provides the necessary noise object required for the DDPG algorithm.
    • The flexibility of the GaussianNoise class allows for potential usage in other RL algorithms, where a noise object might be necessary for training and convergence.
  • Reorganization of Tests:
    • The reinforcement learning test suite has been split into two files for improved code organization.
    • The new policy_gradient_test.cpp file includes the tests for DDPG, TD3, and SAC.

How Has This Been Tested?:

  • The DDPG algorithm is tested with the integration of the GaussianNoise class for exploration.
  • Another test to verify that the returned noise sample has the right mean and standard deviation.

This commit adds GaussianNoise class which is just a wrapper around arma::randi that is built to interact with reinforcement learning agents that expect an object of type Noise.
As of now, there is only one reinforcement learning agent that expect a Noise instance which is DDPG

Signed-off-by: Tarek <[email protected]>
This commit adds 2 new tests for the GaussianNoise class:
1- GaussianNoiseTest which makes sure that the returned noise sample has the right mean and standard deviation.
2- PendulumWithGaussianDDPG which makes sure that the DDPG agent converges when supplied with a GaussianNoise object

Signed-off-by: Tarek <[email protected]>
This commit separates the reinforcement learning policy gradient algorithms tests from other reinforcement learning agents' tests

Signed-off-by: Tarek <[email protected]>
This allows for reusability in /tests/q_learning_test.cpp, /tests/policy_gradient_test.cpp and any future reinforcement learning testing file

Signed-off-by: Tarek <[email protected]>
Copy link
Member

@zoq zoq left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together, no further comments from my side.

Copy link

@mlpack-bot mlpack-bot bot left a comment

Choose a reason for hiding this comment

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

Second approval provided automatically after 24 hours. 👍

@zoq zoq merged commit fea1700 into mlpack:master Aug 1, 2023
@zoq
Copy link
Member

zoq commented Aug 1, 2023

Thanks for another great contribution.

@rcurtin rcurtin mentioned this pull request Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants