Closed Ivan-267 closed 11 months ago
Initial test failed, it seems that the received string from var message = stream.get_string()
also has alphabetic order of actions rather than the defined order (that may be fine though). Will look into the cause of the issue more closely later.
Edit: It seems that the order of the actions is changed in Python regardless of how Godot sends it on conversion to spaces.Dict
. Will experiment a bit with this when I get some time.
Edit2: Added the fix on godot_env side as well, now it should work.
This is a quick fix that should enable onnx inference to work for environments where the actions are not defined in an alphabetical order by name.
Only briefly tested, I have tried to quickly start training using
gdrl
andplay
in Editor.To do:
For an example action space that is not sorted:
With the applied fix, the action space as Printed from Python was:
(same as the order written in AIController in gdscript)
Without the fix, the order of actions is changed before it reaches Python:
More info on the issue itself is described in the linked issue.