Ready Go!

Team Name

Check Mates

Timeline

Fall 2019 – Spring 2020

Students

  • Jordan Burnes
  • Dongchen Ye
  • Md Sadat Hussain
  • Rahme Butaineh
  • Michael Santellan

Abstract

READY GO! Is an all in one system that allows people to play against AI opponents in chess in a fun and exciting way! This creation is aimed at high school students to peak their interest in the computer science industry, and will be built with portability in mind. The main systems will be handled by any computer system that can interpret python, through the use of a GUI and speakers. This makes portability very simple as the only components needed to transport is the source code and a camera with some way for it to view the board.

Background

The computer science and engineering  industries are growing rapidly, and to fuel the need for people in these fields, some universities are creating outreach programs to inspire minds at a young age. This system is in support of those kind of programs and should be used as a tool to help captivate and inspire children to pursue knowledge in an engineering discipline.

Project Requirements

  1. The system shall be able to asses the state of the game board and made decisions based of that state.
  2. The system shall have the programmatic ability to move the pieces to and from where they need to go.
  3. The system shall have the ability to handle errors in a way that does not interrupt the current game.
  4. The system must recognize when it has won or lost the game.
  5. The system shall have a difficulty setting of three stages: easy, medium, and hard.
  6. The system shall be delivered in a portable box.
  7. The system shall have a maximum boot up time of 10 seconds.
  8. The system shall perform a chess move in less than 30 seconds.
  9. The system shall have a testing mode
  10. The system shall have a way to deal with friendly and enemy promotions.

System Overview

  1. Input Layer
    1. This is where the system shall take the inputs needed for a game. This includes the ability to select a difficulty of three options, easy, medium, and hard. It shall also take input in the form of images from a stationary camera so that theses images can later be used to assess the game state. There will be a button that the player will be prompted to press once they are done with their turn, and finally in this layer will be the actual chess board and their pieces. This layer will talk to the Machine Learning Layer in the form of image captured by the camera, and the logic layer in the form of signals sent from the difficulty chosen so that it knows how to calculate the next move.
  2. Machine Learning Layer
    1. Here is where the system will process the actual images it receives from the input layer. If there is some error with the images, such as a pieces being played between two squares, it will send information to the output layer in the form of an error message. This layer will also talk to the logic layer, giving it data about the chess pieces so that it can convert that data to a PGN file which will then be used with the Stockfish API to determine the systems next move. It will finally give information to the movement layer so that it knows where the pieces are in order to move them on the GUI.
  3. Logic Layer
    1. This layer is where all the processing will happen in terms of deciding where the pieces will get played by the AI. It will also be the place where the data from the machine learning layer is actually transformed into a file type that we can use to make decisions based off the state of the board, the PGN file type. This layer will give information to the movement layer as well as the output layer. It will send not only information on where to move the next pieces, but also any conditions such as wins, losses, and promotions.
  4. Movement Layer
    1. This is the simplest layer in the system. This will get information on where the piece is that needs to be moved, where that pieces needs to be moved, then make the calculations needed to move that piece. This information will then be sent to the output layer to the GUI so that the movement can be achieved.
  5. Output Layer
    1. This layer will handle all outputs to the user. It includes the GUI whose main function will be to move the chess pieces from where they are to where they need to be placed. It will also include a speaker (respective of whatever computer system is in use) which will relay information to the person playing against the AI. It will take information from the machine learning layer in the form of errors and then output message to the player letting them know how to fix their error. It will also take conditions such as wins, losses, or promotions from the logic layer and output them to the player.

Results

The system was able to perform all of our expected requirements. However, we opted out of using object detection to identify chess pieces, and instead used edge detection to first identify the board, and then check whether each square had a piece in it or not. This removed most of the possibility for error in identification, and also removed the need to take thousands upon thousands of images for training. The video link shared below shows the system playing through the game with a human player.

Video Link

Future Work

Future work includes the inclusion of a new difficulty called “Devil Mode”. In this mode, if the AI is predicted to lose by at least 80 percent, the GUI will perform a board flip in irritation at having lost to a mere mortal flesh bag.

Project Files

Project Charter

System Requirements Specification

Architectural Design Specification

Detailed Design Specification

Poster

References

None

jxg4185