Godot Gym API is an Open-Source framework to enable use of Godot 3.5 as 3D- or 2D-environment to train Reinforcement Learning (RL) algorithms.
Documentation available here.
-
Install the framework in python with the following command:
pip3 install git+https://github.com/ChernyakKonstantin/godot_gym_api.git#subdirectory=python
-
Install Godot addon into your Godot project with godot_gym_api CLI tool:
godot_gym_api install_addon <PATH_TO_YOUR_GODOT_PROJECT>
and activate installed addons in
Project/Project Settings/Plugins
tab. -
Install
protobuf
into your OS following Protocol Buffers repository.
To run an example launch main scene of Godot project examples/apple_seeker/godot
from Godot engine, then launch python training code with python examples/apple_seeker/python/train.py
command.
There is persistent TCP communication between a Godot application and Python implemented inside a gym.Env
inhereted class. Thus, feel free to use any of your favorite RL-frameworks!
Currently, there is support of Python as the programming language to implement the RL-algorithms. In Python, the environmnet provides gym
/ gymnasium
interface.
If one has a desire to implement the client for any other languages, submit pull request, please.
- Vectorized Environment support;
- Multi-agent Environment support;
Join this Telegram channel to watch for new updates.