Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
caiwzh dc4f23badd | 2 years ago | |
---|---|---|
agents/policy_gradient | 2 years ago | |
envs | 2 years ago | |
miscs | 2 years ago | |
original_papers | 2 years ago | |
utils | 2 years ago | |
README.md | 2 years ago | |
test_agent.py | 2 years ago | |
test_dummy.py | 2 years ago | |
test_math.py | 2 years ago | |
test_monitor.py | 2 years ago | |
test_pipe.py | 2 years ago | |
test_subproc.py | 2 years ago |
This is an ensemble of RL algorithm implementations under development. We currently call it as PCL-RLZoo because the project is supported by Peng Cheng Lab. We expect it to be compatible for multiple deep learning toolboxes (tensorflow, torch, tensorlayer, mindspore...) and hoping it can really become a zoo full of RL algorithms.
Unfortunately, at present, no algorithms experienced large-scale empirical tests.
You can block any last five tricks as you like by changing the default parameters in functions.
The following four lines of code are enough to start training an RL agent. The template is shown in test_agent.py.
# trying with toy environments or mujoco environments
make_env_fns = [make_env_fn("CartPole-v0",i) for i in range(8)]
envs = DummyVecEnv(make_env_fns)
# choose an agent you like
agent = TRPO_TF_Agent(envs)
agent.train_agent(init_steps=2000,num_steps=10000)
As our project support multiprocess communication by mpi4py, so you can run with the following command to start training with K sub-process.
mpiexec -n K python test_agent.py
You can also launch the training regularly as
python test_agent.py
You can use tensorboard to visualize what happened in the training process. After training, the log file will be automatically generated in the directory ".results/" and you should be able to see some training data after running the command.
tensorboard --logdir ./results/
If everything going well, you should get a similar display like below.
To visualize the training scores, training times and the performance, you need to initialize the environment as
env = MonitorVecEnv(DummyVecEnv(...))
then, after training terminated, two extra files "xxx.npy" and "xxx.gif" will be generated in the "./results/" directory. The "xxx.npy" record the scores and clock time for each episode in training. But we haven't provided a plotter.py to draw the curves for this.
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》