Multi-gun EvoBot: three guns, one selector, global-only weights #99

Closed
opened 2026-08-28 22:02:45 +02:00 by SirStone · 2 comments
Owner

Destination

EvoBot equipped with three competing guns (GF_Gun, GA_Gun, CMA_Gun) and a virtual guns selector that picks the best performer in real-time. Global-only weights — no per-enemy specialization. Improved network architecture (91→16→8→1) and full CMA-ES optimizer alongside the existing mutation-only GA.

Notes

Domain: Robocode Tank Royale, Nim language. SirRoboGarage repo, evo-bot worktree.
Skills: grilling, domain-modeling.
Predecessor maps: #61 (architecture), #74 (design decisions), #88 (checkpointing) — all closed.
Mode: plan-only. All decisions resolved in grilling session. Tickets below are implementation handoff.

Decisions locked in grilling

  1. Global-only weights — strip per-enemy persistence entirely. One global_ga.weights, one global_cma.weights. GF_Gun is stateless (histogram rebuilt each match).
  2. Network: 91→16→8→1 — two hidden layers (16, 8), ~1625 weights. HiddenDim as const, recompile to change.
  3. Full CMA-ES — no separable compromise. Auto-sized λ (~24 for 1625 dims). New cmaes.nim module, does not replace ga.nim — both coexist as separate gun optimizers.
  4. GA_Gun retained — mutation-only GA (current TOPO_Gun), same network architecture as CMA_Gun.
  5. GF_Gun — unsegmented guess-factor histogram. No neural net. Fires from tick 1. Stateless across matches.
  6. Virtual guns selector — angle-delta tracking (not wave-based). Trust threshold N=10 shots. Before 10 observations, GF_Gun is default. After 10, best angle-delta score wins.
  7. Always fire — no waiting for champion. Random-init weights from tick 1, hot-swap to latest champion when evo thread delivers one.
  8. Two evo threads — GA_Gun and CMA_Gun each run their own evolution thread concurrently.
  9. Shared replay tape — one writer (tick loop), multiple readers (both evo threads + GF_Gun).
  10. Sliding window: 30 ticks unchanged. 30×3 features + distance = 91 inputs.
  11. ADR-0002 supersedes ADR-0001. CONTEXT.md updated with new terms.

Decisions so far

All decisions resolved in charting grilling session — see list above. No individual decision tickets created; the grilling covered the full frontier.

Not yet specified

  • Training speed optimization — "we will work on training faster if required" (deferred until measured)
  • CMA-ES hyperparameter tuning beyond default λ (deferred until convergence observed)
  • GF_Gun segmentation (lateral velocity, distance) — upgrade path if unsegmented baseline is too weak

Out of scope

  • Per-enemy weight specialization (the explicit pivot away from this)
  • NEAT_Gun (topology evolution) — deferred until fixed-topology guns hit ceiling
  • Wave surfing / bullet dodging (movement system, separate effort)
  • Wave-based virtual gun detection (angle-delta is sufficient for now)
  • End-to-end RL (PPO/SAC)
  • Melee / multi-enemy support
## Destination EvoBot equipped with three competing guns (GF_Gun, GA_Gun, CMA_Gun) and a virtual guns selector that picks the best performer in real-time. Global-only weights — no per-enemy specialization. Improved network architecture (91→16→8→1) and full CMA-ES optimizer alongside the existing mutation-only GA. ## Notes Domain: Robocode Tank Royale, Nim language. SirRoboGarage repo, evo-bot worktree. Skills: grilling, domain-modeling. Predecessor maps: #61 (architecture), #74 (design decisions), #88 (checkpointing) — all closed. Mode: plan-only. All decisions resolved in grilling session. Tickets below are implementation handoff. ### Decisions locked in grilling 1. **Global-only weights** — strip per-enemy persistence entirely. One `global_ga.weights`, one `global_cma.weights`. GF_Gun is stateless (histogram rebuilt each match). 2. **Network: 91→16→8→1** — two hidden layers (16, 8), ~1625 weights. `HiddenDim` as const, recompile to change. 3. **Full CMA-ES** — no separable compromise. Auto-sized λ (~24 for 1625 dims). New `cmaes.nim` module, does not replace `ga.nim` — both coexist as separate gun optimizers. 4. **GA_Gun retained** — mutation-only GA (current TOPO_Gun), same network architecture as CMA_Gun. 5. **GF_Gun** — unsegmented guess-factor histogram. No neural net. Fires from tick 1. Stateless across matches. 6. **Virtual guns selector** — angle-delta tracking (not wave-based). Trust threshold N=10 shots. Before 10 observations, GF_Gun is default. After 10, best angle-delta score wins. 7. **Always fire** — no waiting for champion. Random-init weights from tick 1, hot-swap to latest champion when evo thread delivers one. 8. **Two evo threads** — GA_Gun and CMA_Gun each run their own evolution thread concurrently. 9. **Shared replay tape** — one writer (tick loop), multiple readers (both evo threads + GF_Gun). 10. **Sliding window: 30 ticks** unchanged. 30×3 features + distance = 91 inputs. 11. **ADR-0002** supersedes ADR-0001. CONTEXT.md updated with new terms. ## Decisions so far All decisions resolved in charting grilling session — see list above. No individual decision tickets created; the grilling covered the full frontier. ## Not yet specified - Training speed optimization — "we will work on training faster if required" (deferred until measured) - CMA-ES hyperparameter tuning beyond default λ (deferred until convergence observed) - GF_Gun segmentation (lateral velocity, distance) — upgrade path if unsegmented baseline is too weak ## Out of scope - Per-enemy weight specialization (the explicit pivot away from this) - NEAT_Gun (topology evolution) — deferred until fixed-topology guns hit ceiling - Wave surfing / bullet dodging (movement system, separate effort) - Wave-based virtual gun detection (angle-delta is sufficient for now) - End-to-end RL (PPO/SAC) - Melee / multi-enemy support
SirStone added the wayfinder:map label 2026-08-28 22:02:45 +02:00
Author
Owner

Child tickets

# Title Label Blocked by Status
#100 Strip per-enemy persistence, go global-only wayfinder:task — (frontier) OPEN
#101 Upgrade ANN to 91→16→8→1 two hidden layers wayfinder:task — (frontier) OPEN
#102 Implement CMA-ES module wayfinder:task — (frontier) OPEN
#103 Implement GF_Gun — basic guess-factor histogram wayfinder:task — (frontier) OPEN
#104 Implement virtual guns selector wayfinder:task — (frontier) OPEN
#105 Wire multi-gun system into EvoBot wayfinder:task #100, #101, #102, #103, #104 OPEN
#106 Write ADR-0002 and update CONTEXT.md wayfinder:task — (frontier) OPEN

Frontier (unblocked, ready to start): A (#100), B (#101), C (#102), D (#103), E (#104), G (#106)

## Child tickets | # | Title | Label | Blocked by | Status | |---|-------|-------|------------|--------| | [#100](https://git.fossellini.top/SirStone/SirRoboGarage/issues/100) | Strip per-enemy persistence, go global-only | wayfinder:task | — (frontier) | OPEN | | [#101](https://git.fossellini.top/SirStone/SirRoboGarage/issues/101) | Upgrade ANN to 91→16→8→1 two hidden layers | wayfinder:task | — (frontier) | OPEN | | [#102](https://git.fossellini.top/SirStone/SirRoboGarage/issues/102) | Implement CMA-ES module | wayfinder:task | — (frontier) | OPEN | | [#103](https://git.fossellini.top/SirStone/SirRoboGarage/issues/103) | Implement GF_Gun — basic guess-factor histogram | wayfinder:task | — (frontier) | OPEN | | [#104](https://git.fossellini.top/SirStone/SirRoboGarage/issues/104) | Implement virtual guns selector | wayfinder:task | — (frontier) | OPEN | | [#105](https://git.fossellini.top/SirStone/SirRoboGarage/issues/105) | Wire multi-gun system into EvoBot | wayfinder:task | #100, #101, #102, #103, #104 | OPEN | | [#106](https://git.fossellini.top/SirStone/SirRoboGarage/issues/106) | Write ADR-0002 and update CONTEXT.md | wayfinder:task | — (frontier) | OPEN | Frontier (unblocked, ready to start): A (#100), B (#101), C (#102), D (#103), E (#104), G (#106)
Author
Owner

Superseded — scope narrowed to GA_Gun only. New wayfinder map incoming.

Superseded — scope narrowed to GA_Gun only. New wayfinder map incoming.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SirStone/SirRoboGarage#99