Godot RL Agents
Create smarter NPCs and game characters using state-of-the-art reinforcement learning
Watch how AI agents learn to navigate complex environments, avoid obstacles, and achieve objectives through reinforcement learning.
Key Features
Reinforcement Learning
Train agents using state-of-the-art RL algorithms.
Multi-Agent Training
Enable agents to learn from each other and collaborate.
Game Integration
Seamlessly integrate with popular game engines.
Visual Training
Watch your agents learn in real-time with visual feedback.
Behavior Trees
Create complex agent behaviors using visual editors.
Export & Deploy
Export trained models for production deployment.
Training Approaches
Parallel Training
Train multiple agents simultaneously in isolated environments to accelerate learning
Layered Training
Build complex behaviors by training agents in progressively challenging scenarios
Multi-Agent Training
Enable agents to learn from each other and develop cooperative or competitive strategies
Quickstart Guide
GitHub Repository
View on GitHubGodot RL Agents
A library for training agents in the Godot game engine using state-of-the-art deep reinforcement learning algorithms.
pip install godot-rl
Please ensure you have successfully completed the quickstart guide before following this section.
Godot RL Agents supports 4 different RL training frameworks, the links below detail a more in depth guide of how to use a particular backend:
- StableBaselines3 (Windows, Mac, Linux)
- SampleFactory (Mac, Linux)
- CleanRL (Windows, Mac, Linux)
- Ray rllib (Windows, Mac, Linux)
Installation and First Training
Installation
Install the Godot RL Agents library. We recommend using a virtual environment (venv or Conda).
pip install godot-rl
Download Examples
Download one or more examples, such as BallChase, JumperHard, FlyBy.
gdrl.env_from_hub -r edbeeching/godot_rl_JumperHard
Set Permissions
Add run permissions on the game executable.
chmod +x examples/godot_rl_JumperHard/bin/JumperHard.x86_64
Train and Visualize
Start training with visualization enabled.
python examples/stable_baselines3_example.py --env_path=examples/godot_rl_JumperHard/bin/JumperHard.x86_64 --experiment_name=Experiment_01 --viz
Video Tutorial
This video tutorial demonstrates how to install the library and create a custom environment.