Thanos: The Math Behind Chance

Inspiration

Imagine, instead of predicting the next spin of a slot machine, figuring out the hidden mathematics behind the payouts!

This problem gave birth to Thanos, the machine learning project we developed for the House Edge challenge at TAMU Datathon 2026.

We were interested in how much knowledge we can gain about a system that is not directly observable. Hidden probabilities, the ability to change over time, and incomplete observations – all of this makes slot machines an interesting challenge.

What it does

Thanos studies the past payouts of the slot machines in order to make an assessment of the likelihood of five potential outcomes: 0x, 1x, 2x, 5x, and 20x.

While other approaches predict one possible outcome, Thanos creates a probability distribution for each slot machine’s next spin.

The task is not only about counting occurrences but also learning from various machines' behavior and changes in payout schemes when the information is limited and uncertain.

How We Built It

In approaching House Edge, we took it as a forecasting task based on probabilities.

Our efforts were focused on exploring payout frequency distributions, discovering dependencies between outcomes in various time lags, and finding out how it can be used for improving the forecasting performance.

We considered empirical Bayes methodology to make use of the available information in our estimations of probabilities but without being overly confident about limited data.

A special attention was paid to adaptability since the second stage of the competition required us to consider the possibility of changed dependencies, hence it was better to develop a model which could adapt to new data rather than relying on unchanged historical dependencies.

Forecasting methods were checked against the validation dataset provided by the competition where one could compare his forecast with the true probabilities used by the simulator.

The goal was to decrease probability errors, not simply maximize the number of correctly guessed outcomes.

Challenges we Faced

1. Learning with incomplete data

The true probabilities were unknown and the observed payments were only partial evidence. In short runs, it became particularly hard to separate signal from noise.

2. Recognizing the timing of temporal relations

Past results can affect future probabilities in different ways, depending on how much time elapsed between them. We needed to think hard about the correct way to detect them.

3. Forecasting with shifting probabilities

A model trained on one set of probabilities may not work well for others. Developing forecasting algorithms capable of adapting to change was one of our main challenges.

4. Tradeoff between complexity and reliability

Models that are more complex are not necessarily better. We needed to find the right balance between better forecasts and overfitting problems.

What We Learned

The key insight here is that forecasting uncertainty is fundamentally different than forecasting events.

A good model doesn't have to be able to predict events that will occur; it has to assign probabilities to those events that appropriately capture what might occur.

We also learned the importance of statistical regularization, temporal feature engineering, and validation in dealing with small and dynamic datasets.

The most important thing that Thanos reminded us is that machine learning does not have to mean constructing complex models; rather, it means finding signals in noise.

Next Steps

The concepts behind Thanos go beyond slot machine simulation.

Many practical systems have hidden states, partial observations, and shifting probabilities. Whether it's about stock markets, equipment failure rates, and operation forecasting, the core concept remains the same – understanding how the system works given that its true behavior is not observable.

Thanos is what we tried to achieve by addressing the issue of understanding hidden behavior through probabilistic inference.

It wasn't about winning against chance, it was about comprehending it.

Built With

  • analysis
  • analytics
  • bayes
  • data
  • empirical
  • engineering
  • feature
  • forecasting
  • learning
  • machine
  • modeling
  • predictive
  • probability
  • python
  • science
  • series
  • statistical
  • time
Share this project:

Updates

Submission history