Skip to content

Smooth click-to-move play and accurate CPU levels - #13

Merged
wsams merged 1 commit into
masterfrom
cursor/smooth-click-moves-cd6d
Oct 3, 2026
Merged

wsams merged 1 commit into
masterfrom
cursor/smooth-click-moves-cd6d

Conversation

@wsams

@wsams wsams commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Click a piece to lift it, click a legal square to place it, and the moves box fills in the SAN as the piece glides. CPU strength presets now follow Stockfish 18's own Elo scale instead of the old mislabeled skill levels.

Click to move

  • Click to move is on by default (toolbar, next to Flip board). Click your piece to lift it and mark legal squares, then click a square to place it.
  • The moves field is written in standard notation as each move lands, including the next move number after Black.
  • Escape, or a second click on the same piece, puts it back down. Promotion asks which piece to take.
  • Pieces travel on a short eased arc. The board is no longer rebuilt mid-slide, which removed the hitch in the old animation.

CPU strength

Stockfish 18's UCI_Elo scale runs from 1320 to 3190 (CCRL blitz). The previous Beginner / Casual / Intermediate presets used raw Skill Level with labels around 800–1200. Those labels were wrong: Skill 0 is about 1320, and Skill 6 is about 2360, so Intermediate could outplay Master.

  • Intermediate through Grandmaster now set UCI_LimitStrength and the Elo printed on the label (1320, 1400, 1600, 1800, 2100, 2500).
  • Search stops at the depth where Stockfish commits the weakened move (1 + floor(skill)), with a time ceiling long enough for that ply to finish. Deeper search does not change a limited-strength move.
  • Beginner and Casual stay below the 1320 floor by playing that engine and replacing half / one quarter of moves with a random legal move. Those two are marked approximate.
  • Maximum is uncapped Stockfish 18 lite for up to 2 seconds.
  • A new game clears the engine hash once per match, not before every move.

Dependencies

  • Python: chess 1.11.2 (replaces the python-chess 1.999 alias), autopep8 2.3.2, pylint 4.1.2.
  • Release tooling: semantic-release 25 and current plugins. GitHub Actions checkout and setup-node are on v7.
  • chess.js 1.4.0 and the Stockfish 18 lite wasm were already current. The stockfish.js loader is updated to 18.0.8.

click_to_move_and_cpu_levels.mp4

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Stockfish's calibrated Elo scale starts at 1320, so the old beginner
through intermediate presets were mislabeled and could play out of order.
Limited levels now use UCI_Elo and search to the depth where the weakened
move is chosen. Click to move lifts a piece, places it on a legal square,
and writes the SAN into the moves box while the piece glides.

Co-authored-by: Weldon Sams <wsams@users.noreply.github.com>
@wsams
wsams marked this pull request as ready for review October 3, 2026 01:42
@wsams
wsams merged commit ed4a944 into master Oct 3, 2026
1 check passed
github-actions Bot added a commit that referenced this pull request Oct 3, 2026
# [1.8.0](v1.7.1...v1.8.0) (2026-10-03)

### Features

* smooth click-to-move play and accurate CPU levels ([#13](#13)) ([ed4a944](ed4a944))
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants