Reference
Physics Model and Termination
Look up syntax, contracts, layouts, algorithms, and exact behavior.
The simulator treats every candidate as a deterministic rollout in the same bounded world. A Matter.js engine is constructed per genome, gravity and wind are combined into one field vector, four walls are inserted with restitution, and the ball is launched from a fixed point. The engine advances at 60 Hz until the candidate hits the target, exhausts the frame budget, settles on the floor, or bounces enough times that the attempt no longer carries useful search information.
genome (vx, vy) | v fresh Matter.js engine | v apply net field + walls + ball velocity | v step frames -> record path, distance, contacts | +-- target overlap -> hit score +-- rest / bounce / frame cap -> miss score
The default frame budget is 200 steps. Rest detection stops attempts that reach the floor with velocity below the configured tolerance for consecutive frames. Wall-contact counting stops degenerate attempts that repeatedly bounce around the boundary instead of expressing a useful launch strategy.