Decouple aim() from tickGA - compute input vector once per tick #124
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Compute the 91-dimensional input vector once per tick instead of recomputing it in both aim() and tickGA(). Make aim() a pure function that receives a pre-computed vector.
Currently aim() calls toInputVec internally, duplicating 91 multiplies and additions that tickGA already performed.
Acceptance criteria
Blocked by
Input cleanup (#120) - the toInputVec signature changes from 91 to 90 elements, so aim() must be updated to match
Parent
Closes part of #118
Implemented in commit a730a9e
Summary: Decoupled aim() from tickGA by computing the input vector once per tick instead of duplicating it. aim() now receives pre-computed vector as parameter and is a pure function. Eliminates redundant 91-element vector construction per shot.
Files:
vapourbot_garage/src/vapourbot/gun.nim- aim() signature, vector parameter threading