• Aditya
  • Gayatri


  • Sahaj
  • Shobuj


Our project Chess-Bot is a chess game that allows the users to move chess pieces using their voice command. Thus it creates an environment where the user needs not to touch the chessboard while playing the game.

How Does it Work

The working of the chess-bot is quite simple. First, the user gives a voice command to move a piece from one position of the board to another, e.g., “B1 to C3”. After getting this command, it will be processed by the speech processing algorithm (based on google API) and sent to the stockfish chess engine, which will then check the validity of the move. If the move is invalid, the user will repeat the command until the move is valid. Once the move is validated, it will pass it on to the path planning algorithm (based on A* Algorithm), where it will find an optimal path for the chess piece to reach its destination. After the optimal path is selected, the path planning algorithm would send the path to the microcontroller present in the mechanical contraption step by step. Then the microcontroller, according to the coordinates provided by the path planning algorithm, would control the stepper motors and the electro-magnet present in the contraption to move a piece to its destination.

Path Planning Algorithm

We use a modified version of the A* path planning algorithm which is a directed path finding algorithm, and gives more weight to the nodes which have higher proximity to the goal. We modified the algorithm to move the pieces among the board partition lines to avoid collision between the pieces, for which an appropriate square-size to piece ratio size has been designed to avoid collision in any case. After stockfish processes the game move, the algorithm generates the shortest path with the minimal obstacles and sends instructions to the micro-controller.

Mechanical Contraption

We employed a 2-axis mechanism driven by a timing belt and pulleys, which was modelled and simulated in Fusion360. The main head-piece of the mechanism is the the electromagnet which will have full mobility throughout the length of the axes of the mechanism because of the specific design. The mechanism will consist of 8 pulleys along the edges of the mechanism and stepper motors will actuate two adjacent pulleys, which will be controlled by the microcontroller. There will be y-motion when there is clockwise rotation of both motors, and x-motion when there is anti-clockwise rotation. The whole mechanism would go under the board and the electro-magnet would be switched on and off depending on the need to move a particular piece.

alt text

Key Points

  1. Movement of knight - We have taken the ratio of radius of the bottom of the largest chess pieces and the side length of the block on the board such that even if two pieces are placed side by side in adjacent blocks, a third piece can eaisly slide through in between these pieces. Thus the knight would move in between peices if its path is blocked.
  2. Capturing of pieces - When a piece is to be captured we first move the piece which is to be captured to the side of the board then move the piece which captured that piece in its place
  3. Castling - Castling would be similar to knight movement, the king would be moved up along the side of the square, and the rook will move and take its place, and the the king would be placed in its correct position.
  4. Promotion - Like a classic game, promotion would take place by moving a piece from the sidelines and replacing the pawn in its place.