Giter Site home page Giter Site logo

dlac's Introduction

Deep Learning Anti-Cheat For CSGO

Input the directory with your .dem files and the model outputs predictions for every shot during the game.

from DLAC import Model

model = Model("./path_to_demos/")
model.predict_to_terminal(threshold=0.95)   # You can manually specify threshold, 0.95 by default

Installation

Windows should be as easy as:

pip install DLAC

Linux users will need to build the .so file. This requres GO.

git clone https://github.com/LaihoE/DLAC  
cd DLAC
python3 setup.py install
cd DLAC
go build -o parser.so -buildmode=c-shared

You can choose between a bigger and a smaller model

from DLAC import Model

model = Model("./path_to_demos/", model_type='big')
model.predict_to_terminal(threshold=0.99)   # 0.99 is recommended with the bigger model

The bigger model is slower with slightly better accuracy

Other ways to output predictions
model.predict_to_csv()
model.predict_to_list()

Example output from one shot

Name, Confidence of cheating, SteamId, File
PeskyCheater22, 0.9601634, 123456789, exampledemo.dem

Architecture (totally not done in paint)

Code and training loop found in "training" directory.

Current simple design

Main problem with this one is that it does the predictions independent of each other so the model can't make predictions with full information. Will probably be superseded by below models.

Multiple-kill-input GRU model

First iteration of this one seems to do similarly/better than the very optimized simple model.

Transformer model

If we can feed it patches of words, images, sequences of speech pieces or (states, actions, rewards), why not sequences of kills?
Currently not working too great. Could it be the fault of the implementer? ๐Ÿค”. Very experimental, maybe replace GRU with simple linear layer or maybe CNN?

Data

Around 500GB-1TB training data depending on how you slice the data, shape = (n_kills, timesteps, 6). The 6th variable is ID of player so that you can group together kills. 320 timesteps in total (currently only using 128).

Speed

Parsing 100 MM demos using AMD Ryzen 9 5900x (12 cores 24 threads) and m2 SSD.

In total: 41.57s
Parsing: 20.70s
Predicting: 20.87

This is done ONLY USING CPU, predictions can be sped up with GPU if needed.

Special thank you to

Demoinfocs-golang is the underlying parser used for parsing the demos, found at:
https://github.com/markus-wa/demoinfocs-golang.

87andrewh has written the majority of the specific parser used, found at: https://github.com/87andrewh/DeepAimDetector/blob/master/parser/to_csv.go

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.