Closed ra9hur closed 1 month ago
Hello,
Is there a sync
node added to the scene you're starting and set to "training" mode (default)?
If so, could you try running one of the pre-made examples such as the BallChase env, just to see if everything works in that case, as the env should be ready for training: https://github.com/edbeeching/godot_rl_agents_examples/tree/main/examples/BallChase (you can download the entire examples repository as zip then open one of the projects such as BallChase in Godot Editor).
@Ivan-267 ,
Yes, sync is added with control mode set to training (default).
I tried BallChase env as you suggested. Everything works fine. There are a few differences when we load the project.
A new build project icon
Server connection messages as highlighted were missing.
A new MSBuild tab. This was again missing.
Attaching the compressed project folder. RingPong.zip
Thanks for all the help !!
Hello,
I've taken a look at the project, to solve the issue, remove the _ready()
method in res://controller.gd
script and it should work.
The AIController3D
class that is extended from has the following _ready()
method already defined:
func _ready():
add_to_group("AGENT")
This adds the AIController to the agent group, which is used by the sync
node to detect it for training/inference/etc. If the method is overriden by the inheriting class, it won't add the AIController to the group (unless the line above is added), and so the sync node will not find any agents to train.
Got it, it works now. Thanks for your time !!
You're welcome. Closing this issue.
Environment:
I am following instructions as in the below link. https://github.com/edbeeching/godot_rl_agents/blob/main/docs/CUSTOM_ENV.md
Have setup all steps. I tried both the options.
Then run the project from Godot.
gdrl times out after a few seconds (approximately 30) with the below standard error.
I checked the status of the port using netstat.
There are no errors in Godot and ball moves randomly in 8 dummy envs.
There are no related issues on github. So assume, it has been working all along, but I am missing something very obvious. Please help.