Action mapping module #43

Closed
opened 2026-08-20 23:28:10 +02:00 by SirStone · 1 comment
Owner

Parent

#37

What to build

Maps raw network output (4 continuous values from tanh) to BotIntent fields.

  • a[0]: Body turn rate — tanh * (10 - 0.75 * abs(currentSpeed)) (speed-aware mapping so full output range always maps to achievable turn rates)
  • a[1]: Acceleration — mapped to [-2, +1] (asymmetric: decel at -2, accel at +1, matching TankRoyale physics)
  • a[2]: Gun turn rate — mapped to [-20, +20] degrees/tick
  • a[3]: Fire — negative = don't fire; positive = fire power mapped to [0.1, 3.0]

Acceptance criteria

  • Speed-aware turn rate: at speed 0 → full ±10°; at speed 8 → ±4°
  • Acceleration clamped to [-2, +1]
  • Fire threshold: a[3] < 0 → no fire; a[3] > 0 → fire with power in [0.1, 3.0]
  • Gun turn rate bounded to [-20, +20]
  • test_actions.nim passes

Blocked by

  • #38 (SAC_LSTM_Bot: project scaffold)
## Parent #37 ## What to build Maps raw network output (4 continuous values from tanh) to BotIntent fields. - `a[0]`: Body turn rate — `tanh * (10 - 0.75 * abs(currentSpeed))` (speed-aware mapping so full output range always maps to achievable turn rates) - `a[1]`: Acceleration — mapped to [-2, +1] (asymmetric: decel at -2, accel at +1, matching TankRoyale physics) - `a[2]`: Gun turn rate — mapped to [-20, +20] degrees/tick - `a[3]`: Fire — negative = don't fire; positive = fire power mapped to [0.1, 3.0] ## Acceptance criteria - [ ] Speed-aware turn rate: at speed 0 → full ±10°; at speed 8 → ±4° - [ ] Acceleration clamped to [-2, +1] - [ ] Fire threshold: `a[3] < 0` → no fire; `a[3] > 0` → fire with power in [0.1, 3.0] - [ ] Gun turn rate bounded to [-20, +20] - [ ] `test_actions.nim` passes ## Blocked by - #38 (SAC_LSTM_Bot: project scaffold)
SirStone added the ready-for-agent label 2026-08-20 23:28:10 +02:00
Author
Owner

Action mapping module complete — speed-aware turn, asymmetric accel [-2,+1], fire threshold. 19/19 tests pass.

Action mapping module complete — speed-aware turn, asymmetric accel [-2,+1], fire threshold. 19/19 tests pass.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SirStone/SirRoboGarage#43