Chess Robot using BrickPi3 - with vision and sound

(I’ve updated the link with an improved video showing detection of player’s move using vision system)

My chess robot blog.

If anybody else is thinking of building this, please let me know by commenting in this thread.

AH! this is awesome! As a former competitive chess player (a bad one though), I’m loving this!

1 Like

reminds me of my former (autonomous) NXT chess robot…!
Which chess engine are you using?

Stockfish (see full description in YouTube))

thank you, the description didn’t show up for me when I tried it the first couple of times, but now it’s visible to me.

1 Like

Very cool! Could you hook it up to Hal?

The robot’s chess engine can beat any human, but HAL was “presumed infallible” :grinning:

by which image processing program and which object detection algorithm do you perform the move recognition specifically ?

That’s close enough.

1 Like

I use a couple of functions from cv2 and PIL, but, because the system knows where all the pieces are after the computer move, then all that has to be done after the human makes a move is for the code to be able to tell the difference between the following three cases:

  • An empty square
  • A black piece of any kind
  • A white piece of any kind

I wrote my own code for this.

Could you share the code? I’d love to see in raw technical detail what happens.

Now with vision, as per my post in the thread

I’ll PM you later today or tomorrow about this. Is it just the vision code that you’re interested in?

Yes, just the vision code that interests me.

Now tested the vision code for castling.

1 Like

tbh, I’m curious about pawn promotion :wink:

You are right! If the player promotes a pawn to a non-queen then they have to tell the system what the piece has been promoted to.

I got fed up with the robot jamming when lowering the grabber, so I’ve been implementing a Watt’s linkage

Video showing piece taking and castling by both sides:

Got another bug out of the vision code and implemented en passant

1 Like