https://github.com/instance01/continuous-lunarlander-cpp
C++ implementation of the continuous LunarLander environment.
https://github.com/instance01/continuous-lunarlander-cpp
gym gym-environment gym-environments lunar-lander openai-gym reinforcement-learning
Last synced: 3 months ago
JSON representation
C++ implementation of the continuous LunarLander environment.
- Host: GitHub
- URL: https://github.com/instance01/continuous-lunarlander-cpp
- Owner: instance01
- Created: 2020-11-15T19:01:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-13T11:50:08.000Z (over 4 years ago)
- Last Synced: 2023-12-16T16:13:57.635Z (over 1 year ago)
- Topics: gym, gym-environment, gym-environments, lunar-lander, openai-gym, reinforcement-learning
- Language: C++
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a C++ reimplementation of OpenAI's gym environment LunarLander (the continuous version).
It works but definitely needs more work.Since it supports model-based approaches such as AlphaZero (which requires the environment to be clonable for the MCTS), it unfortunately requires a box2d fork that supports getting and setting the sleep time of bodies.
The fork is linked in this repository.## Installation
To use it, copy both `lunar_lander.cpp` and `lunar_lander.hpp` to your project and add the box2d fork as a dependency.
An example for cmake can be found [here](https://github.com/instance01/GRAB0/blob/master/src/CMakeLists.txt).After you're done, do `cmake` and `cmake --build .`.
## Usage
The API follows the standard OpenAI gym API (except for reset(), which requires a generator).
As for the generator, I'm open for PRs that move it to the constructor.```
std::vector reset(std::mt19937 &generator);
std::tuple, double, bool> step(std::vector &action);
```