0% found this document useful (0 votes)
155 views9 pages

Design and Implementation of Chess-Playing Robotic System: Firas Abdullah Thweny Al-Saedi, Ali H. Mohammed

This document describes the design and implementation of a chess-playing robotic system. The system uses a Lab-Volt 5150 robotic manipulator with 5 degrees of freedom to manipulate chess pieces on a smart chessboard. The smart chessboard tracks opponent's movements using switches. A modified version of the SharpChess chess engine is used to represent the board and search for moves. The system is tested in real chess tournaments and provided satisfactory results. Direct and inverse kinematics equations are derived for the Lab-Volt 5150 manipulator using Denavit-Hartenberg parameters to control the robotic arm.

Uploaded by

UIoi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views9 pages

Design and Implementation of Chess-Playing Robotic System: Firas Abdullah Thweny Al-Saedi, Ali H. Mohammed

This document describes the design and implementation of a chess-playing robotic system. The system uses a Lab-Volt 5150 robotic manipulator with 5 degrees of freedom to manipulate chess pieces on a smart chessboard. The smart chessboard tracks opponent's movements using switches. A modified version of the SharpChess chess engine is used to represent the board and search for moves. The system is tested in real chess tournaments and provided satisfactory results. Direct and inverse kinematics equations are derived for the Lab-Volt 5150 manipulator using Denavit-Hartenberg parameters to control the robotic arm.

Uploaded by

UIoi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.

net) | May 2015 | Vol 5, Issue 5,90-98

Design and Implementation of Chess-Playing


Robotic System
Firas Abdullah Thweny Al-Saedi1, Ali H. Mohammed 2
1,2
Computer Engineering Department, Al-Nahrain University,
Baghdad, Iraq

Abstract - This paper introduces a chess-playing robotic programmed can have a huge impact on its performance
system that is designed to autonomously play board games and following range of applications [4].
against human opponents. The control of the robotic arm In term of robot control, it can be specified by defined
manipulator is addressed in terms of speed and position speed and position of the end effector. The problem has
control. A complete control system is proposed to control the
Lab-Volt 5150 robotic manipulator which is a five degree of
become important in both the medical and the
freedom (DOF) robotic manipulator arm. A smart chessboard manufacturing fields, where the robot arm must be suitably
is built for tracking opponent’s movement. Board placed with respect to targets (tasks) that cannot be moved.
representation and search techniques are provided by using An applicable numerical formulation is presented. While
the free and open source chess application the "SharpChess". other methods are used the inverse kinematics solutions in
It was modified under VC# environment to fulfill the project their formulation for defining a locality for the manipulator
requirement. The implemented control is a networked control base, this kind of solution is difficult to accomplish because
system (NCS) scheme, the network exchanges the necessary of the inherent complexities in determining all inverse
information between the system parts. The proposed systems kinematic solutions [5].
with all of their parts are tested in a real time with a real chess
tournament and the system gave satisfactory results.
A typical open-loop motion control system includes
either a stepper motor with a programmable indexer or
Keywords - Smart Chessboard, Robotic Manipulator, Lab-Volt pulse generator and motor driver. This system does not
5150 need the feedback sensors because load position and
velocity are controlled by the predetermined number and
I. INTRODUCTION the direction of input digital pulses sent to the motor driver
from the controller. Because load position is not
On May 11, 1997, IBM’s Deep Blue computer defeated continuously sampled by the feedback sensor, load
the best human chess player Garry Kasparov [1]. However, positioning accuracy is lower and position errors
when saying a computer is not entirely true. In reality, the (commonly called step errors) accumulate over time. For
computer only calculated the movements and a human still these reasons the open-loop systems are most often
assisted him for executing the movement on the chessboard. specified in applications where the load remains constant,
Board games are rich issues for human robot cooperation load motion is simple, and low positioning speed is
research because these games have an intermediate and an acceptable [6].
easily adjustable degree of structure. Perception of the SharpChess is a free and an open source computer
chessboard and game pieces, observation of the human, application that enables the human to play chess against the
game state and thinking about the game, and manipulation computer. SharpChess uses the chess engine
of the chess pieces while playing with the human opponent communication protocol so it can play against other chess
was involved. Development on physical chessboard game engines by using WinBoard [7].
playing systems opens the way for more general human- The smart chessboard is a chessboard with switches
robot interactions systems that considered less structure. which are used to recognize movements that act as a
For example, this type of work could lead in the end to a dedicated input device to enter movements to the chess
manipulator capable of helping engineering as a field engine.
assistant that performs manipulation tasks in different field Many chess playing systems have been proposed by
environments [2]. many researchers, some are listed hereafter:
The term robot was first introduced by the Czech Nasrul et al. [8] used reed switches to detect the chess
playwright Karel Capek in his 1920 play Rossum’s pieces that played on the chessboard. The author used the
Universal Robots [3]. A robot manipulator should be direct method to read all the 64 locations with the aid of the
considered as more than as series of mechanical linkages. multiplexers which reduce the input lines from 64 to eight
The mechanical arm is only one element in an aggregate inputs only. This design adds an unnecessary cost and
robotic system which consists of several parts: the arm, complexity to the hardware of the board but it makes the
end-of-arm tooling, external power source, computer scanning procedure a lot easier.
interface, external and internal sensors, and control Nandan et al. [9] presented a simple 3-DOF robotic
computer. Furthermore the programmed software should be serial manipulator capable of playing chess in real time.
accounted as an integral section of the aggregate system, The chess pieces on the chessboard were detected by using
since the method in which the manipulator is controlled and standard image processing techniques. HD Logitech

90
Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.net) | May 2015 | Vol 5, Issue 5,90-98

webcam, a low cost custom made serial manipulator and a


robust control mechanism are used.
Gurjit et al. [10] designed an artificially intelligent
microcontroller based chess opponent which can compete
against the user and calculate its moves. The chess pieces
on the chessboard were detected with the aid of image
processing techniques. The robot used consisted of a
vertical section and horizontal section.
Cynthia et al. [2] developed chess playing robotic
system. Their system includes a low-cost Kinect-style
visual sensor, a custom 6-DOF manipulator, and a state-of-
the-art learning algorithms for automatic detection and
recognition of the board and objects on it. Examining the
structure shows that the system is slow and expensive.
M. Santhosh [11] introduced a chess playing robotic Fig. 1 Lab-Volt 5150 robot manipulator operational range.
system for people who bare darkness throughout their
lifetime. The visually impaired players need to 'see' through
'touch' in the wooden chessboard and make the move using III. LAB-VOLT 5150 ROBOT MANIPULATOR DH
special keyboard. Speech recognition technique is used to PARAMETERS
identify the last move.
Since a robot manipulator was used, its necessary to list In order to obtain the DH parameters for the Lab-Volt
the research deals with robotic kinematics and control and 5150, the link frames must be assigned to each link as
some are listed hereafter: shown in Figure (2).
Velarde et al. [12] presented a novel simulation
methodology applied to a 5-DOF manipulator. The work
included mathematical modeling of the direct, inverse and
differential kinematics as well as the dynamics of the
Catalyst-5 Robot manipulator. The method accomplished
the path following in the 3D space and MATLAB-Simulink
approach was used.
Abbas [13] presented a direct kinematics modeling of 5-
DOF stationary articulated robot arm. The author presented
an adopted modeling method to represent and simulate the
simultaneous positional coordinates for each joint of the
robot while it moves from one target to another. The author
used Lab-Volt 5150 simulator and robotic toolbox to test Fig. 2 Coordinate frames attached to Lab-Volt 5150 robot manipulator.
the model.
Deshpande et al. [14] derived the kinematic equations of The obtained DH parameters for the Lab-Volt 5150
SCORBOT-ER V plus vertical articulated robot with five arm are depicted in Table (1).
revolute joints. An analytical solution for the inverse
kinematics of the said robot arm is presented. MATLAB Table (4.1) Lab-Volt 5150 manipulator DH parameters [13].
8.0 is used to solve the mathematical model for a set of
joint parameters and these solutions were found to be Link ai (mm) αi di (mm) Θi
identical with the actual reading of the robot arm. 1 0 90 o
255 Θ1
Yang et al. [15] described the placement of an open loop
2 190 0 0 Θ2
robotic manipulator in a working environment that was
characterized by defining the position and the orientation of 3 190 0 0 Θ3
the base of the manipulator with respect to a fixed reference 4 0 90 0
0 Θ4
frame.
5 0 0 115 Θ5
II. THE LAB-VOLT 5150 ROBOT MANIPULATOR

The range of movement of the base, shoulder, elbow, IV. LAB-VOLT 5150 MANIPULATOR FORWARD
pitch, and roll are 338°, 181°, 198°, 185°, and 360° KINEMATICS
respectively. The robot can reach most points inside an
imaginary hemisphere with a 432 mm radius that centered The position and orientation of the Lab-Volt 5150 wrist
on the shoulder joint. The operational space of the Lab-Volt center can be calculated as [13]:
5150 manipulator was obtained by using MATLAB robotic
toolbox [16] and surface plot and it is depicted in Figure
(1).

91
Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.net) | May 2015 | Vol 5, Issue 5,90-98

190 190 115 ∗


190 190 115 ∗ (7)
(1)
0 255 190 190 115 ∗
0 0 0 1
Second, projecting oc into the x0 − y0 plane as
demonstrated in Figure (3).
The transformation matrix from the wrist center to the
end effector can be calculated as [13]:

115
115
(2)
0 0
0 0 0 1

The position and orientation of the Lab-Volt 5150 end


effector can be calculated as:
0
T5 = 0T3 3T5 (3) Fig. 3 Projection of the wrist center onto x0 − y0 plane [4].

gives:
The first three entries of the last column which
ingredients the origin o5 in the base frame are x, y, and z are tan (8)
the coordinates of the end effector in the base frame [13]:
or:
190 190 115
tan (9)
190 190 115 (4)
255 190 190 115 Third, considering the plane is formed by the second
and the third links as demonstrated in Figure (4). Applying
The rotational part of 0T5 gives the orientation of the the law of cosines to obtain:
origin o5 which relates to the base frame, that is the
orientation of the end effector relative to the base frame.
cos (11)


(5)

V. LAB-VOLT 5150 EULER ANGLES

Instead of using Eq. 5 to describe the orientation of the


end effector in term of the joints angles, Euler angles
method is used to describe orientation of the end effector it
in relation to the reference frame of the robot. Once the Fig. 4 Projecting into the plane formed by links 2 and 3 [4].
desired pitch and roll are specified, the orientation matrix is
determined as: where:
R=ROT(Z,Φ= 1)*ROT (Y, Θ)*ROT (Z, )


= (6) and:


255
where:
gives:
Φ: the yaw angle which is equal to link 1 joint angle
2
Θ: the pitch angle {x2c +y2c }+{zc -255} -1902 -1902
: the roll angle cos (12)
∗ ∗

since:
VI. LAB-VOLT 5150 INVERSE POSITION
cos sin 1
Given the desired x, y, z, pitch and roll, it is possible to then:
find the inverse kinematic of Lab-Volt 5150 robot by using

kinematic decoupling and the geometric method. First, the sin ∓√1 ′
wrist center can be found as: and:

92
Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.net) | May 2015 | Vol 5, Issue 5,90-98

tan (13)
or:
tan (14)
The two solutions for θ3 correspond to both the elbow-
up position and the elbow-down position, respectively.
Similarly, θ2 is given as

tan tan ∗
(15)

VII. LAB-VOLT 5150 INVERSE ORIENTATION

Inverse orientation is used to find the final two joints


variables of the wrist. The desired orientation of the end Fig. 5 Speed control algorithm.
effector R (Eq. 6) and (which is the rotation part of 0T3
IX. LAB-VOLT 5150 JOINTS LOCATION CONTROL
(Eq. 1)) are used to find the final two joints variable as:
The joints are the movable components of the robot
→ (16)
which cause relative motion between adjacent links. Due to
Where (the rotation part of 3T5 (Eq. 2)) contains the mechanical constraints coming from the design of the robot,
joints variables of the wrist. Since pitch, roll, , , and moving the shoulder joint affects the elbow joint and
are known, then can be evaluated as: moving the elbow joint affects the wrist pitch joint as
example:

1- If the shoulder joint angle moved from n0 to n+k0, the
(17) elbow joint would move from m0 to m+k0.
2- If the elbow joint angle moved from m0 to (m+s)0, the
resulting: wrist pitch joint would move from c0 to (c+s)0.
In this case, it will be impossible to move the robot to
(18) the desired location, so an algorithm to correct the joint
0 counter is developed as demonstrated in Figure (6).
gives:
tan (19)

and:
tan (20)

VIII. LAB-VOLT 5150 SPEED CONTROL

To make the robot moves in a regular fashion, all joints


should reach their destination at the same time. This could
be done with the aid of a speed control algorithm that takes
the joints offsets as an input as adjust the speeds of joints.
Figure (5) portrays the speed control algorithm. The
algorithm is executed after setting the desired locations for
the joints. Fig. 6 Joint counter position correction algorithm.

X. THE SMART CHESSBOARD

The smart chessboard consists of a chessboard, data


acquisition module, USB interface, and a computer. USB-
4704 [17] is used as an acquisition module for the smart
chessboard. If an 8*8 matrix is used, then there will be 64
knots in which the rows and columns are intersected. To
make a smart chessboard without ghosting problem [18],
the reed switch [19] in series with a LED should be
connected to each knot. Smart chessboard is designed for
the use of a matrix which decreases the number of pins that

93
Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.net) | May 2015 | Vol 5, Issue 5,90-98

are required to read all the matrix 64 reed switches to 8


input lines and 8 output lines. The block diagram of is
depicted in Figure (7).

Fig. 7 Smart chessboard block diagram.


The reed blades will close when a magnet is brought
toward the reed switch. When the magnet is withdrawn, the
reed switch blades will open. The magnetic field is
generated form the ring magnet that is installed in the
bottom of all chess piece.

XI. THE SCANNING ALGORITHM

At the game start up, each piece is located in its default


chess game location, so detecting the chess pieces via
sensor matrix and comparing the results with last known
board state and piece locations will tell the robot current
chess piece locations. Movement detection is done by
comparing last know piece locations with the new ones,
after finding the opponent’s movement, a chess game
verification algorithm will verify the movement for
opponent mistakes or even cheats, if the verification fails, a
warning soundtrack will be played. The application returns
the "from" and "to" algebraic notation coordinate pairs of
the opponent’s movement. Figure (8) shows the algorithm Fig. 8 Smart chessboard algorithm.
main program flowchart.
XII. THE PROPOSED SMART CHESSBOARD

The implemented smart chessboard is depicted in Figure


(9). The dimensions of the surface of the chessboard are 45
cm * 35.5 cm and the height is 6.6 cm. The board contains
two side pads where captured pieces are inserted. The board
is inserted in front of the robot where the chess squares are
105 mm away from the robot reference frame

94
Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.net) | May 2015 | Vol 5, Issue 5,90-98

Figure (9) Smart chess board.

XIII. MOVING THE PIECES

The execution of the specific task requires a robot to


follow a pre-planned path which is a major problem of
motion planning and motion control. The robot moves the
piece according to pre-defined path calculated from the start
and end coordinates of the moving piece. In the case of
application such as pick and place operation as
demonstrated in Figure (10) for piece relocation, task is
specified as initial and final end-effector location.

Fig. 11 Path control algorithm.

XIV. THE PROPOSED CHESS-PLAYING SYSTEM

This system introduces a robotic arm manipulator


system that is designed to autonomously play board games
against human opponent. Figure (12) portrays the proposed
Fig. 10 Piece relocation paths. system block diagram.

This is called point to point-to-point motion. The path is


divided into set of points with specific path between them.
The points are chosen to create the collision free paths.
Figure (11) portrays the path control algorithm.

Fig. 12 Human to robot chess-playing system diagram.


The proposed system consists of the following elements:

 Lab-Volt 5150 robot: 5-DOF stepper system robotic arm


manipulator system that can play physical board game.
 Chessboard: the smart chess board introduced in Section
XII is used for detecting the opponent’s movement.

95
Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.net) | May 2015 | Vol 5, Issue 5,90-98

 Applications PC: This PC is connected to one Lab-Volt B- Elbow Joint


5150 robot and one chessboard through USB ports. It
contains the robot application, the smart chessboard The results for this joint were obtained by attaching the
smartphone to the forearm. Figure (15) shows the results
application, and the chess application which they
obtained.
exchange control data via a TCP/IP localhost connection.
Figure (13) portrays human to robot chess-playing
system.

Fig. 15 Elbow joint tests.

C- Wr-Pitch Joint

The results for this joint were obtained by attaching the


smartphone to the gripper. Figure (16) shows the results
obtained.

Fig. 13 Human to robot chess-playing system.

XV. RESULTS

1- Joints Accuracy
In order to measure the accuracy for the robot
joints, the following tools were used:
 Samsung Galaxy Grand 2 smartphone.
 The android application "Clinometer" used as
gyroscope data logger.
Fig. 16 Wr-Pitch joint tests.
After attaching the smart phone to the robot links and
calibrating the robot and "Clinometer" the following
results were obtained. D- Wr-Roll Joint
A- Shoulder Joint
The results for this joint were obtained by attaching the
The results for this joint were obtained by attaching the smartphone by the gripper. Figure (17) shows the results
smartphone to the upper. Figure (14) shows the results obtained.
obtained for the following joints.

Fig. 17 Wr-Roll joint tests.


Fig. 14 Shoulder joint test.

96
Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.net) | May 2015 | Vol 5, Issue 5,90-98

The degradation of the robot accuracy is notified during


playing, for example, consider Figure (18) that shows the
robot dropping the queen on the chess board.

Fig. 20 Moving in XYZ space.

2- Moving in the XY plane: The end effector is moved


from the point (x=121, y=120, z=185) to the point
(x=346, y=-120, z=185). The resulting path is shown in
Figure (21).

Fig. 18 Robot dropping the queen.


After 4 moves, the robot is ordered to pick the queen but
the robot could not return to the same position and it hits
the queen as depicted in Figure (19).

Fig. 21 Moving in the XY plane.

XVI. DISCUSSION

The robot accuracy decreases as a function of the


discrete movement it makes. Figure (14) and Figure (15)
show that the accuracy of the joint decreases gradually as a
function of the movements stops the robot made. The
stepper motors of the joint drifts each time the joints stops.
Since the overshoot is proportional to the mass, the base
Fig. 19 Robot trying to pick the queen. suffers the largest drift, then the shoulder, then the elbow.
The wrist joints have too much loose as shown in Figure
2- Path Tests (16) and Figure (17). The robot is very sensitive to the
In these tests, the end effector was moved from a temperature, belts tightness and the lubrication.
point to a point. The orientation of the end effector was set
to fixed values (Pitch=180o, Roll=0o) during the XVII. CONCLUSIONS AND RECOMMENDATIONS
movement's testing procedures.
 Lab-Volt 5150 is not reliable and loses its accuracy over
1- Moving along the XYZ space: In this test, the end the time. The controller of the robot may stop
effector is moved from the point (x=190, y=0, z=331) to responding and returns an inaccurate reading if the
the point (x=217, y=120, z=185). The resulting path is disconnected the reconnected to the USB port in a
shown in Figure (20). regular fashion (using the provided commands).
 During the calibration, it is recommended to reset the
point saved in the tech pendant, then save the new
calibration points. If the procedure of the calibration
followed without resetting the points, the arm of the

97
Firas Abdullah Thweny Al-Saedi et al | IJCSET(www.ijcset.net) | May 2015 | Vol 5, Issue 5,90-98

robot will hit the workspace if the robot is ordered to go [3] M. W. Spong, S. Hutchinson, and M. Vidyasagar, "Robot Dynamics
and Control, Second Edition", John Wiley and Sons, 2004.
to the calibration position. [4] A. H. Mohammed, "Design and Implementation of PSO-BASED
 Open loop stepping systems of the Lab-Volt 5150 robot PID Controller for MA2000 Robotic Manipulator", M.SC. Thesis,
loses the accuracy gradually over the time no matter University of Al-Nahrain, 2012.
how the stepper motor accuracy was due to the physical [5] J. J. Yang, W. Yu, J. Kim, and K. Abdel-Malek, "On the Placement
of Open-Loop Robotic Manipulators for Reachability", Mechanism
properties of the said robot. and Machine Theory, 2009.
 The proposed chess and robot software can be used to [6] P. E. Sandin, "Robot Mechanisms and Mechanical Devices
control other robot manipulators by modifying the Illustrated", McGraw-Hill, 2003.
kinematics class, also it can be used to control any picks [7] Sharpchess, "SharpChess C# Chess Game". Available at:
http://sharpchess.com/.
and drops operations. [8] N. H. Mahmood and C. K. M. Long, "Smart Electronic Chess
 It is recommended to calibrate the of the Lab-Volt 5150 Board Using Reed Switch", penerbit UTM Press, 2011.
robot on regular times according to its working plan. [9] N. Banerjee, D. Saha, A. Singh and G. Sanyal, "A Simple
Autonomous Robotic Manipulator for Playing Chess Against Any
Opponent in Real Time", Proceedings of the International
Conference on Computational Vision and Robotics, 2011.
XVIII. SUGGESTIONS FOR FUTURE WORK [10] G. Kaur, A. K. Yadav and V. Anand, "Design and Implementation
of Artificially Intelligent Microcontroller based Chess
Design and implement the following: Opponent", Proceedings of the World Congress on Engineering,
 A trajectory tracking control scheme, taking into 2010.
[11] M. Santhosh, "A Robotic Arm Based Chessboard for Visually
account the robot dynamic model in order to perform Challenged", IIIYEAR CSE, 2010.
effective trajectory tracking capabilities like welding, [12] V. Sanchez, R. Gutierrez, G. Valdovinos and P. Ortega, "5-DOF
cutting, and speed controlled tasks. Manipulator Simulation Based on MATLAB Simulink
Methodology", Communications and Computer (CONIELECOMP),
 Image recognition algorithm to detect the chess pieces 2010.
on the chessboard. [13] T. F. Abbas, "Forward Kinematics Modeling of 5-DOF Stationary
 A grippe for the robot specialized for picking and Articulated Robots", University of Technology, 2013.
dropping the chess pieces. [14] V. A. Deshpande and P. M. George, "Analytical Solution for
Inverse Kinematics of SCORBOT-ER-Vplus Robot", International
 A distributed system algorithm to increase chess engine Journal of Emerging Technology and Advanced Engineering, 2012.
strength. [15] J. J. Yang, W. Yu, J. Kim, and K. Abdel-Malek, "On the Placement
 A virtual reality based control scheme for the Lab-Volt of Open-Loop Robotic Manipulators for Reachability", Mechanism
and Machine Theory, 2009.
5150, in order to move the pieces on the chessboard.
[16] P. I. Corke, "Robotics Toolbox 9 for MATLAB", MathWorks Inc,
2011.
REFERENCES [17] USB-4704, "USB-4704 User Manual", Advantic ltd., 2010.
[1] M. Newborn, "Beyond Deep Blue: Chess in the Stratosphere", [18] Dribin, "Keyboard Matrix Help".Available at:
Springer, 2011. http://www.dribin.org/dave/keyboard/one_html/.
[2] C. Matuszek, B. Mayton, R. Aimi, M. P. Deisenroth, L. Bo, R. Chu, [19] COM-08642, "Reed Switch Data Sheet", Hamlin Inc. Available at:
M. Kung, L. LeGrand, J. R. Smith and D. Fox, "Gambit: An https://www.sparkfun.com/products/8642.
Autonomous Chess-Playing Robotic System", 2011 IEEE
International Conference on Robotics and Automation (ICRA),
2011.

98

You might also like