I'd like to present TennisGPT, a GPT-2 based language model trained to simulate tennis match dynamics at the shot level. By treating tennis rallies as a language—where players, shot types, court positions, and match context form a structured vocabulary—the model learns to generate realistic point sequences through autoregressive prediction.
Dataset & Tokenization. Shot-level data from four Grand Slam tournaments (Australian Open, Roland Garros, Wimbledon, US Open) provided by the SCORE Network was used to train the model. The data is tokenized into 796 unique tokens: 518 professional players, shot types with directional information (forehand groundstroke to backhand side, backhand slice down the middle, etc.), court positions, tournament contexts, and game scores.
Model & Training. TennisGPT uses a compact GPT-2 architecture (4 layers, 4 attention heads, 256 embedding dimensions, ~1.5M parameters) that can be trained in 8 hours on a consumer laptop (Apple M1). After 320,000 training steps over 3 epochs, the model achieves a perplexity of 1.09 on held-out data.
Player Embeddings. A notable byproduct is learned player embeddings that capture playing style similarities. UMAP projections reveal meaningful clusters: baseline players group together, serve-and-volley specialists form distinct clusters, and historical playing style evolution becomes visible.
Interactive Demo. Fully client-side web application using ONNX Runtime WebAssembly can be found at https://vovalive.github.io/tennisgpt/. Users can simulate matches between any two players, visualize shot trajectories on an animated court, and explore the 2D embedding space—all running locally in the browser without server infrastructure.
Broader Impact. The SCORE Network provides similar shot-level data for basketball, volleyball, and other sports. Our approach demonstrates a template for applying language models to structured sports sequences, enabling applications in tactical analysis, training simulation, and sports analytics education.