Data collection layer that runs inside the bot's tick loop. Each tick: record enemy state, normalize it, maintain two buffers.
Sliding window: last 30 ticks of enemy state (lateral_vel, heading_delta, wall_distance) as a flat 90-element buffer + current distance as 91st input. This is the ANN's input vector.
Replay tape: rolling ~2000-tick buffer of full enemy states for offline GA fitness evaluation.
Normalization: per-feature fixed scaling using game constants — lateral_vel / 8.0, heading_delta / π, wall_distance / 1000.0. No runtime statistics.
Acceptance criteria
Sliding window fills with normalized enemy state each tick
Window produces a flat 91-element float array ready for ANN input
Replay tape records raw enemy states up to ~2000 ticks, oldest dropped when full
Normalization uses game constants only — no running stats, no allocations per tick
Self-check: when isMainModule with doAssert validates normalization ranges and buffer behavior
Integrated into bot skeleton's tick loop — data collection runs every tick
## Parent
https://git.fossellini.top/SirStone/SirRoboGarage/issues/80
## What to build
Data collection layer that runs inside the bot's tick loop. Each tick: record enemy state, normalize it, maintain two buffers.
Sliding window: last 30 ticks of enemy state (lateral_vel, heading_delta, wall_distance) as a flat 90-element buffer + current distance as 91st input. This is the ANN's input vector.
Replay tape: rolling ~2000-tick buffer of full enemy states for offline GA fitness evaluation.
Normalization: per-feature fixed scaling using game constants — lateral_vel / 8.0, heading_delta / π, wall_distance / 1000.0. No runtime statistics.
## Acceptance criteria
- [ ] Sliding window fills with normalized enemy state each tick
- [ ] Window produces a flat 91-element float array ready for ANN input
- [ ] Replay tape records raw enemy states up to ~2000 ticks, oldest dropped when full
- [ ] Normalization uses game constants only — no running stats, no allocations per tick
- [ ] Self-check: `when isMainModule` with `doAssert` validates normalization ranges and buffer behavior
- [ ] Integrated into bot skeleton's tick loop — data collection runs every tick
## Blocked by
- https://git.fossellini.top/SirStone/SirRoboGarage/issues/81
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
Data collection layer that runs inside the bot's tick loop. Each tick: record enemy state, normalize it, maintain two buffers.
Sliding window: last 30 ticks of enemy state (lateral_vel, heading_delta, wall_distance) as a flat 90-element buffer + current distance as 91st input. This is the ANN's input vector.
Replay tape: rolling ~2000-tick buffer of full enemy states for offline GA fitness evaluation.
Normalization: per-feature fixed scaling using game constants — lateral_vel / 8.0, heading_delta / π, wall_distance / 1000.0. No runtime statistics.
Acceptance criteria
when isMainModulewithdoAssertvalidates normalization ranges and buffer behaviorBlocked by