Make your Godot project into OpenAI Gym environment to train RL models with PyTorch. This project only runs on Linux systems.
- Godot Engine version >= 3.2 compiled from source
- Boost interprocess (apt install libboost-container-dev libboost-system-dev libboost-locale-dev)
- Pytorch version >= 1.5
- Python setuptools
First, in setup.py change the variable GODOT_PATH to the root directory of godot engine source. Then run:
python setup.py
This script does several things:
- Copies GodotSharedMemory module and compiles standard godot editor (x11 platform).
- Compiles x11 export template.
- Installs python module GodotEnv that is used to communicate with the engine.
There are several example environments in the directory Environments:
InvPendulum shows the example of environment that relies heavily on the physics engine
LunarLander more complex example that shows how to randomize environment upon reset
- Models deployment: add module to load your traced model into godot engine
- Learning from pixels: passing godot viewport rendering as a torch tensor
- Complete tutorial: tutorial about complete workflow, from empty godot project to training to deployment