Skip to content

A Caffe/C++ implementation of Deep Deterministic Policy Gradient

Notifications You must be signed in to change notification settings

adepierre/Caffe_DDPG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caffe_DDPG: A Caffe/C++ implementation of Deep Deterministic Policy Gradient algorithm

There are a lot of implementation of DDPG with Tensorflow and Python, but I couldn't find any with Caffe. So here a DDPG on the continuous mountain car example using Caffe.

Dependencies

This code relies on Caffe main branch with only two slight modifications in solver.hpp:

  • ApplyUpdate function must be moved from protected to public in Solver class definition
  • iter_ must be moved from protected to public in Solver class definition

OpenCV is also used, but you should already have it installed if you have Caffe.

I have only tested this code on Windows with Visual Studio 2015, but it should also be able to run on Linux and OS X provided that Caffe is correctly installed with the above modification.

Building

The project uses CMake as a building tool. Once you have correctly built and compiled the code, you should be abble to launch the program for both training and testing.

Training

To train a new agent, set the training parameters as you want and then launch launch_files/train.bat (or the equivalent command line if you are not on Windows). After num_episodes of training, the model is automatically tested and saved.

Testing

To test the performance of an agent, set the testing parameters and then launch launch_files/test.bat. Files with the weights of a trained agent is provided if you just want to see it in action: launch_files/Trained_Actor|Critic.caffemodel.

If you have set display parameter on, you should see something like this:

Test result

License

MIT

About

A Caffe/C++ implementation of Deep Deterministic Policy Gradient

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published