GeneticTS / docsProject documentation

Reference

State and Configuration Schema

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

The simulation state can be reconstructed from four groups of data: immutable scene bounds, mutable configuration, target state, and population state. The engine does not store hidden physics state between generations; every genome evaluation creates a new Matter.js world.

type VelocityGenome = { vx: number; vy: number };
type Target = { x: number; y: number; radius: number };

type GeneticSimulationState = {
  seed: number;
  generation: number;
  target: Target;
  population: VelocityGenome[];
  solvedStreak: number;
  bestEverFitness: number;
  lastSummary: GenerationSummary;
};
Core state. The persistent state contains only the data needed to evaluate the next generation and render the current one.
populationSize = 42
targetRadius = 22
gravityStrength = 0.98
ballRadius = 12
windDirection = -18 degrees
windMagnitude = 0.18
mutationRate = 0.18
elitePercent = 18
attemptFrames = 200
successStreakTarget = 3
ghostCount = 5
Default configuration. These defaults define the baseline search space and solved condition.
Ω=[0,760]×[0,460],q0=(84,368)\Omega = [0,760] \times [0,460],\quad q_0=(84,368)
Simulation bounds. The launch point q0 and rectangular bounds define the coordinate system for targets and paths.