tensorlayer / TensorLayer

Deep Learning and Reinforcement Learning Library for Scientists and Engineers
http://tensorlayerx.com
Other
7.33k stars 1.61k forks source link

tutorial_PG for continuous action #1105

Closed hanbaoan123 closed 3 years ago

hanbaoan123 commented 4 years ago

Despite the suggestions in tutorial_PG.py, I still don't know how to modify the code to apply to the continuous action problem. Could you please add an example to illustrate this?

quantumiracle commented 3 years ago

Hi,

You can refer to RLzoo to check the PG working for both discrete and continuous cases. The key point is to make action distribution from the policy a Gaussian for continuous case to replace the categorical distribution in discrete case, and derive the differentiable log-probability with it in the loss function. Additionally, if you simply want continuous PG-based algorithms, you can also check or use more advanced ones like PPO.

Best, Zihan