๐Ÿงช Sports Science Algorithm Laboratory

Design, test, and benchmark custom trajectory prediction algorithms

โ† Back to Game

For Sports Science Researchers: This lab allows you to experiment with different trajectory prediction models. Your custom algorithm will be used by the AI players to make tactical decisions. Test various friction models, surface zones, and environmental factors to see which yields the best game performance.

๐Ÿ”ฌ Custom Algorithm Editor

Sports science researchers: Import custom trajectory prediction algorithms to test against the default model. Edit the JSON below and click Submit to activate your algorithm.

๐Ÿ“– View Schema Documentation
{
  name: string,              // Algorithm name
  version: string,           // Semantic version
  author: string,            // Your name/lab
  description: string,       // What makes your algorithm unique

  parameters: {
    friction: 0-1,           // Base friction coefficient
    timeStep: number,        // Simulation step (seconds)
    maxPredictionTime: num,  // Max lookahead time
    bounceEnergyLoss: 0-1,   // Energy lost on wall bounce
    stopThreshold: number    // Min speed before stopping
  },

  customFriction?: {
    type: 'linear' | 'quadratic' | 'exponential' | 'piecewise',
    coefficients: number[],
    description: string
  },

  environment?: {
    windEnabled: boolean,
    windVx?: number,
    windVy?: number,
    surfaceFrictionZones?: [...] // Define field zones
  },

  metadata: {
    dateCreated: ISO date,
    tags: string[],
    expectedAccuracy?: number,
    benchmarkScore?: number
  }
}

๐Ÿ“Š Algorithm Performance Benchmark

Compare your custom algorithm against the baseline to see which yields better game scores

Current Game Score

0Red (Player FC)
0Blue (CPU United)

Test different algorithms and observe which leads to higher scores over multiple games

Click "Run Benchmark" to test algorithm performance

How to use this benchmark:

  1. Load your custom algorithm in the editor above
  2. Click "Run Benchmark" to compare it against the baseline
  3. Lower error values indicate better trajectory prediction accuracy
  4. Play multiple games and observe which algorithm leads to better scores
  5. Iterate on your algorithm parameters to improve performance

๐Ÿ“š How to Use the Algorithm Lab

1. Design Your Algorithm

Edit the JSON configuration to define your custom trajectory prediction algorithm. You can modify friction coefficients, time steps, bounce behavior, and even add environmental factors like wind or surface friction zones.

2. Run Benchmarks

Click "Run Benchmark" to test your algorithm's accuracy against the baseline. Lower error values indicate better prediction accuracy. The benchmark tests various ball trajectories and measures how closely your algorithm matches the ground truth.

3. Test in Game

Once you've submitted your algorithm, go back to the game. Your custom algorithm will be used for all trajectory predictions. Observe how the AI players perform with your algorithm and track the game score over multiple matches.

4. Iterate and Improve

Return to the lab to refine your algorithm based on game performance. Try different parameter combinations, friction models, or environmental factors to achieve the best results.

Research Questions to Explore:

  • Does quadratic friction (air resistance model) improve prediction accuracy for fast shots?
  • How do surface friction zones affect player positioning strategies?
  • What's the optimal time step for balancing accuracy and performance?
  • Can environmental factors like wind create more dynamic gameplay?
  • Which bounce energy loss coefficient produces the most realistic physics?

Built for sports science research and AI experimentation.
Your algorithms are stored locally and only affect your browser session.