Professional Documents
Culture Documents
Tra 2018
Tra 2018
The Minimax algorithm describes in figure 3 and all legal Figure 4. The α-pruning
moves are explored to the given depth and the position is
evaluated at the ending “leaves” of the tree. Then, we As figure 4 shows that if value of one of these nodes,
calculate either the smallest or the largest value of child which are calculated after C node, is more than C node’s
nodes to the parent node, depending on whether it’s a white value, the α-pruning works and it goes back to the parent
or black move and a human or robot move. The minimize or node. The notation is established but the input does not be
mention. So, in the next section, the image and the
maximize value have to be found at each level.
chessboard matrix are processed.
Moreover, the time of reckoning based on the given depth
so the value of this one must be chosen carefully. In one turn, B. Image processing
player have approximated 30 legal moves so if the given
depth is choosing at 10 for the search tree, final nodes
explore 3010 nodes. It is too much so it has to be cut down.
336
2018 4th International Conference on Green Technology and Sustainable Development (GTSD)
computer together. As many previous project, the camera is black and the “1” for white, otherwise, squares have no chess
hang on a bracket, which is fixed with the table of the chess piece have the “2” value as figure 9 shows.
board, and we recognize that it cumbered the robot’s working
space.
We decide that hang the camera on the robot tool - the
gripper. By this method, the robot can move flexibility
everywhere without concern about the bracket’s zone. The
experimental setup in figure 6 made by 3D printing
technology.
In this paper, we do not define a single chess piece to find
the movement. However, a capture image’s function is built
around Matlab software. Because the pixel resolution of the
Figure 9. The “white-black” matrix
webcam is not square like a chessboard, the snapshot image
must be cropped and divided into 64 “mini” squares, which In reference papers [1] and [2], the simple move (like
have 60x60 pixel resolution in each square. In addition, if the move the pawn in the example) can be easily recognized by
picture has three color channel R, B, G like every snapshot calculate the delta “having-chess” matrix between before and
picture, it is give us many disadvantages to find which square after movement. They work perfectly with the “en passant”
have a chess piece. To solve this problem, a copy picture move, the castle move. The problem appears when we try to
from the original one but in grayscale is set and show in recognized the “take a piece” move. The solution is
figure 7. calculated the delta “black-white” matrix between before and
after movement (Figure 10 and Figure 11).
337
2018 4th International Conference on Green Technology and Sustainable Development (GTSD)
The running time of the process is 2,5 second. It is from Figure 14. A having chess piece square
capture image to the natation of the chess. In the next section,
the way using to define the movement is concerned. After all of these things, the program can work smoothly.
The experimental model is combined all three sections.
C. SVM classifier Chapter III will show the way robot work and check the
SVM classifier is an algorithm which is a supervised position error.
machine learning. It can be used for classification. A HOG
III. EXPERIMENTAL MODEL
vector, which uses for establishing the “having-chess”
matrix, and a color vector, which uses for establishing the Application software is built by MATLAB and Sysmac
“white-black” matrix, are created to take a specific and save Studio. Using Yaskawa robot in figure 15 to check the study.
to a text file with a label. This is an important training step
prepare for image processing.
Histogram of Oriented Gradients vector or HOG vector to
make shorter is a feature descriptor. It was used in computer
vision, image processing, detecting object. A grayscale
cropped image is converted to a gradient image. Each pixel
of this image calculated the change in intensity of that same
position in the original image with a given direction. To get
the full range of direction, gradient images in the x and y
directions are computed.
In the square have no a chess piece, the HOG vector has
many horizontal and vertical vector in figure 13, otherwise, a
chess piece makes the vector have many directions in figure
14.
Figure 15. MA1440 Yaskawa robot
TABLE 2. SPECIFICATIONS
Controller DX200
Controlled Axis 6
Payload 6kg
Vertical reach 2511mm
Horizontal reach 1440mm
Repeatability ±0.08mm
Mounting Floor, wall, ceiling
S-axis (turning): -170° - +170°
Range of motion L-axis (lower arm): -90° - +155°
Figure 13. A none chess piece square U-axis (upper arm): -175° - +240°
338
2018 4th International Conference on Green Technology and Sustainable Development (GTSD)
O
x
339
2018 4th International Conference on Green Technology and Sustainable Development (GTSD)
ACKNOWLEDGMENT
The author would like to thank his classmate at Ho Chi
Minh City University of Technology, especially Associate
Prof. Nguyen Duy Anh for his support.
REFERENCES
[1] N.D. Anh, L.T. Nhat, T. Van Phan Nhan (2015) “Design and control
automatic chess-playing robot arm”, Lecture Notes in Electrical
Engineering (Vol 371), 485-496
[2] Mustafa ARDA, Hilmi KUŞÇU, Emir ÖZTÜRK (2013) Obtain chess
moves with image processing. In: Proceeding of the Unitech Grabovo
international scientific conference.
[3] THANH NHAT LUONG, HOANG LIEN SON CHAU, TRI CONG
PHUNG, DUY ANH NGUYEN (2016) “Trajectory optimization for
chess-playing robot arm”, 5th World Conference on
340