Bullet power formula and aiming geometry #76

Closed
opened 2026-08-25 15:07:18 +02:00 by SirStone · 1 comment
Owner

Question

How is bullet power determined, and what is the relationship between power, GF prediction, and aiming angle? Is power fixed first or derived from geometry?

Parent map: #74

## Question How is bullet power determined, and what is the relationship between power, GF prediction, and aiming angle? Is power fixed first or derived from geometry? Parent map: https://git.fossellini.top/SirStone/SirRoboGarage/issues/74
SirStone added the wayfinder:grilling label 2026-08-25 15:07:18 +02:00
Author
Owner

Resolution

Power is fixed first from distance, then ANN predicts GF within the resulting arc.

Flow:

  1. power = clamp(3.0 - (distance - 150) / 400, 0.5, 3.0) — mechanical, from current distance
  2. bullet_speed = 20 - 3 × power — game physics
  3. MEA = asin(8.0 / bullet_speed) — max escape angle for this bullet speed
  4. gf = ann.forward(sliding_window) — ANN predicts guess factor ∈ [-1, 1]
  5. aim_angle = bearing_to_enemy + gf × MEA
  6. Fire at aim_angle with power

The ANN never sees or controls power. The circular dependency (GF meaning depends on bullet speed which depends on power) is broken by fixing power first. The GA adapts to whatever arc it's given.

## Resolution **Power is fixed first from distance, then ANN predicts GF within the resulting arc.** Flow: 1. `power = clamp(3.0 - (distance - 150) / 400, 0.5, 3.0)` — mechanical, from current distance 2. `bullet_speed = 20 - 3 × power` — game physics 3. `MEA = asin(8.0 / bullet_speed)` — max escape angle for this bullet speed 4. `gf = ann.forward(sliding_window)` — ANN predicts guess factor ∈ [-1, 1] 5. `aim_angle = bearing_to_enemy + gf × MEA` 6. Fire at `aim_angle` with `power` The ANN never sees or controls power. The circular dependency (GF meaning depends on bullet speed which depends on power) is broken by fixing power first. The GA adapts to whatever arc it's given.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SirStone/SirRoboGarage#76