Pure-logic modules for the feedforward ANN (91→8→1, tanh activation, 745 weights) and mutation-only GA (population management, truncation selection, Gaussian mutation on all weights, single elite with re-evaluation). No game dependency — these are standalone modules with when isMainModule self-checks.
GA: population 64–200, σ = 0.005–0.01, top 20–50% truncation selection, no crossover, single elite. Parameters as constants (calibration knobs).
Builds on the pattern from prototypes/ga_gun_spike/ga_spike.nim but production-shaped and scaled to 91→8→1.
Acceptance criteria
ANN forward pass produces deterministic output for known weights + known inputs
ANN self-check: when isMainModule with doAssert validates forward pass
GA evolves a population and fitness improves over generations (toy fitness function)
GA self-check: when isMainModule with doAssert validates evolution improves fitness
Single elite is preserved across generations
All GA parameters defined as constants (population size, σ, selection ratio)
Modules compile and self-checks pass without -d:danger
Blocked by
None — can start immediately.
## Parent
https://git.fossellini.top/SirStone/SirRoboGarage/issues/80
## What to build
Pure-logic modules for the feedforward ANN (91→8→1, tanh activation, 745 weights) and mutation-only GA (population management, truncation selection, Gaussian mutation on all weights, single elite with re-evaluation). No game dependency — these are standalone modules with `when isMainModule` self-checks.
ANN: flat weight layout [W1(91×8), b1(8), W2(8×1), b2(1)]. Pure `forward(weights, inputs) → float` interface.
GA: population 64–200, σ = 0.005–0.01, top 20–50% truncation selection, no crossover, single elite. Parameters as constants (calibration knobs).
Builds on the pattern from `prototypes/ga_gun_spike/ga_spike.nim` but production-shaped and scaled to 91→8→1.
## Acceptance criteria
- [ ] ANN forward pass produces deterministic output for known weights + known inputs
- [ ] ANN self-check: `when isMainModule` with `doAssert` validates forward pass
- [ ] GA evolves a population and fitness improves over generations (toy fitness function)
- [ ] GA self-check: `when isMainModule` with `doAssert` validates evolution improves fitness
- [ ] Single elite is preserved across generations
- [ ] All GA parameters defined as constants (population size, σ, selection ratio)
- [ ] Modules compile and self-checks pass without `-d:danger`
## Blocked by
None — can start immediately.
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
Pure-logic modules for the feedforward ANN (91→8→1, tanh activation, 745 weights) and mutation-only GA (population management, truncation selection, Gaussian mutation on all weights, single elite with re-evaluation). No game dependency — these are standalone modules with
when isMainModuleself-checks.ANN: flat weight layout [W1(91×8), b1(8), W2(8×1), b2(1)]. Pure
forward(weights, inputs) → floatinterface.GA: population 64–200, σ = 0.005–0.01, top 20–50% truncation selection, no crossover, single elite. Parameters as constants (calibration knobs).
Builds on the pattern from
prototypes/ga_gun_spike/ga_spike.nimbut production-shaped and scaled to 91→8→1.Acceptance criteria
when isMainModulewithdoAssertvalidates forward passwhen isMainModulewithdoAssertvalidates evolution improves fitness-d:dangerBlocked by
None — can start immediately.