Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecates the use of gdrl #199

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ You may need to add run permissions on the game executable.
chmod +x examples/godot_rl_JumperHard/bin/JumperHard.x86_64
```

Train and visualize

Train and visualize, first download the [Stable Baselines 3 example](https://github.com/edbeeching/godot_rl_agents/blob/main/examples/stable_baselines3_example.py) script in the github repo:
```bash
python examples/stable_baselines3_example.py --env_path=examples/godot_rl_JumperHard/bin/JumperHard.x86_64 --experiment_name=Experiment_01 --viz
```

Deprecated usage with an entrypoint (to be removed in version 1.0):
```
gdrl --env=gdrl --env_path=examples/godot_rl_JumperHard/bin/JumperHard.x86_64 --experiment_name=Experiment_01 --viz
```

Expand All @@ -54,7 +58,7 @@ You can also train an agent in the Godot editor, without the need to export the

1. Download the Godot 4 Game Engine from [https://godotengine.org/](https://godotengine.org/)
2. Open the engine and import the JumperHard example in `examples/godot_rl_JumperHard`
3. Start in editor training with: `gdrl`
3. Start in editor training with: `python examples/stable_baselines3_example.py`

### Creating a custom environment

Expand Down
6 changes: 6 additions & 0 deletions godot_rl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"""

import argparse
import warnings

try:
from godot_rl.wrappers.ray_wrapper import rllib_training
Expand Down Expand Up @@ -94,6 +95,11 @@ def get_args():


def main():
warnings.warn(
"This use of gdrl is deprecated and will be removed in version 1.0, please refer to the examples in the github repo",
DeprecationWarning,
)

args, extras = get_args()
if args.trainer == "rllib":
training_function = rllib_training
Expand Down
Loading