# Modelling Counter-Strike with Bayesian updating – Esports Insider

*In this piece, Darina Goldin, Director of Data Science at Bayes Esports, details how Bayes analyses CS:GO odds automatically using the Bayesian Updating method.*

Esports analytics has gained traction in the past decade, and Bayes Esports is one of the front runners for accurate and robust models. Our data scientists use a variety of techniques to do the games justice. One of them is Bayesian Updating, and while this term might sound scary at first, it’s a very easy-to-understand approach.

**How it works**

Let’s say we have two teams, Bears and Gorillas, playing Counter-Strike. For simplicity, let’s assume the match consists of only one map, though the model works the same in a best-of-three or best-of-five games. At the start of the match, we think that our two teams are equally strong. In mathematical terms we say that the probability of Bears winning is 0.5 – and the probability of Gorillas winning is, of course, also 0.5.

The game starts and Bears are playing very well. Soon they are leading 7:1. What’s the probability of the Bears winning now? Is it still 0.5 as we thought at the start? Probably not. In fact, it’s probably significantly over 0.5.

Here, we’ve already performed Bayesian Updating. At the start of the game, we had a prior belief about how likely each team was to win. Then, as we saw the match unfold, we updated our belief to match the evidence. As the game unfolds further, we will continue updating our beliefs. Each time we will ask the same question: ‘what is the probability of the Bears winning, given the current score?’

**Variables to consider**

Of course, this process of updating works both ways. Suppose the first game finished with the Bears winning 16:1. The next time the Bears play the Gorillas, we will think the Bears have a higher probability of winning, maybe 0.7. In a far more sophisticated fashion, this is what all strength-rating algorithms like Trueskill and Glicko2 do. At the core, they have an estimation of how strong a team or a player is, and after every match, this probability is updated.

This very simple principle is rooted in Bayes Theorem – one of the main theorems of probability theory. It is no coincidence that our company is called Bayes Esports. It is, in fact, a direct nod to Sir Thomas Bayes. His theorem, published post-mortem, became one of the most important laws in probability theory and statistics. It lies at the core of so many modern applications that one might even consider Sir Thomas the father of modern machine learning!

The concept of Bayesian Updating is easy – deceptively so. That is because the challenge lies not in understanding its mechanism, and not even in picking a prior belief, but in finding a correct updating rule. In real-life applications, this can be quite a challenging task.

**Predicting who will win**

Sticking with our Bears vs. Gorillas example, we have already seen that the probability of Bears winning against Gorillas is different at score 0:0 than at score 7:1. What if the score is 3:3, is it the same as 0:0?

If you are a Counter-Strike fan, you probably answered with a resounding ‘No!’ and rightfully so. This is because not all rounds are created equal in CS:GO. For instance, there are different sides — one team starts out as terrorists and the other as counter-terrorists. Each map has a different geometry, making it either easier for CT to lie in wait or for terrorists to attack.

There is another key factor to consider here, too. Which one of the two teams chose the map? Statistically, the team who picked the map has an advantage.

So our seemingly ‘even’ 3:3 is in fact everything but that. If the two teams are playing on Nuke, Bears chose the map and are Counter-Terrorists in the first half and are, despite that, tied with Gorillas, then they are playing less well than their opponents. If on the other hand they are playing terrorists and Gorillas picked the map, then Bears are doing amazing and are a lot more likely to come out victorious.

We saw that team skill estimation, map choice and side are some priors that are needed in order to estimate the probability of a team winning a given round. These, along with many others, lie at the core of Bayes Esports’ CS:GO models.

Every time new information comes in or an action is taken on the map, our round probabilities are updated. Once we have a prediction for each round, we can derive markets like correct round score or first to X rounds. We can also accumulate these to get the map win probability and ultimately the match win probability. Once the match is over, the team skill estimation is updated, too, and the cycle begins anew.

What other priors can you think of for Counter-Strike? Would they be the same for other FPS like Overwatch or Valorant? Let us know on Twitter by tagging @esportsinsider and @BayesEsports.

Find out more about ESI Digital Summer

*From our sponsor/advertiser*

Source: Read Full Article