Physics teaches.
The model predicts.
A small machine-learning model learns from your Frolf simulator. Change the throw. See what it gets right—and where it misses.
Same 12 physics checks. Who gets closer?
Give the frozen model a new glowing target. It scouts 192 possible throws cheaply and nominates 12 for the physics engine to check. Its opponent checks 12 randomly ordered throws from the same pool. Only the simulator gets to award a hit.
Train a model to unlock the challenge.
No scores yet. A clever-looking curve is not proof.
| Method | Verified result | Gap to zone | Checks to first hit | Compute |
|---|
Target radius 0.75 m. A hit means the simulated disc center enters this virtual sphere before its first collision. Targets do not move the physical pole or alter the course. This tests new objectives on a fixed environment—not generalization to new environments.
What would count as useful ML?
More verified hits or smaller misses for the same expensive-check budget. We count all 12 checks per method, and report the first successful check separately. Compute includes ML ranking plus physics evaluation, but excludes the deliberately slowed visual playback. Training cost is paid up front and only pays off if enough future searches benefit.
This is surrogate-guided search, not reinforcement learning. The model learns flight behavior from examples; search uses that knowledge to choose actions. A random-search baseline is deliberately simple, not the existing Frolf aimbot. One win is not proof: try multiple targets, keep the losses, and export the history. Unreachable targets are allowed, and both methods may fail.
Verification uses the full simulator trace, not the model's smoothed 21-point curve. Target centers and candidate pools use recorded seeds independent of training. Repeated experimentation is exploratory; a production claim needs a preregistered target suite and stronger baselines.
Does it learn?
VALIDATIONIndependent validation flights are reused to select model smoothness. The final test flights are held back until selection is complete.
Where does it miss?
TEST SETOrange points are simulated contacts. Cyan points are predictions. Connecting lines show error, in meters.
A prediction is useful when you can measure its mistakes.
This lab trains a radial-basis regression model from scratch. It learns a smooth mapping from five throw inputs to 21 flight positions and time to first contact. It does not run the physics solver to make its prediction.
Model, limitations & digital-twin potential
The simulator supplies labels at 240 integration steps per second. Features are pitch, yaw, roll, speed, and spin. RBF centers and output weights are fitted only on the training split; a validation split chooses smoothness. A separate test split reports generalization error. The baseline always predicts the mean training endpoint.
First contact can change abruptly when a disc clips a tree, pole, or can. A smooth regression model can average across those outcomes, predict through an obstacle, or produce a poor flight curve. It has no independent collision solver. Test-error percentiles describe observed errors; they are not calibrated confidence bounds for an individual throw.
This is a surrogate for one simulated course—not a validated real-world digital twin. A next step would add changing terrain, obstacle features, wind, and measured flights, then monitor prediction drift against new observations.
What is actually learning here?
The simulator is the teacher. The regressor is a compressed approximation of its behavior on one course. The value is rapid repeated estimation with visible error—not a replacement for physics or a claim of real-world accuracy.
The teacher resolves each flight.
Frolf integrates position, velocity, orientation, and decaying spin at a fixed 1/240 s step. Gravity, aerodynamic lift and drag change velocity; swept collision checks terminate a flight at its first contact with grass, vegetation, the boundary, a pole, or a can.
Fdrag = −q A CD v̂
Flift = q A CL ℓ̂
vt+Δt = vt + (F/m + g) Δt
Here q is dynamic pressure, A is disc area, and ℓ̂ is the lift direction perpendicular to travel. The existing simulator uses angle-of-attack-dependent coefficients. These are modeling assumptions, not measurements validated against a physical disc.
We resample each completed flight into 21 XYZ positions at evenly spaced fractions of its flight duration, plus time to contact: 64 outputs. The fixed arm path and course are context, not learned input features.
Learn a smooth local approximation.
The five inputs are pitch, yaw, roll, release speed, and RPM. Training-only means and standard deviations normalize their different units. Up to 80 normalized training examples become RBF centers.
φk(z) = exp(−‖z − ck‖² / 2ℓ²)
Ŷ = Ȳtrain + ΦW
W = (ΦᵀΦ + λD)−1 Φᵀ(Y − Ȳtrain)
The implementation solves this system with a Cholesky factorization rather than explicitly inverting the matrix. λ = 0.03 regularizes weights; D leaves the intercept unpenalized. Kernel width ℓ controls smoothness. We choose among 1.2, 2.2, and 3.5 using validation contact error.
There are no epochs or backpropagation: this is supervised kernel regression. Predictions are weighted basis evaluations, with no simulator call inside inference. The separate physics comparison supplies ground truth after the prediction.
Keep evaluation independent.
- Generate reproducible random throws within the declared training ranges using seed 17071.
- Shuffle with seed 7727 and split 60% train, 20% validation, 20% test before fitting normalization or centers.
- Fit output weights on train; select kernel width on validation.
- Evaluate the selected model once on test; compare with a constant mean-training-endpoint baseline.
| Feature | Range |
|---|---|
| Pitch | 20° to 50° |
| Yaw | −55° to −5° |
| Roll | −32° to 3° |
| Release speed | 9–18 m/s |
| Spin | 300–800 rpm |
The learning curve measures fixed validation flights as training examples increase. It is descriptive, not a guaranteed improvement curve. The displayed test set is independent of selection, but repeated manual tuning after inspecting it would require a fresh final holdout.
Horizontal endpoint error is √((x̂−x)²+(ẑ−z)²), reported in meters. The lab also measures mean 3D path error and time-to-contact MAE. P90 is an empirical error percentile, not a per-throw confidence interval.
Prediction is not a control policy.
This model has labels, not rewards. It does not try actions, maximize a score, or update itself from clicks. Moving a slider prepares a new input; Predict & compare runs inference and a separate physics trace. Train explicitly rebuilds the model using the selected deterministic dataset size.
A future reinforcement-learning agent could choose disc-throw controls, observe simulated outcomes, and earn rewards for reaching a target while avoiding obstacles. That would be a separate policy, with bounded actions, episode resets, and independent evaluation across unseen course seeds.
A lower-cost next step is active learning: find poorly supported throws, run the expensive simulator there, add labeled examples, and retrain. That is supervised feedback—not reinforcement learning. Neither extension is implemented in this demo.
Use the approximation where speed matters.
A trained surrogate could support instant preview updates, large what-if sweeps, or candidate ranking before expensive simulation. Keep the full solver as the final check near obstacles or when a candidate falls outside training support.
With K centers, D inputs and O outputs, inference costs roughly O(KD + KO). This lab caps K at 80, D at 5, and O at 64. Training builds basis matrices and solves an approximately 81×81 system in a worker, leaving the UI responsive.
Latency is measured locally, after warmup, across repeated predictions. Physics timing excludes rendering and data generation overhead; prediction timing excludes messaging and painting. Treat ratios as this browser's microbenchmark, not a production SLA.
Ship a model with its operating envelope.
Near an obstacle, a tiny input change can switch contact from a tree to grass. The labels become discontinuous; a smooth regressor can draw a path through solid objects. More samples help coverage but do not automatically fix this structural mismatch.
Before production, benchmark by contact type and course, add environment features or train separate regimes, and define error thresholds from the product's tolerance. Use fallback simulation for out-of-domain inputs and monitor residual drift against newly labeled flights.
Version the feature schema, units, simulator, geometry seed, data-generation recipe, splits, normalization, learned parameters, validation choices, and test metrics together. The Export experiment button packages those artifacts for inspection. No backend, external inference service, or telemetry is required.
Current run / model operating metadata
REPRODUCIBLE ARTIFACTTrain the model to inspect dataset context, parameters, split counts, and measured performance.

