Inspiration

Football fans often find themselves asking “what if?”—what if a pass had been caught, a kick had gone in, or a call had gone the other way. Fans talk about these scenarios endlessly, wondering if, perhaps, a pass had been intercepted, their team could have won the match. As fans, we cherish the joy of a championship win, feel the heartbreak of a tough loss, and constantly think and discuss what could have been different, how our team might have won the Super Bowl.

Yet, these debates often remain purely hypothetical, with no way to test or visualize them. We wanted to create a more immersive experience where fans could actually explore alternate outcomes of their “what-if” scenarios. By doing so, we open a new social dimension for sports—one that encourages meaningful conversations, deeper engagement, and a richer connection to the games we love.

What it does

SportTwist is an interactive platform that transforms how football fans experience the game. It allows users to explore “what-if” scenarios by simulating alternate outcomes of real matches, analyzing tactical variations, and visualizing how different decisions could have changed the course of a game. Users can choose to change the outcomes of specific plays to see how it might have affected the rest of the game.

Once an outcome is changed, SportTwist runs thousands of simulations based on team statistics for the season to generate accurate potential outcomes for score and winning percentage for each team, based on the change to the play-by-play outcome. The website also provides a sample of how the rest of a game may have gone if one thing had changed.

How we built it

We built our project as a full-stack web application. The backend was developed using Python and Flask, which handled all the game logic and simulations. For the simulations, we implemented Monte Carlo methods, allowing the system to predict alternate game outcomes from a given play. To configure and process the data, we leveraged the NFLverse library to retrieve detailed play-by-play data and used pandas to manipulate and analyze it efficiently.

On the frontend, we built an interactive interface using React and TypeScript, designing user flows and layouts in Figma. Finally, the frontend communicates with the backend using flask to let users select plays, tweak outcomes, and instantly see simulated results, creating an intuitive and responsive experience for football fans.

SportTwist is a web application built primarily with React and Flask.

For our frontend, we used React and Typescript to create a responsive and pleasing user interface. The color scheme is inspired by PrizePicks, and play-by-play formatting is meant to be familiar to anyone who has tracked box scores from popular sites such as ESPN.

Challenges we ran into

Our primary challenge was figuring out how to answer the “what-if” questions for our fans while keeping the experience engaging. Initially, we considered allowing users to simulate an entire match, but that approach would turn our project into something more like a full video game, which was not our goal. Thus, we decided only to allow users to change certain factors which they often talk about, for e.g., scoring a touchdown, intercepting a pass, etc.

Another major challenge was deciding which mathematical simulation to use for predicting future scenarios. We first considered Markov chains, but they failed because they ignore the history of prior plays, and basic probability models couldn’t capture the complex dependencies between events.

We ultimately chose Monte Carlo simulations, which allowed us to run thousands of realistic “what-if” scenarios, taking into account the full sequence of plays and their interactions. This provided a meaningful range of possible outcomes. However, making so many API calls initially made our website very slow, so we implemented in-memory caching instead of calling APIs every time, which significantly improved performance.

Accomplishments that we're proud of

For most of our team, HackGT 2025 was our first hackathon. We could have played it safe by sticking to familiar concepts like Markov Chains from class, but we chose to challenge ourselves by diving headfirst into Monte Carlo simulations and stochastic processes. Over the span of 36 hours, we tackled the steep learning curve of implementing Play-by-Play Probabilistic Modeling and nested simulations for individual plays—techniques that are notoriously complex, yet incredibly powerful for realistic sports simulation.

Despite occasional roadblocks, we remained determined to bring our ambitious vision to life. Our team wore multiple hats, from backend deployment and testing to graphic design and marketing. By the end of the hackathon, we had built a fully functional website capable of simulating alternate outcomes from a single play and predicting how a game would unfold differently, a true fusion of technical innovation and fan engagement.

What we learned

What's next for SportTwist

  1. Enhanced Simulation Fidelity: We plan to integrate player-level stats, including passing accuracy, speed, stamina, and injury likelihood, to make each play in the simulation more realistic.

  2. Expanded Sports Coverage: We aim to extend SportTwist to basketball and soccer, adapting our Monte Carlo engine to handle the unique rules, scoring systems, and play structures of each sport.

  3. Real-Time Interactive Experience: Users will be able to change plays on the fly and see immediate recalculated outcomes, supported by optimized in-memory caching to reduce latency.

  4. Analytics and Visualization: We will implement interactive dashboards showing probabilities of outcomes, impact of modified plays, injury scenarios, and comparative analysis for deeper fan engagement.

  5. Scalable Infrastructure: To support multiple users and simultaneous simulations, we’ll use cloud-based servers with efficient state management to maintain responsiveness and accuracy.

Share this project:

Updates