adhitsamonkar/CS2CD.Counter-Strike_2_Cheat_Detection
Counter Strike 2 Cheat Detection Dataset Overview The CS2CD (Counter-Strike 2 Cheat Detection) dataset is an anonymised dataset comprised of Counter-Strike 2(CS2) gameplay at a variety of skill-levels with cheater annotations. This dataset contains 478 CS2 matches with no cheater present, and 317 matches CS2 matches with at least one cheater present. Dataset structure The dataset is partitioned into data with at least one cheater present, and data… See the full description on the dataset page: https://huggingface.co/datasets/adhitsamonkar/CS2CD.Counter-Strike_2_Cheat_Detection.
0177
1---2license: cc-by-4.03language:4 - en5tags:6 - Game7 - Counter-Strike8 - CS29 - Counter-Strike 210 - Video Game11 - Cheat Detection12 - Gameplay13pretty_name: Counter-Strike 2 Cheat Detection14size_categories:15 - n<1K16---17 18# Counter Strike 2 Cheat Detection Dataset19 20## Overview21 22The **CS2CD (Counter-Strike 2 Cheat Detection)** dataset is an anonymised dataset comprised of Counter-Strike 2(CS2) gameplay at a variety of skill-levels with cheater annotations. This dataset contains 478 CS2 matches with no cheater present, and 317 matches CS2 matches with at least one cheater present.23 24## Dataset structure25 26The dataset is partitioned into data with at least one cheater present, and data with no cheaters present. 27 28<div style="border:1px solid #ccc; padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #000;">29 <p><strong style="color: #000">⚠️ Warning: </strong>Data containing no cheaters has not been verified</p>30 <p>Only files, containing at least one VAC(Valve Anti-cheat)-banned player, have been manually labelled and verified. Hence, <strong style="color: #000">cheaters may be present in the data without cheaters</strong>.</p>31 <p>When examining a subset containing 50 data points (demos) with no VAC-banned players, it was discovered that in 97.2% of players in these matches were not presenting any cheater-like behaviour. When examining a subset of 50 data points (demos) in the set of matches with with at least one VAC-banned player, it was discovered that the label precission of the "not cheater" label was 55.6%. This is possibly due to CS2 using <a href="https://help.steampowered.com/en/faqs/view/00EF-D679-C76A-C185" target="_blank" style="color: #007bff; text-decoration: underline;">trust factor match making</a>.</p>32 33 <p>Hence, it was decided, that resources were best spent with labeling data containing at least one VAC-banned player.</p>34 35 <p>For more information regarding the data collection see <a href="https://github.com/Pinkvinus/CS2-demo-scraper/blob/main/Research_project___Counter_Strike_2_dataset_with_labels.pdf" target="_blank" style="color: #007bff; text-decoration: underline;">Counter-Strike 2 Game data collection with cheat labelling</a> by Mille Mei Zhen Loo & Gert Lužkov.</p>36</div>37 38 39### Root folder40 41- `no_cheater_present` : Folder containing data where no cheaters are present.42- `with_cheater_present` : Folder containing data with at least one cheater present.43- `README.md`: This documentation file44 45### Data files46 47Each data point(counter strike match) is captured in 2 files: 48 49| Filetype | Sorting |Data Description |50|----------|---------| -------------|51| `.csv` | Ticks | The data is contained as a series of events, also known as ticks. Each tick has 10 rows containing data on the 10 players. |52| `.json` | Events | The data is stored by the event type. Each occurrence of an event consequently stores the tick, in which the event occurred. Note, that this file also contains general game information, such as the cheater labeling, map, and server settings. |53 54## Loading dataset55 56The following piece of code loads a single data point in the dataset. The resulting types are the same as if they were a demo parsed by demoparser2.57 58```python59import pandas as pd60import json61 62filepath = "Data/no_cheater_present/0"63 64# Loading csv tick data as a pd.DataFrame65match_0_ticks = pd.read_csv(filepath_or_buffer=filepath+".csv.gz", compression="gzip")66 67# Loading json event data a list of tuples (str, pd.Dataframe)68def json_2_eventlist(filepath:str) -> list[tuple[str, pd.DataFrame]]: 69 with open(filepath, "r") as f:70 json_data = json.load(f)71 72 data = [] 73 74 for key, value in json_data.items():75 if isinstance(value, list):76 df = pd.DataFrame(value)77 data.append((key, df))78 79 return data80 81match_0_events = json_2_eventlist(filepath=filepath+".json")82```83 84 85## Data source86 87The data is scraped from the website [csstats.gg](https://csstats.gg/) using the `ALL MATCHES` page as an entry point for scraping. This resulted in NUMBER `.dem` files. 88 89## Data processing90 91Due to `.dem` files containing sensitive information regarding the users. the data required anonymisation before publishing. This meant extracting the data from the `.dem` files and censoring sensitive data.92 93In order to extract the data from these files the python library demoparser2 was used[[github](https://github.com/LaihoE/demoparser)][[pypi](https://pypi.org/project/demoparser2/)]. The demoparser parses events and ticks as two separate data types: 94 95- events : `list[tuple[str, pd.DataFrame]]` with the string describing the event type.96- tick : `pd.DataFrame`97 98Loading of the data as recommended in the section "[Loading dataset](#loading-dataset)" returns these types as well.99 100### Data anonymisation101 102The following is the complete list of **data removed** from the dataset:103 104- `crosshair_code`105- `player_name`106- `player_steamid`107- `music_kit_id`108- `leader_honors`109- `teacher_honors`110- `friendly_honors`111- `agent_skin`112- `user_id`113- `active_weapon_skin`114- `custom_name`115- `orig_owner_xuid_low`116- `orig_owner_xuid_high`117- `fall_back_paint_kit`118- `fall_back_seed`119- `fall_back_wear`120- `fall_back_stat_track`121- `weapon_float`122- `weapon_paint_seed`123- `weapon_stickers`124- `xuid`125- `networkid`126- `PlayerID`127- `address`128- `name`129- `user_name`130- `victim_name`131- `attacker_name`132- `assister_name`133- `chat_message`134 135The following data is the complete list of **altered data** in the dataset:136 137- `steamid`138- `user_steamid`139- `attacker_steamid`140- `victim_steamid`141- `active_weapon_original_owner`142- `assister_steamid`143- `approximate_spotted_by`144 145Data added from scraping process:146- `map`147- `avg_rank`148- `server`149- `match_making_type`150- `cheater`151 152## Usage notes153 154- The dataset is formated in UTF-8 encoding.155- Researchers should **cite this dataset appropriately** in publications156- In the case that all players from a single team quits the match, a single bot is spawned to fill the empty team. This may result in kills where no steamid is present. This is due to the bot not having a steamid.157 158## Applications159 160CS2CD is well suited for the following tasks161 162- Cheat detection163- Player performance prediction164- Match outcome prediction165- Player behaviour clustering166- Weapon effectiveness analysis167- Strategy analysis168 169## Acknowledgements170 171A big heartfelt thanks to [Paolo Burelli](http://paoloburelli.com/) for supervising the project.