This work describes a mechatronic system composed by a robot arm that can play chess autonomously. The system is based on an industrial-grade robot manipulator, a computer vision system, and an open source chess engine. Classification algorithms were implemented in order to detect whether a given chessboard square is occupied, and in that case, if the piece is black or white. Such algorithms were compared in terms of their complexity of implementation, execution time and accuracy of predictions. To achieve an uniform illumination of the chessboard, a theoretical model of an LED illuminance curve was used to find the best orientation for each diode using a genetic algorithm. Both the support base for the LEDs and the chess pieces were made using a 3D printer. This implementation demonstrates the capabilities of the proposed vision-based system, whose complexity can be increased in the future for a number of applications.