An open API service indexing awesome lists of open source software.

https://github.com/dron3flyv3r/rl-agent-plugin

An RL Agent system with in-editor training and control. Single-/Multi-agent support.
https://github.com/dron3flyv3r/rl-agent-plugin

csharp godot multi-agent reinforcement-learning

Last synced: about 1 month ago
JSON representation

An RL Agent system with in-editor training and control. Single-/Multi-agent support.

Awesome Lists containing this project

README

          

# RL Agent Plugin for Godot 4

Reinforcement learning plugin for Godot 4 with in-editor training, live metrics, curriculum learning, self-play, distributed rollout workers, and `.rlmodel` export for inference.

## Features

- PPO, A2C, SAC, DQN, and MCTS trainers
- Shared policy groups across multiple agents
- Recurrent LSTM and GRU trunk layers for PPO/A2C
- RL editor tooling: `RLDash` and `RL Setup` dock
- Curriculum and self-play configuration resources
- Distributed rollout collection with headless workers
- Binary `.rlmodel` export/import for deployment

## Requirements

- Godot 4.6+ with C# support
- .NET SDK 8.0+

## Install in a Godot project

Latest stable release in this line: `v0.2.0-beta`

Option A: copy plugin folder

1. Copy this repository into your game project as `addons/rl-agent-plugin`.
2. Open Godot -> Project Settings -> Plugins.
4. Build once (`Alt+B`).
3. Enable `RL Agent Plugin`.
4. if RLDash aren't showing in the editor, restart the editor.

Option B: add as submodule

```bash
git submodule add https://github.com/dron3flyv3r/rl-agent-plugin.git addons/rl-agent-plugin
git submodule update --init --recursive
git -C addons/rl-agent-plugin fetch --tags
git -C addons/rl-agent-plugin checkout v0.2.0-beta
```

Optional (bleeding edge): track `main` instead of a release tag.

## Upgrade to a newer release

If you installed as a submodule, update to a newer tagged release with:

```bash
git -C addons/rl-agent-plugin fetch --tags
git -C addons/rl-agent-plugin switch
git add addons/rl-agent-plugin
```

Example:

```bash
git -C addons/rl-agent-plugin fetch --tags
git -C addons/rl-agent-plugin switch v0.2.0-beta
git add addons/rl-agent-plugin
```

To list available tags:

```bash
git -C addons/rl-agent-plugin tag --list
```

## Quick usage

1. Add an `RLAcademy` node in your training scene.
2. Add one or more `RLAgent2D` or `RLAgent3D` nodes.
3. Assign `RLTrainingConfig`, `RLRunConfig`, and per-agent `PolicyGroupConfig` resources.
4. Start training from toolbar (`Start Training`) or `RL Setup` dock.
5. Monitor metrics in `RLDash`.
6. Export checkpoints to `.rlmodel`.

## Documentation

- Docs index: `docs/README.md`
- Feature catalog: `docs/features.md`
- Get started: `docs/get-started.md`
- Configuration reference: `docs/configuration.md`
- Architecture: `docs/architecture.md`
- Algorithms: `docs/algorithms.md`
- Native build + validation: `docs/build-native.md`
- Tuning: `docs/tuning.md`

## Companion demo project

If you want ready-to-run demo scenes, use:

- https://github.com/dron3flyv3r/rl-agent-godot

That repo contains training environments and example game scenes that consume this plugin.

## License

MIT