berkeleydeeprlcourse / homework_fall2022 Goto Github PK
View Code? Open in Web Editor NEWAssignments for Berkeley CS 285: Deep Reinforcement Learning (Fall 2022)
Assignments for Berkeley CS 285: Deep Reinforcement Learning (Fall 2022)
With the LunarLander and HalfCheetah envs requiring single iteration batch sizes of > 10k for convergence, these runs take quite a long time. Gym allows multiprocessing for multiple envs at the same time in the form of the VectorEnv base class. Here's my proposal for an implementation of a vectorized environment to speed up batch sizes.
I would make a PR but the code in this repo contains many unfilled blanks (TODOs), some of which would need to be implemented in order to properly create a PR. Thus, I'm making an issue with the specified commits here.
An example of a test you can do is here. We run on the cartpole environment for 10 iterations with a batch size of 10000. We compare the single env and the vectorized env cases where we use 10 envs in the vectorized case.
Obviously the staff implementation and my implementation are different, but here are my outputs for the above test
# Without vectorization
real 1m17.553s
user 1m16.253s
sys 0m1.270s
# With vectorization, # of envs = 10
real 0m13.258s
user 0m13.899s
sys 0m2.867s
We achieve a speedup of ~6x. Let's say my LunarLander experiments take 2 hours to run. This would in theory reduce the time it takes to run the same experiment to 20 min, much more tractable, especially for students who typically only have access to CPU or colab GPUs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.