Chess Robot
Robotics / ML
GitHubCAD Design
I designed the model in Fusion 360 and 3D printed it. It has 4 DOF, and it is purposed to hold high torque servo motors and a raspberry pi camera.
Computer Vision Processing
This is the computer vision process to find the board and derive the playing squares from it.
Piece Classification & Board State
Each square is classified using a custom CNN built in PyTorch to determine piece color (white / black) or empty. I then compare consecutive board states to detect the opponent's move.
- CNN architecture: input 64x64 square images → 3-class output (white / black / none)
- Board state is tracked using python-chess, updated after each move detection
- One limitation is that the current implementation assumes the game begins in standard starting position, which means it can't yet handle arbitrary mid-game setups
Decision Making & Move Selection
I use the Stockfish chess engine to determine the optimal move from the current board FEN.
- Convert the board state into FEN and feed into Stockfish
- Parse Stockfish output (best move) → translate into robot motion command
- Eventually, I want to build my own chess engine in place of Stockfish.
Robotic Arm Inverse Kinematics & Control
Integrated the 4-DOF arm with high-torque metal-gear servos (40 kg-cm - 60 kg-cm) via a PCA9685 PWM driver and Raspberry Pi.
- Hardware build complete; gearbox & servo mounts designed for strength and repeatability
- Sadly, this is still a work-in-progress. I have basic servo control working, but the inverse kinematics and pick-and-place routines are not yet finished.



