Skip to content
Emmanuel Ohayon edited this page Feb 5, 2016 · 2 revisions

Tracking a Game of Chess: General Principle

Identifying the different pieces through image recognition would be awfully complex, and most likely impossible with "exotic" chess sets (Harry Potter, StarWars, you name it...).

But, knowing the starting position of the game, we don't need to identify the pieces, as long as we can track them throughout the game. For that, assuming we can get one static image of the whole board after each move, all we need is:

  1. to be able to identify the 64 squares of the chessboard;
  2. for each square, to tell if it is occupied by a piece or if it is empty;
  3. if the square is occupied, to tell the color of the piece on it.

The third point is necessary in the case of forks: after the capture, if we can't tell if a piece is black or white, we can't tell which piece was actually captured.

Castling and en passant also work with this principle, the usual pitfall being of course the promotion. As a first implementation, we'll make the assumption that a pawn always promotes to Queen.

What it looks like in Real Life

TODO

Clone this wiki locally