Right now, I am building movement cheat detection using machine learning. To be more specific, I will use Expectation-Maximization (EM) algorithm for detecting hacking players and put them into suspect list. I will use an existing resource using DataPredict. The cheat detection will be done on server-side. How useful will it be for your games?
How it works
Data Collection
Player’s movement data is collected and used to train the model. Once the EM is trained, its model parameters gets extracted and placed into “Settings” module script for easy loading.
Algorithm
How EM works is that it will try to create center of clusters where data points are concentrated. This assumes that the concentrated areas are how normal players behave. The further the data point are away from the concentrated area, the lower probability that the player is “normal”. This will send the player (that gives this data) to suspect list.
What data will be collected and used
Change in position
Change in orientation
Change in velocity
Current velocity
Time spent flying
Distance travelled
Change in ping
Current ping
What happens to suspected players?
The suspected players will not be immediately kicked or banned. That will be for the developers to decide. This anti-cheat tool will only returns a list of suspected players. This allows the players to be filtered out by the developers if the behaviour is expected by the developers but not by the anti-cheat.
In addition, the developers can use this with other anti-cheat tools (either their own or made by others) to decrease false positives.
Update (10/10/23)
It seems like I won’t be using EM model, but rather One-Class SupportVectorMachine model.
Also removed network ping information as they add inaccuracy to the model.
You won’t be using a plugin to collect data, but instead, I have a built-in code for data collection.
Since we’re just predicting the probability and not train them, I don’t really expect the load will be large.
When calculating the player’s physics data from the player’s movement data, it will mostly have subtractions and memory accesses. So low load on the server for this part. (I also made the plugin for this part for data collection, so I can say it still runs smoothly).
For calculating predictions, I’m guessing it is negligible since it requires a number of simple operations like division and subtractions. The only complex operation I can think of is when applying math.exp() function. No sorting algorithm and stuff like that.
However, if you decide to constantly train the model while live using online learning, then I expect some slight lag depending how large the datasets are.
Also what is “dc address”? If you mean it is an address in US, then sorry, I don’t live in US.
I kind of made my assumptions from training self-learning AIs. I had multiple, more complex models (neural networks) being trained and doing the prediction. It didn’t seem to have quite an impact to the server’s load. That’s why I said the load will be kind of negligible since this model is actually simpler.
Don’t worry about it. Given I have experience in hacking in general, I will stress test this and evaluate its accuracy until it is very satisfactory in my eyes.
Also, the anti-cheat wouldn’t immediately kick/ban the player. That will be for the developers to decide. It will only returns a list of suspected players. This will allow the developers to combine this anti-cheat tools with others so it becomes less likely to give false positives.
Hopefully around early of next month. Right now, I am a little sick and so the progress have slightly stalled.
Also, no (because there’s one issue I need to tell). This anti-cheat assumes that it uses Roblox’s default movement properties without any speed/jump adjustments if you want to use it straight out of the box. I already have a plugin to deal with this so that you can collect data and create a new model using these collected data.
Only for training, which is done once. For the prediction, you will have stored model parameter values you can use without collecting the data all over again.
I like the idea of AI movement moderation and also bro is finally gonna recreate CorePackages (that was a joke and you wont get it if you havent seen roblox’s CorePackages lol)