skills/tabular/ball-landing-prediction/SKILL.md
Predict where a projectile will land using kinematic equations with estimated gravity to intercept aerial passes in game AI simulations
npx skillsauth add wenmin-wu/ds-skills tabular-ball-landing-predictionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
In physics-based game AI, aerial balls follow parabolic trajectories. Instead of chasing the ball's current position, compute where it will land using kinematic equations and run to the intercept point. This requires estimating the game's gravity constant from observation logs, then solving for landing time and applying horizontal velocity.
import numpy as np
GRAVITY = 0.098 # estimated from environment observation logs
PICK_HEIGHT = 0.5 # height at which a player can control the ball
def predict_landing(ball_pos, ball_dir):
z0 = ball_pos[2]
vz = ball_dir[2]
vx, vy = ball_dir[0], ball_dir[1]
discriminant = (vz / GRAVITY) ** 2 - 2 * (PICK_HEIGHT - z0) / GRAVITY
if discriminant < 0:
return ball_pos[:2] # ball won't reach pick height
t = vz / GRAVITY + np.sqrt(discriminant)
land_x = ball_pos[0] + vx * t
land_y = ball_pos[1] + vy * t
return [land_x, land_y]
delta_vz per step)x + vx * tball_direction[2] changes; typically constantdata-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF