A simple algorithm to determine whether a player is AFKing with bots/scripts

Posted by Steve

Tuesday, December 15, 2020 4:50 PM

Hey all. I study machine learning and have been thinking about ways to implement an algorithm to solve the problem of using bots to AFK without disconnecting.

Since there are only 2 possible outcomes for each classification (AFK or not AFK), it would be fairly easy to build a simple neural network to do the job. Now, every machine learning algorithm needs what we call features or attributes, which are values used by the algorithm to train, and then make decisions based on these features. Here is a short list of some features that could get the job done pretty well:

  1. Distance moved: most bots will just stand in place and jump, or just keep spamming WASD quickly. As a result of that, the player will log very little movement during the game. The higher the distance logged, the less likely that the player in question is AFKing.

  2. Damage done: this one is pretty self explanatory. Even a player placed in an unfairly high ELO will still log a few hundred damage points. Most bots being used don’t even shoot, let alone damage players. The higher the damage, the less likely a player is AFKing.

  3. Shot accuracy: first, I thought about making this feature “shots fired,” but then the bots would be modified to just shoot randomly. Accuracy would be a better measure. If a player logs a 1% accuracy, he might be using a bot that is just firing randomly into the air. If his bot is shooting enemies, then he’s pretty much hacking, which would drive up the cost of the software significantly, and would likely be detected as hacking.

  4. Getting reported by teammates: the more AFK reports against the player in question, the more likely they are AFK.

Now, the goal of this is to classify whether any of the 10 players in a match was AFKing at the end of the match. If the algorithm detects that they are, they would receive no XP, and the match will not be counted towards the requirement for ranked. In other words, that match never happened for that particular player, which would also prevent smurfs from just AFKing in ranked to drop their rank.

Keep in mind that each player is not evaluated in comparison to the other people in that same match. In other words, if you have an accuracy of 20% and your teammate has an accuracy of 70%, you will not get flagged because of that. The way it is done is that the algorithm is trained using thousands of samples of real data obtained from matches, and the optimized model is used for the classification.

Sorry for the long post. Let me know what you guys think about this idea, and feel free to ask any questions!

References

  • https://www.reddit.com/r/VALORANT/comments/kd3eha/a_simple_algorithm_to_determine_whether_a_player/
  • https://reddit.com/kd3eha

More Like This