The new chess.com game API

Sort:
mgx9600

Recently, I read that chess.com is going to publish the API to their game-playing system. this will allow people to write software to play chess here without using chess.com's interface. More interestingly, for me, this will allow interfacing my electronic chessboard with chess.com since I like to play on physical boards.

Now, I'm thinking, instead of special e-boards to play chess, I'd like to use a camera pointed to a normal chessboard and have it send video feed to software that can recognize chess moves. This would allow that software to issue player moves to chess.com and to announce opposing player moves (or just to make those moves with a robot arm).

I like this because it'll allow use of normal chess sets and be cheap to deploy (like $0 if you've already got a smart phone, or $50 if you want the robot arm).

Since this seems like a fairly straight forward product, I'm wondering if there's already anything like it?

If so, please post some links.

If not, I plan to work on it when chess.com releases its API.  Any others interested?

Martin_Stahl
mgx9600 wrote:

Recently, I read that chess.com is going to publish the API to their game-playing system. this will allow people to write software to play chess here without using chess.com's interface. More interestingly, for me, this will allow interfacing my electronic chessboard with chess.com since I like to play on physical boards.

Now, I'm thinking, instead of special e-boards to play chess, I'd like to use a camera pointed to a normal chessboard and have it send video feed to software that can recognize chess moves. This would allow that software to issue player moves to chess.com and to announce opposing player moves (or just to make those moves with a robot arm).

I like this because it'll allow use of normal chess sets and be cheap to deploy (like $0 if you've already got a smart phone, or $50 if you want the robot arm).

Since this seems like a fairly straight forward product, I'm wondering if there's already anything like it?

If so, please post some links.

If not, I plan to work on it when chess.com releases its API.  Any others interested?

 

 

 

The site has an API but you can't play games through it. They'll likely never open up any API for moves unless they partner with someone, like they did with Square-Off.

 

https://www.chess.com/developers

mgx9600

That's a shame.  I was hoping this would allow everybody who'd got a smartphone to enjoy a sort of OTB chess for free or nearly free.  It's been a hobby on mine to make OTB e-boards available to everybody cheaply (i.e. < $3).

Martin_Stahl

The problem is that it would be too easy to hook engine output to the API. So they'll likely only open that ability to established companies where access can be easily controlled.

mgx9600

If that's the main reason, then I'd like to put this out there.  It isn't too hard to "hook up" a chess engine to any online game. I can write a software that lets you take a picture of the online chessboard and derive FEN from it (with either some assumptions about castling, en passant, move counts, or just ask the user to input).

In fact, I've already wrote something like it a while ago (in answering somebody's questions here on chess.com). The result was pretty amazing, 95% recognition (i.e. in 95% of the cases the program recognized the board correctly, the remaining 5% of cases, it missed 1 or 2 pieces by correctly identifying their color and location but can't decide on the exact piece (like bishop vs pawn, which can look similar).

I didn't spend too much time back than, but the main problem was in aliasing artifacts (between camera sensor and computer screen), so if I ask the software to allow another picture in those cases, it'll get 100% correct.

Martin_Stahl

The site isn't going to make it easier to do, but really that part isn't something to really be discussed in the main forums. I probably shouldn't have brought it up.

WSama

That's an interesting idea for an app. It'll eventually be benched by gadgets such as Hololens in a five year's time, especially with the time control preference being fast blitz games. But seeing the current $3,500 price tag, Hololens is going to be a workspace luxury for a while.

Your app would work with some simple enough photo recognition software - maybe begin with something opensource to save time. The app simply alerts the user if pieces are misplaced - don't see much issues there

The robot arm would be optional. I see some of these range from $70 (probably local robotics) to an upwards $1000 for something faster and fancier.

No one will cough up the money for this idea. It's much more convenient to just grab your laptop or phone. As it is, how many people buy digital boards? Could be a great kid's toy on the other hand.

 

 

mgx9600
WSama wrote:

That's an interesting idea for an app. It'll eventually be benched by gadgets such as Hololens in a five year's time, especially with the time control preference being fast blitz games. But seeing the current $3,500 price tag, Hololens is going to be a workspace luxury for a while.

Your app would work with some simple enough photo recognition software - maybe begin with something opensource to save time. The app simply alerts the user if pieces are misplaced - don't see much issues there

The robot arm would be optional. I see some of these range from $70 (probably local robotics) to an upwards $1000 for something faster and fancier.

No one will cough up the money for this idea. It's much more convenient to just grab your laptop or phone. As it is, how many people buy digital boards? Could be a great kid's toy on the other hand.

 

I don't quite understand exactly what you are trying to say, but the program I'm thinking about will be free, i.e. people who own smartphones can just use it to play on regular chessboards with regular chess pieces.

The robot arm should cost less than $50 (only needed for those who want the arm make opponent moves, otherwise, the smartphone is fully capable of speaking those moves). I don't think the arm will cost too much since even triple weighted chess pieces aren't too heavy.

WSama

They even have Lego robot arms. Maybe not the cheapest, but cool.

I suppose you don't need a chess.com api for your idea to still work. If its a free app for people who don't mind the hassle of propping the camera up and moving their opponents pieces, then you could probably make it work on scripts. Everything is portable to JS these days.

Imagine sitting you laptop on the other side of the board, webcam on. Calibrate, grab some images, apply a little a photo recognition, script emulates mouse clicks or touch points on browser.

Guest3991719175
Please Sign Up to comment.

If you need help, please contact our Help and Support team.