godot_rl_agents icon indicating copy to clipboard operation
godot_rl_agents copied to clipboard

[feature] add SKRL example

Open edbeeching opened this issue 2 years ago • 4 comments

The skrl lib looks interesting, particularly as they just added multi-agent support. It would be good to add support and an example.

https://skrl.readthedocs.io/en/latest/

edbeeching avatar Jul 25 '23 13:07 edbeeching

Sounds interesting, especially the multi-agent support. Might need some plugin and env modifications to differentiate the different agent types, and if making an example using MAPPO, some suitable/cooperative task idea.

Ivan-267 avatar Jul 25 '23 14:07 Ivan-267

https://github.com/edbeeching/godot_rl_agents/assets/61947090/bc4146c6-8e78-435b-b9a3-900d453f1b9f

Sharing a small test case from yesterday based on the examples from SKRL. It's PPO with num_agents set to 1 and only one observation space used, not a proper/full implementation by any means nor a test of the learning performance, just a first attempt to get the framework to start training with Godot-RL environment.

For a full implementation with multi-agents with separate policies, observations, etc., more changes are needed.

Ivan-267 avatar Jul 26 '23 21:07 Ivan-267

Cool. It seems their MARL support is quite limited at the moment. Perhaps we can focus on other things until they have better support?

edbeeching avatar Jul 27 '23 07:07 edbeeching

Sure, we could work on a potential more complete implementation at any point. Just asking since I'm not that familiar with any MARL implementation yet and not sure what to expect, are there some useful features that are not supported yet?

Regarding the support on our side, I was only just starting to consider what might be needed. Assigning a name for each AIController and then in sync.gd having a dictionary with all unique names as keys and all agent instances with that name as values is about as far as I got on the Godot side, but whether that's a good approach and the other details could be considered more when/if we start working on a more proper implementation.

Ivan-267 avatar Jul 27 '23 12:07 Ivan-267