Auto-clicker Detection

The detection of non-human automated software interactions is a task that many game companies task seriously, to ensure fair play amongst all users.

Recently, a friend on mine approached me asking to create a non-detectable auto-clicker (a piece of software that will click at a given spot every “X” milliseconds). This post does not endorse the use of illegal auto-clickers, or software to do interactions within a game that is not allowed, however this was interesting to me as it made me think “if I was a developer at a game company, what detection methods would I employ to try find what is human interaction and what is not?”.

This is an interesting question to pose, and depending on the type of game usage, detection methods will be different, however this sparked a few weeks of research and development in to this area.

Due to time-constraints however, this project was very limited. If this project was to be carried out over a few months, machine-learning would have been a very useful tool to adopt. As, it would have been possible to generate a proper detection algorithm, then we could run supervised learning against the auto-clicker to generate a very well-formed noise function.

The Requirements

The game itself that I was targeting (for purely research purposes!) has tasks in which a user can simply click on the same spot for hours every X milliseconds to perform productive tasks. This at its core therefore allows a simple auto-clicker to be created (software which will click at a spot continually) to perform this task, yet coding one to mimic human behaviour is not so simple.

Results

There is still significant room for improvement, as stated, this project was for fun and to research in to this topic. The following graphs compare real human data of clicking consistently, compared to the data recorded from the auto-clicker trying to mimic such. The Y access is the average time between clicks, while the X is the progression of time.

Real human data, mapping time between average clicks over time for 50 seconds

Auto-clicker data, mapping time between average clicks over time for 50 seconds

Detection Methods

Time Between Clicks

To mimic a realistic variation of time between clicks, I utilized a form of 1D Perlin Noise, to fluctuate the “average” time between clicks over a long-term trend, while using a small variation between each click calculated by a non-deterministic random generator.

Breaks

Breaks were taken at random intervals, to mimic how a human would take a break. No human would click indefinitely.

Click Held Time

An often overlooked factor when writing an auto-clicker, is the length that a mouse click is held down for. This varies, and of course, uses a non-deterministic random generator. However, even though this is overlooked often, it may be OK to not implement this as depending on the software the game is generated in, the precision may be limited to 16ms (60 FPS).

Source code

The source code can be found here.