AIToday
RoboticsAI Coding Assistantsr/MachineLearningPublished: Jul 31, 2026, 06:00 JST2 min read

Engineer trains LSTM to mimic human mouse movements

Key takeaway

  • A developer created a deep learning model that learned to move a computer mouse like a human, using a 2-layer LSTM combined with a Mixture Density Network.

  • The work was inspired by Precursor, a bot detector that relies on cursor tracking analysis, and suggests that neural networks can successfully replicate the nuanced patterns of human mouse movement.

3 Key Points

  1. What happened

    A machine learning engineer built a 2-layer LSTM model with a Mixture Density Network to learn and replicate human cursor tracking patterns. The work was motivated by Precursor, a recently released bot detector that analyzes cursor behavior.

  2. Why it matters

    Mouse movement patterns are difficult to replicate artificially because they contain subtle human characteristics; a successful model suggests that cursor tracking—which Precursor uses to detect bots—can be learned by neural networks, which could have implications for both bot detection robustness and understanding what makes human interaction distinctive.

  3. What to watch

    The project includes a video demonstration and code available on GitHub, allowing other researchers to evaluate the model's performance and build on the approach.

In Depth

Read the full story

The engineer took on the challenge of training a deep neural network to replicate human mouse movements, motivated by Precursor—a bot detector recently released that uses cursor tracking as its detection mechanism. The model architecture consists of a 2-layer LSTM (Long Short-Term Memory network) paired with a Mixture Density Network, a combination well-suited for learning temporal sequences with natural variance. The LSTM handles the sequential nature of mouse position and velocity over time, while the Mixture Density Network at the output layer generates a probability distribution over possible next cursor positions rather than a single deterministic prediction, capturing the inherent variability in human movement. According to the submission, the results are described as "quite impressive," indicating the model successfully learned to replicate the subtle, non-deterministic patterns that characterize human interaction. Code and a demonstration video are available on GitHub at puffinsoft/mousecrack, making the work available for other researchers to examine and build upon.

Context & Analysis

The project sits at an intersection of bot detection and neural network capability. Precursor's release—a tool designed to identify bots by analyzing cursor behavior—posed an implicit challenge: if cursor patterns are a reliable signal of human versus automated interaction, can a neural network learn and reproduce those patterns? The engineer's approach of using an LSTM (a recurrent neural network type designed to capture sequences of data) paired with a Mixture Density Network (which outputs a probability distribution rather than a single prediction) is well-suited to the task, since mouse movements form a temporal sequence with natural variance. The fact that results were described as "quite impressive" suggests the model succeeded in capturing the fine-grained, non-deterministic qualities that make human cursor movement distinct from simple automated patterns.

FAQ

What architecture did the model use?
The model is a 2-layer LSTM with a Mixture Density Network at the end.
What inspired this project?
Precursor, a recently released bot detector that uses cursor tracking, motivated the engineer to explore whether a deep neural network could learn human mouse movement patterns.
r/MachineLearningRead Original Article

Get the latest Robotics news every morning

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytime

Related Articles

Next articleOpenAI, Anthropic dominance sparks industry alarm on AI safety and power

The AI news that matters, in one minute each morning.

Sign up free