Gaming games

Reading time: 2 minutes


Chess.com is a great online chess server and content creator. One of their hallmark features is their chess puzzles:

  • Present the player with a position

  • The player needs to find the ’tactic’: the best sequence of moves, typically resulting in an advantage over the opponent

  • The quicker the player completes a puzzle, the more points they earn

They look like this:

Puzzles are nice because they help players train their pattern recognition and develop their intuition for chess.

Puzzles are nicer because they lead to pretty stats and graphs. Like this!

My stats page

My stats page

Rating solved puzzles opens up the meta-game of improving our stats. Can we use the power of The Cloud™ to improve our score?

Pointless cheating

When you visit the Chess.com homepage, one of the things you’re presented with is this dashboard encouraging more play:

Chess.com dashboard

Chess.com dashboard

The puzzle shown there isn’t a static image, but is in fact a real puzzle that’ll be served up to the user if they click through.

It’s provided by the https://www.chess.com/callback/tactics/rated/next endpoint.

Interestingly, lots of information about the puzzle is returned to the client, including its solution!

The endpoint returns FEN for how the puzzle’s board should be set up, as well as the puzzle’s continuation (i.e. the solution) in a couple formats: PGN, and a format internal to Chess.com called TCN:

When the player completes the puzzle, the client POSTs some data to https://www.chess.com/callback/tactics/submitMoves, with a body something like the following:

Could… could we just plug in the TCN solution from when we were served the puzzle?

Yep.

My autosolver’s stats page

My autosolver’s stats page

I stopped the bot after a couple hours with a rating near 9k, well past the point of absurdity.

Note
Puzzle ratings are an ad-hoc system created by Chess.com. That said, it’s probably intended to be somewhat correlated to your chess skill. In the widely-used Elo rating system, humanity’s best players have yet to crack 2900.

Other interesting information about the puzzles are returned too, such as internal notes and historical human games that the puzzles were derived from. Some things are also displayed in the Chess.com UI, such as the average pass rate for the puzzle and estimated difficulty rating. Apparantly, based on the internal notes, lots of their puzzles are auto-generated from their CEAC (Computer Engine Analysis in the Cloud) system.

The puzzle response also includes the average time it took other players to solve the puzzle. To avoid being too egregious, I inserted a delay prior to submitting each solution (with a bit of jitter to emulate my CPU thinking really hard). But if Chess.com banned the account, that’d be an interesting and welcome outcome too.

Is this useful?

Nope.


Newsletter

Put your email in this funny little box, and I'll send you a message when I post new stuff.

09 Jan, 2024: There was a bug here. If you tried to sign up before please try again!