How balajikatyan/b-ace works
B-ACE is a Godot-based beyond-visual-range air-combat simulator with a Python PettingZoo interface for single- and multi-agent reinforcement learning. The main workflow is a Python agent or training script configuring and resetting the wrapper, exchanging actions and observations with the Godot simulation, and using the resulting rewards and episode outcomes to train or evaluate policies. The README documents this interaction; sampled Python files confirm the wrapper’s Godot transport and training integration. Some Godot internals and optional example integrations are represented at subsystem level because their implementations were not sampled.
Main entry points: B_ACE_GodotPettingZooWrapper.py PettingZoo wrapper · SimManager.gd Air-combat simulation · run_simple_example.py Simple runner · train_PPO.py PPO training
Components 20
Python environment API
- PettingZoo wrapper
b_ace_py/B_ACE_GodotPettingZooWrapper.py - Godot transport
b_ace_py/godot_env.py - Action conversion
b_ace_py/utils.py - Environment config
b_ace_py/Default_B_ACE_config.json
Godot simulation
- Air-combat simulation
Godot_Air_Combat/SimManager.gd - Aircraft behavior
Godot_Air_Combat/B_ACE.gd - Fighter component
Godot_Air_Combat/components/Fighter.gd - Detection
Godot_Air_Combat/components/Detection.gd - Missile component
Godot_Air_Combat/components/Missile.gd - Observation sensors
Godot_Air_Combat/addons/godot_rl_agents/sensors - Reward functions
Godot_Air_Combat/addons/godot_rl_agents/rewards - Simulation UI
Godot_Air_Combat/gui/CanvasLayer.gd
Agent learning
- Simple runner
run_simple_example.py - PPO training
train_PPO.py - Multi-agent training
train_PPO_1.py - Policy evaluation
eval.py - Experiment runner
b_ace_py/B_ACE_ExperimentWrapper.py
Policy inference
- ONNX inference
Godot_Air_Combat/addons/godot_rl_agents/onnx/csharp/ONNXInference.cs - Inference session setup
Godot_Air_Combat/addons/godot_rl_agents/onnx/csharp/SessionConfigurator.cs
Other components
- Researcher or agent
Connections 15
- Researcher or agent → Simple runner: runs example
Readme.md - Simple runner → PettingZoo wrapper: creates environment
Readme.md - PettingZoo wrapper → Godot transport: delegates transport
b_ace_py/B_ACE_GodotPettingZooWrapper.py - PettingZoo wrapper → Action conversion: converts actions
b_ace_py/B_ACE_GodotPettingZooWrapper.py - Environment config → PettingZoo wrapper: configures environment
- PettingZoo wrapper → Air-combat simulation: launches and exchanges data
Readme.md - Air-combat simulation → PettingZoo wrapper: returns observations and outcomes
Readme.md - Researcher or agent → PPO training: starts training
- PPO training → PettingZoo wrapper: creates environment
train_PPO.py - Researcher or agent → Multi-agent training: starts training
- Multi-agent training → PettingZoo wrapper: creates environment
train_PPO_1.py - Researcher or agent → Policy evaluation: starts evaluation
- Policy evaluation → PettingZoo wrapper: creates environment
- Researcher or agent → Experiment runner: runs scenarios
- ONNX inference → Inference session setup: configures session
Godot_Air_Combat/addons/godot_rl_agents/onnx/csharp/ONNXInference.cs