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.
## 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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
feed(state)/aim() → (angle, power)interfacewhen isMainModulewithdoAssertvalidates distance→power mappingBlocked by