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

Implementation of Vectorized Environments Class for RL #3695

Closed
wants to merge 9 commits into from

Conversation

Ali-Hossam
Copy link

Overview

Added Vectorized Environments Wrapper to Reinforcement Learning Codebase.

Vectorized Environments are a method for stacking multiple independent environments into a single environment. Instead of training an RL agent on 1 environment per step, it allows us to train it on n environments per step.

Purpose

  • Enhance RL Algorithms performance (Currently Supports only SAC).
  • A first step in implementing PPO (Proximal Policy Optimization)

Code Changes

  • Added VecEnv class which is the environment wrapper.
  • Added VecEnvReplay class which is a wrapper for replay buffers that allows storing a vector of experiences of n Envs.
  • Adapted SAC implementation to the new code.

Testing

  • [vectorized_environment_test.cpp] Added tests to validate VecEnv.

Performance

By comparing SAC performance on the pendulum environment with and without Vectorized environment, the first one converged with almost 30 episodes less.

@Ali-Hossam Ali-Hossam changed the title Victorized env Implementation of Vectorized Environments Class for RL Apr 22, 2024
Copy link

mlpack-bot bot commented May 22, 2024

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍

@mlpack-bot mlpack-bot bot added the s: stale label May 22, 2024
@mlpack-bot mlpack-bot bot closed this May 29, 2024
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.

None yet

1 participant