A chess bot that plays like a human using the Maia neural network and research-based thinking time simulation. Designed for Chess.com and Lichess.org.
Traditional chess bots (like Stockfish) are easily detected because:
- They play perfect moves instantly or with fixed delays
- Their timing patterns are inhuman (consistent, predictable)
- Move selection is superhuman (always optimal)
Result: Most bots get banned within a few games.
This bot solves detection in two ways:
Maia is a neural network trained on millions of human games at specific ELO ratings (1100-1900). Instead of finding the "best" move, Maia predicts what a human of that rating would actually play - including the natural mistakes and suboptimal choices humans make.
This is the critical innovation. Using Maia alone still resulted in bans within 4 games. After implementing research-based thinking times, we achieved 130+ games without detection.
Our thinking time model is based on analysis of 12+ million Lichess games and academic psychology research:
| Research Finding | Implementation |
|---|---|
| 21.26% of moves are premoves | Premove probability system with context awareness |
| Inverted U-curve timing | Opening fast → Middlegame slow → Endgame fast |
| Log-normal distribution | Heavy-tailed sampling (NOT Gaussian) |
| Move correlation (AR(1), ρ=0.4) | Each move's time depends on previous move |
| ELO-based variability | SD = a + b × Mean (coefficients vary by rating) |
| Context-aware adjustments | Recaptures, forced moves, complexity factors |
Think Time Formula:
├── Base time from game phase (inverted U-curve)
├── × Complexity factor (legal moves, captures, checks)
├── × Move type modifier (recaptures, forced moves, castling)
├── × Time control scaling (blitz/rapid)
├── + Move correlation (40% weight from previous move)
└── → Sample from log-normal distribution
- Maia ELO Selection: Choose your simulated rating (1100-1900)
- Time Control Modes: Blitz or Rapid timing profiles
- Realistic Mistakes: Plays like a human, not a superhuman
- Natural Timing: Indistinguishable from human players
- Traditional Stockfish engine (skill levels 0-20)
- Configurable depth, memory, and CPU threads
- Warning: High detection risk on Chess.com
- Non-Stop Matches: Automatically queues new games after each match
- Manual Mode: Press hotkey to see best move, play it yourself
- Evaluation Display: Real-time position evaluation and WDL percentages
- Accuracy Tracking: Bot accuracy vs opponent accuracy statistics
- Move Overlay: Visual arrow showing suggested moves
- Modern Dark UI: Clean PyQt6 interface with card-based layout
| Platform | Human Mode | Stockfish Mode | Non-Stop |
|---|---|---|---|
| Chess.com | Yes | Yes (risky) | Yes |
| Lichess.org | Yes | Yes | Planned |
- Python 3.8+
- Google Chrome browser
- Windows or Linux
-
Clone the repository
git clone https://github.com/nexicturbo/Human-Chess-Bot.git cd Human-Chess-Bot -
Create virtual environment
# Windows python -m venv venv # Linux python3 -m venv venv
-
Install dependencies
# Windows venv\Scripts\pip.exe install -r requirements.txt # Linux venv/bin/pip3 install -r requirements.txt
-
Maia weights and lc0 (included)
Everything needed for Human Mode is already included:
- lc0 engine in
engines/lc0/ - Maia weights (1100-1900 ELO) in
maia_original/maia_weights/
No additional downloads required for Human Mode.
- lc0 engine in
# Windows
run.bat
# or
venv\Scripts\python.exe src\gui_pyqt.py
# Linux
./run.sh
# or
venv/bin/python3 src/gui_pyqt.py- Click "Auto Download" to install Stockfish (or "Select" to choose existing)
- Click "Open Browser" - Chrome opens to your selected chess site
- Navigate to a live match
- Enable Human Mode (toggle in settings)
- Configure Maia ELO and time control
- Click "Start" or press 1
| Key | Action |
|---|---|
| 1 | Start bot |
| 2 | Stop bot |
| 3 | Make move (manual mode only) |
| Setting | Description |
|---|---|
| Maia ELO | Simulated player rating (1100-1900). Higher = stronger but still human-like |
| Time Control | Affects thinking times: Blitz (faster) or Rapid (slower, more deliberate) |
| Use GPU | Enable for faster inference if you have a compatible GPU |
Enable "Non-Stop Matches" to automatically:
- Detect game completion
- Click "New Game" button
- Wait for opponent
- Start playing the next game
Tested for 133+ consecutive games without manual intervention.
The thinking time model implements findings from:
- Lichess Database Analysis: 12+ million games analyzed for timing patterns
- Psychology Research: Human decision-making under time pressure
- Premove Studies: When and why humans premove
Key parameters:
# Premove probability
base_premove_prob = 0.2126 # 21.26% from research
# Move correlation
rho = 0.4 # AR(1) autocorrelation coefficient
# ELO-based variability (SD = a + b * Mean)
# Low ELO: a=0.1, b=0.91
# High ELO: a=0.6, b=1.36
# Time control scaling
time_scales = {"bullet": 0.4, "blitz": 1.0, "rapid": 2.5}┌─────────────────┐ ┌──────────────────┐ ┌─────────────┐
│ PyQt6 GUI │────▶│ StockfishBot │────▶│ Chrome │
│ (Main Thread) │ │ (Subprocess) │ │ (Selenium) │
└─────────────────┘ └──────────────────┘ └─────────────┘
│
▼
┌──────────────────┐
│ Maia Worker │
│ (lc0 + weights) │
└──────────────────┘
- GUI Process: PyQt6 interface, signal handling, settings management
- Bot Process: Game state detection, move execution, IPC with GUI
- Maia Worker: Subprocess running lc0 with Maia neural network weights
├── src/
│ ├── gui_pyqt.py # Main GUI application
│ ├── stockfish_bot.py # Bot logic and game loop
│ ├── maia_manager.py # Maia subprocess management
│ ├── maia_worker.py # Maia inference + thinking time
│ ├── workers.py # Background worker threads
│ ├── signals.py # PyQt signal definitions
│ ├── overlay.py # Move arrow overlay
│ └── grabbers/
│ ├── chesscom_grabber.py # Chess.com scraping
│ └── lichess_grabber.py # Lichess scraping
├── engines/
│ └── lc0/ # Leela Chess Zero engine
├── maia_original/
│ └── maia_weights/ # Maia neural network weights
└── requirements.txt
| Configuration | Games Before Ban |
|---|---|
| Stockfish (raw) | ~1-2 games |
| Maia only | ~4 games |
| Maia + Thinking Times | 133+ games (no ban) |
The research-based thinking time simulation is the key differentiator. Without it, even human-like moves get flagged due to timing patterns.
In Human Mode, the bot achieves realistic accuracy scores:
- Bot Accuracy: Compared against Stockfish's best move
- Opponent Accuracy: Tracked for reference
- Both displayed in real-time in the UI
This project is for educational and research purposes only.
Using this bot to cheat in online games violates the terms of service of Chess.com and Lichess.org. The authors do not condone cheating and are not responsible for any bans or consequences from misuse.
The goal of this project is to explore:
- Human-like AI behavior modeling
- Detection avoidance through behavioral simulation
- Neural network applications in game playing
MIT License - See LICENSE file for details.
- Maia Chess - Human-like neural network
- lc0 - Leela Chess Zero engine
- Stockfish - Open source chess engine
- PawnBit - Original project foundation


