Skip to content

Feat: Implement Random Move Delays to simulate human behavior#81

Open
sght500 wants to merge 1 commit intoPanagiotisIatrou:mainfrom
sght500:feature/random-delays
Open

Feat: Implement Random Move Delays to simulate human behavior#81
sght500 wants to merge 1 commit intoPanagiotisIatrou:mainfrom
sght500:feature/random-delays

Conversation

@sght500
Copy link

@sght500 sght500 commented Jan 4, 2026

Random Delays to Simulate Human Behavior

Hello! I have implemented the "Random delays in between moves" feature listed in the Future features section of the README.

The goal of this update is to make the bot's interactions with the board appear more organic, helping to simulate human behavior and reduce the likelihood of automated detection.

Changes Implemented:

1. Variable Mouse Dragging Speed:
Instead of a fixed duration for piece movement, the script now randomizes the time taken to drag a piece from the starting square to the target square.

  • Logic: The duration is now randomized between mouse_latency - 1.0 and mouse_latency + 1.0 seconds.
  • Result: This mimics the natural variance in how a person physically slides a mouse.

2. Dynamic Thinking Time:
I added a randomized delay immediately before the bot calls stockfish.get_best_move().

  • Logic: The bot now waits for a random interval between mouse_latency and mouse_latency + 2.5 seconds before finalizing its move choice.
  • Result: This simulates a human "pause for thought," ensuring that the bot doesn't respond with identical timing on every turn.

Impact:

These changes provide a more realistic human-like profile regarding both Thinking Time (calculation phase) and Movement Time (execution phase). The bot now naturally slides pieces like a human player, while still allowing the user to remain in control of the average speed via the mouse_latency setting.


Thank you for maintaining this project and for considering my contribution! I’m happy to make any adjustments if you have specific feedback on the timing ranges.

Best regards,
SGHT500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant