Evaluating flashbang efficiency in CS:GO

This post is dedicated to a computer program I’m creating to find good flashbangs in CS:GO. The main question behind my work is very easy to formulate but is not that easy to answer: “What is the most efficient way to use a flashbang in a given situation?”

It turns out that your brain solves this problem every time you decide to throw a flashbang. Note that there is a countless number of possible ways to throw a grenade in every single moment of each game. This means there is a zero chance for a human brain to go through each possible grenade in a suitable time.

It seems pretty reasonable to use computer analysis for such kind of problems. Imagine there is no countries a way to algorithmically measure “how good” a flash is — given this, computer might be able to generate you loads of flashes on any map and for any position.

Here is how I suppose to implement such a rating. Based on a simple idea that “flashing as many enemies as possible is good” I made a program that calculates a number of intersections of the enemie’s Fields Of View (FOV). Let’s see how it works

The default 2D projection of a single FOV looks like a regular triangle with the 90 degrees angle always placed at the player’s position:

In case there is a wall in front, the angle becomes narrower. The second picture shows the corresponding FOV plotted over a map overview. That’s the way my program displays the calculation results

What we are interested in are the intersections between different FOVs. In other words, we are looking for areas that are visible from most of the enemies’ positions. If you take just 2 positions, it’s not that hard to imagine the intersections right in-game or count them in 2D

Starting from 3-4 positions, even if they are drawn on a screen in 2D, the picture starts to look more complex for a human eye…

4FOV_red_lines

But not for a computer! Here is a heatmap based on a number of intersections

I think that a retake situation is a good example when such intersections map might give you some quick insights not visible by a human eye. Here is an example.

So as Terrorists are trying to defend a plant, they tend to hide behind the boxes. In most cases you don’t know exact positions of the enemies. However, there is a limited number of positions where Terrorists could hide during a retake. This idea might give you some intuition about the nature of flashes designed specifically for the retakes.

Here are 4 common spots on A site of de_inferno. Imagine you are CT and have to retake A-site from long

Let’s see now if the intersections heatmap could give us some idea

Note this zone in the middle. I draw it right ingame using a drawline console command and it looks pretty big which means that we could add some other positions to the starting 4 to make the flash even better.

So this is an example of how I have almost developed some interesting flash using my program. Currently it simply calculates a number of intersections between Fields Of View for any given set of positions, taking the surrounding walls into account (to some extent). It is still a 2D model but it gives you a chance to see the intersections map directly with the eyes.

You could set up all of the positions right from CS by pressing 1-2 buttons on each position (works without any cheating methods)

I see my next step in developing a “cost” function for the flash trajectories. So in case trajectory is “too visible” for a position, this position won’t get counted. It would give computer an ability to compare different flashbang trajectories’ score based on an intersections map described above.

Just a few words about my gaming experience: grenades are one of my favorite teamplay aspects, flashbangs especially. My nickname and a word “flashbang” became synonyms in my country’s 1.6 community and an obvious way to put some very original and sarcastic joke when you meet me ingame :D I played for a couple of teams you might saw in 1.6 [1] [2]

Evaluating flashbang efficiency in CS:GO