TOPO_Gun with GF targeting #84

Closed
opened 2026-08-25 19:11:53 +02:00 by SirStone · 0 comments
Owner

Parent

#80

What to build

Wire ANN, GA, sliding window, replay tape, and normalization into a working gun module that replaces head-on firing with guess-factor targeting.

Gun interface: feed(state) / aim() → (angle, power).

Power formula: power = clamp(3.0 - (distance - 150) / 400, 0.5, 3.0) — applied first.
Aiming: bullet_speed = 20 - 3 × power, MEA = arcsin(8.0 / bullet_speed), aim_angle = bearing_to_enemy + gf × MEA.

GA runs on a parallel thread, evolving against the replay tape. Champion is pushed to inference when it beats current. Evolution never blocks the tick loop.

First adaptive shot: bot fires aimed bullets at OscillatorBot using ANN-predicted guess factors.

Acceptance criteria

  • Gun module exposes feed(state) / aim() → (angle, power) interface
  • Power formula produces values clamped to [0.5, 3.0] based on distance
  • ANN predicts GF, converted to aim angle via MEA geometry
  • GA evolves on a parallel thread without blocking the tick loop
  • Fitness evaluated as virtual bullet hits on sampled replay tape ticks
  • Champion promoted to inference when it beats current champion
  • Bot fires adaptively at OscillatorBot — visibly better than head-on over time
  • Power formula self-check: when isMainModule with doAssert validates distance→power mapping

Blocked by

## Parent https://git.fossellini.top/SirStone/SirRoboGarage/issues/80 ## What to build Wire ANN, GA, sliding window, replay tape, and normalization into a working gun module that replaces head-on firing with guess-factor targeting. Gun interface: `feed(state)` / `aim() → (angle, power)`. Power formula: `power = clamp(3.0 - (distance - 150) / 400, 0.5, 3.0)` — applied first. Aiming: `bullet_speed = 20 - 3 × power`, `MEA = arcsin(8.0 / bullet_speed)`, `aim_angle = bearing_to_enemy + gf × MEA`. GA runs on a parallel thread, evolving against the replay tape. Champion is pushed to inference when it beats current. Evolution never blocks the tick loop. First adaptive shot: bot fires aimed bullets at OscillatorBot using ANN-predicted guess factors. ## Acceptance criteria - [ ] Gun module exposes `feed(state)` / `aim() → (angle, power)` interface - [ ] Power formula produces values clamped to [0.5, 3.0] based on distance - [ ] ANN predicts GF, converted to aim angle via MEA geometry - [ ] GA evolves on a parallel thread without blocking the tick loop - [ ] Fitness evaluated as virtual bullet hits on sampled replay tape ticks - [ ] Champion promoted to inference when it beats current champion - [ ] Bot fires adaptively at OscillatorBot — visibly better than head-on over time - [ ] Power formula self-check: `when isMainModule` with `doAssert` validates distance→power mapping ## Blocked by - https://git.fossellini.top/SirStone/SirRoboGarage/issues/82 - https://git.fossellini.top/SirStone/SirRoboGarage/issues/83
SirStone added the ready-for-agent label 2026-08-25 19:11:53 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SirStone/SirRoboGarage#84