rll / rllab

rllab is a framework for developing and evaluating reinforcement learning algorithms, fully compatible with OpenAI Gym.
Other
2.89k stars 803 forks source link

Saving/Storing TRPO optimal policy #155

Open Riashat opened 7 years ago

Riashat commented 7 years ago

Hi,

Is there any simple way in rllab to save the optimal learnt policy?

For example, using TRPO, I want to save the already learnt policy, so that I can simply look into the trajectory/path of the learnt policy later.

I want to download and visualize the learned policy.

I want to then collect samples as here from the learnt policy I have stored/saved using this https://rllab.readthedocs.io/en/latest/user/implement_algo_basic.html#collecting-samples

OpenAI/baselines have a nice way of doing this as here https://github.com/openai/baselines

(wondering how to use something like this for openai/rllab TRPO for example)

dementrock commented 7 years ago

If you run your code via run_experiment_lite, it should automatically save parameters to under the data/ folder. To run the policy you can use https://github.com/openai/rllab/blob/master/scripts/sim_policy.py