Skip to content

A.N.N.A RL PoC Implementation#75

Draft
icarito wants to merge 1 commit into
mainfrom
anna-rl-poc-v1-11762324196710831246
Draft

A.N.N.A RL PoC Implementation#75
icarito wants to merge 1 commit into
mainfrom
anna-rl-poc-v1-11762324196710831246

Conversation

@icarito
Copy link
Copy Markdown
Owner

@icarito icarito commented Feb 23, 2026

Implemented the Proof of Concept for the A.N.N.A. Reinforcement Learning agent.
Key features:

  1. Lock-Step Synchronization: AnnaBridge now supports ANNA_RL_MODE where the game loop is paused and only advanced by one physics frame upon receiving a TCP command.
  2. RL Interface: AnnaInterface provides normalized observations (RayCasts, Target Dist/Angle, Velocity) and maps discrete actions to player inputs.
  3. Gymnasium Wrapper: core_v2/anna/rl/anna_env.py provides a standard Gym interface for the agent, with robust error handling (returning zero tensors on comms failure).
  4. Training Scene: core_v2/anna/AnnaTrainingArena.tscn generated via tool script to ensure a clean environment without external asset dependencies.
  5. Target Fallback: Logic added to randomize target position even if the visual node fails to load in headless mode, ensuring training continuity.

PR created automatically by Jules for task 11762324196710831246 started by @icarito

- Implemented `AnnaInterface` with RL-specific observation (12 floats) and action (Discrete 5) spaces.
- Added Lock-Step synchronization in `AnnaBridge` (wait 1 physics frame per step) to ensure deterministic training.
- Created robust Python Gymnasium environment `AnnaEnv` that handles failures gracefully (returns zero tensors).
- Generated `AnnaTrainingArena.tscn` programmatically to bypass audio dependency issues in headless mode.
- Added `train_ppo.py` for SB3 training.
- Implemented fallback logic for Target resolution to allow training even if specific scene nodes are missing.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant