Open Ivan-267 opened 5 months ago
On a related note, sb3 export guide has been updated to include preprocessing, so perhaps it is easier now to export the model with it as well, will check at some point: https://stable-baselines3.readthedocs.io/en/master/guide/export.html#export-to-onnx. But we might also need to adjust so it outputs only the action values rather than actions, values, and logprob (since we don't use the other two, and the current code in the multiagent branch only supports two different formats, our current export from sb3 and rllib).
training mode
inspector property toRGBCameraSensor3D
, if true, it sends hex encoded image data, otherwise it sends image data without hex encoding (needed for inference). Currently this needs to be set toFalse
inPlayer.tscn
when running onnx inference, and true when training. A better solution is needed in the future for these manual changes, but it's a quick way to get things working for this example.Multi-agent-env setting:
If true:
- Any AIController with done = true will receive zeroes as action values until all AIControllers are done, an episode ends at that point.
- ai_controller.needs_reset will also be set to true every time a new episode begins (but you can ignore it in your env if needed).
If false:
- AIControllers auto-reset in Godot and will receive actions after setting done = true.
- Each AIController has its own episodes that can end/reset at any point.
Set to false if you have a single policy name for all agents set in AIControllers
env_is_multiagent: false
checkpoint_frequency: 30
You can set one or more stopping criteria
stop:
episode_reward_mean: 0
config: env: godot env_config: env_path: "virtualcamera.console.exe" # Set your env path here (exported executable from Godot) - e.g. 'env_path.exe' on Windows action_repeat: null # Doesn't need to be set here, you can set this in sync node in Godot editor as well show_window: true # Displays game window while training. Might be faster when false in some cases, turning off also reduces GPU usage if you don't need rendering. speedup: 30 # Speeds up Godot physics
lambda: 0.95