Add Humanise feature with 5-layer human fatigue simulation#7
Open
O-mkar wants to merge 1 commit intoWorldOfBasti:masterfrom
Open
Add Humanise feature with 5-layer human fatigue simulation#7O-mkar wants to merge 1 commit intoWorldOfBasti:masterfrom
O-mkar wants to merge 1 commit intoWorldOfBasti:masterfrom
Conversation
Introduce a "Humanise" toggle that makes the auto-clicker mimic realistic
human clicking patterns, defeating statistical bot-detection. When enabled,
clicks are scheduled with variable delays driven by a multi-layer engine
instead of a fixed timer.
Five simulation layers:
- Piecewise fatigue arc (warmup → steady → onset → exhaustion)
- Random-walk drift with 80% momentum for correlated tempo clusters
- Burst rhythm with probabilistic gaps creating bimodal timing distribution
- Collapse events (micro-lapses, macro fatigue walls, rhythm breaks)
- Log-normal jitter matching human reaction-time distributions
New files: HumanFatigueEngine.swift
Modified: AutoClicker.swift, AppDelegate.swift, both storyboards,
both Localizable.strings, project.pbxproj
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a "Humanise" toggle to MaClicker that replaces the fixed-interval auto-clicker with a variable-delay engine that simulates realistic human clicking patterns. When enabled, click timing is driven by a five-layer fatigue simulation designed to pass statistical bot-detection analysis.
What Changed
New File
HumanFatigueEngine.swift— Stateful engine that computes per-click delays through five combined layers (see Algorithm section below).Modified Files
DispatchWorkItem-based recursive scheduling (replaces fixedTimer), session state management, variable hold-duration clicks.HumaniseEnabled,FatigueEnabled,NoiseEnabled,CollapseEnabled.HumanFatigueEngine.swiftto Xcode project (file ref, build file, group, build phase).Algorithm — Five Simulation Layers
1. Piecewise Fatigue Arc (
stageMultiplier)Models session-long endurance as four stages:
2. Random-Walk Drift (
noiseMultiplier+stepWalk)A momentum-based random walk (80% velocity carry-over) creates correlated tempo clusters — nearby clicks stay at a similar speed before the drift reverses. This produces the "chunky" organic rhythm visible in real human clicking charts, unlike IID random noise which creates uniform static.
Walk bounds scale with fatigue: ±12% when fresh → ±20% when exhausted.
A subtle 3-harmonic sine undertone adds long-term session uniqueness.
3. Burst Rhythm (
applyBurstRhythm)Humans click in micro-bursts of 2–6 fast clicks with brief natural pauses between them. This creates a bimodal timing distribution that is the primary statistical signature distinguishing human clicking from jitter-randomised autoclickers.
Implementation: probability-based gap system where gap chance starts at 15% and rises 7% per consecutive fast click (caps at 60%), creating variable-length bursts that don't form a detectable pattern.
4. Collapse Events (
collapseDelay)Three probabilistic pause types:
5. Log-Normal Jitter
Per-click noise uses
exp(N(0, 0.06))— a right-skewed distribution matching real human reaction-time studies. Unlike symmetric Gaussian jitter (which bot detectors flag), log-normal produces occasional longer delays with rare very short ones.Timing Pipeline
UI
The popover gains a new section below the existing controls:
All controls use Cocoa Bindings via
NSUserDefaultsController.Testing
Tested against CPS analysis tools and bot-detection systems: