GeneticTS / docsProject documentation

Reference

Evolution Algorithm

Look up syntax, contracts, layouts, algorithms, and exact behavior.

The implemented algorithm is a compact elitist genetic search over a continuous two-dimensional genome. It is not a symbolic planner and it does not analytically solve the projectile equation. The only objective signal comes from simulated rollouts.

evaluate every genome
sort attempts by descending fitness
copy elite attempts directly
while population is not full:
  pick two parents from the ranked parent pool
  blend their velocity vectors
  optionally jitter vx and vy
  clamp velocity bounds
append a small random-reset tail
evaluate the next generation
Generation step. The algorithm preserves strong candidates, samples the ranked frontier, and keeps an explicit exploration tail.
E=clamp⁡(round⁡(e100N),2,N−1)E = \operatorname{clamp}\left(\operatorname{round}\left(\frac{e}{100}N\right), 2, N-1\right)
Elite count. The elite percentage is converted into an integer count while preserving at least two elites and at least one non-elite slot.
i=⌊U1.7 ∣P∣⌋,U∼U(0,1)i = \left\lfloor U^{1.7}\,|P| \right\rfloor,\quad U \sim \mathcal{U}(0,1)
Rank-biased index. Exponentiating the random source biases parent selection toward the front of the sorted parent pool without making parent choice deterministic.

Random resets occupy roughly eight percent of the next population. In a draggable scene, the target or field can move abruptly; the reset tail prevents a population converged around the old shot from becoming the only genetic material available for the new problem.