Skip to content

C++ implementation of the continuous LunarLander environment.

Notifications You must be signed in to change notification settings

instance01/continuous-lunarlander-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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<float> reset(std::mt19937 &generator);
std::tuple<std::vector<float>, double, bool> step(std::vector<double> &action);

Releases

No releases published

Packages

No packages published