Skip to content

lupoglaz/GodotAIGym

Repository files navigation

GodotAIGym

logo

Make your Godot project into OpenAI Gym environment to train RL models with PyTorch. This project only runs on Linux systems for now.

Requirements

  1. Godot Engine version == 3.2 compiled from source (not tested with the later versions)
  2. Boost interprocess and time (apt install libboost-container-dev libboost-system-dev libboost-locale-dev)
  3. Pytorch version == 1.10
  4. Python setuptools

Installation

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:

  1. Downloads libtorch (v1.10) cpu only version, unpacks it
  2. Copies GodotSharedMemory module and compiles standard godot editor (x11 platform).
  3. Compiles x11 export template and dev tools
  4. Installs python module GodotEnv that is used to communicate with the engine.

Docs

InvPendulum tutorial shows how to make an environment, speed up its execution, train a model and deploy back to the engine.

API lists classes and function in python and godot.

TODO

  1. Check if it's possible to use GDNative + shared libs instead of the engine recompilation.
  2. Windows compatibility

About

Communicating with godot engine through shared memory

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •