PacktPublishing / Hands-On-Intelligent-Agents-with-OpenAI-Gym

Code for Hands On Intelligent Agents with OpenAI Gym book to get started and learn to build deep reinforcement learning agents using PyTorch
https://www.packtpub.com/big-data-and-business-intelligence/hands-intelligent-agents-openai-gym
MIT License
371 stars 149 forks source link

Transfer a policy to CARLA #7

Closed AliBaheri closed 5 years ago

AliBaheri commented 6 years ago

Hi @praveen-palanisamy, thanks for doing great work.

I have a policy from an RL algorithm in .pk format and I want to see if the car drives well or not on CARLA. Do you know how can I do that or refer me to a good tutorial for this purpose?

test_agent_proc.start() test_agent_proc.join()

Thanks.

praveen-palanisamy commented 6 years ago

I assume that you are referring to the trained policy weights stored in a (pickle ?) file. If you have the policy graph definitions, you can create a new policy object and load the weights from this saved policy file and then run the agent in "test" mode (rollouts without training/updating the policy) similar to the --test mode in train_a2c.py script in this repo.