Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LucasWaelti/RL_Webots
Webots project to show how to use Deep Reinforcement Learning with Webots in C++.
https://github.com/LucasWaelti/RL_Webots
cpp deep-reinforcement-learning libtorch policy-gradient python pytorch rl webots
Last synced: 25 days ago
JSON representation
Webots project to show how to use Deep Reinforcement Learning with Webots in C++.
- Host: GitHub
- URL: https://github.com/LucasWaelti/RL_Webots
- Owner: LucasWaelti
- License: mit
- Created: 2020-04-05T07:37:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-05T12:54:55.000Z (over 4 years ago)
- Last Synced: 2024-08-03T15:04:40.877Z (4 months ago)
- Topics: cpp, deep-reinforcement-learning, libtorch, policy-gradient, python, pytorch, rl, webots
- Language: C++
- Size: 35.2 KB
- Stars: 36
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-webots - Deep Reinforcement Learning with PyTorch
README
# RL_Webots
This repository shows how Deep Reinforcement Learning can be used within Webots. This project was developed under Linux. While it should be possible to use it with other operating systems, this was not tested.The code presented in this repository was adapted from a semester project at the [Distributed Intelligent Systems and Algorithms Laboratory (DISAL)](https://www.epfl.ch/labs/disal/). A summary of the project can be found [here](https://disalw3.epfl.ch/teaching/student_projects/ay_2019-20/ws/DISAL-SP133_summary.pdf). The part presented here is about **Deep Reinforcement Learning**, leveraging **Policy Gradient** to train a fully connected, feed forward neural network to solve a simple **obstacle avoidance task** on a **continuous action space** with a Khepera IV robot.
The project was entirely implemented in C++ and relies on [libtorch](https://pytorch.org/cppdocs/), [PyTorch](https://pytorch.org/)'s C++ API.
## Install
Download [PyTorch's C++ API](https://pytorch.org/). Choose following options:
- Build: Stable
- OS: Linux
- Package: LibTorch
- Language: C++
- CUDA: Noneand click on the second link (cxx11 ABI, 87.4M). Extract the zip file wherever you like on your computer. You need to edit the `env.sh` script and adapt the path to your libtorch installation folder:
```bash
export LIBTORCH_PATH=/path/to/libtorch
```Open up a terminal, go to the project folder and run the following commands to build the project:
```bash
source env.sh
./build_project.sh
```
## Documentation
Please visit the repository's [wiki](https://github.com/LucasWaelti/RL_Webots/wiki) for more details.