Gym Godot
Reinforcement Learning & Godot
For a side project, I had to experiment with Reinforcement Learning in Godot. Some of the parts which might be useful have been extracted and are now available in this repo.
The overall idea is that a Godot scene is driven through WebSocket by a Python-side server which is exposed as a standard Gym environment (while not the fastest IPC solution, WebSocket is available by default in Godot which makes it easier to install than extra native modules or dependencies).
To illustrate how to use those scripts, three demo environments were added, the classic Cartpole & Pendulum :
and the Mars-Lander environment (a 3D take on the classic 2D Lunar-Lander) :
The physic & rendering happen step-by-step and offline so that the computation can go faster than real-time. Check the repo for more details.