Four-axis chess playing robot system
Through multi-axis controllable actuators and pneumatic grabbing methods, combined with neural networks and optimized chess algorithms, the problem of poor adaptability of existing chess-playing robots has been solved, and efficient adaptability and flexible chess-playing experience for chess pieces made of different sizes have been achieved.
Patent Information
- Application Number
- CN202410687740.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-05-30
AI Technical Summary
The existing chess-playing robot hardware occupies a large volume and weight, making it difficult to adapt to chess boards and chess pieces of different sizes and materials. The magnetic gripper increases the manufacturing cost and the weight of the chess pieces, limiting the robot's adaptability to chess pieces on the market.
A four-axis chess-playing robot system is designed, which uses multi-axis controllable actuators and pneumatic chess piece grabbing methods, combined with neural network image recognition and image-text voice interaction, to adapt to chess pieces of different sizes and materials, and through deep scrolling Accumulated neural network and optimized chess algorithm realize automatic chess play.
It achieves efficient adaptability to chess pieces of different sizes and materials, reduces manufacturing costs, provides a flexible physical and online chess experience, and improves the portability of the robot on a variety of industrial platforms.
Smart Images

Figure CN118617429A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of robots, and in particular relates to a four-axis chess-playing robot system. Background Art
[0002] With the continuous development of robot technology, various types of robots have been invented and designed, and put into industrial production or social life. Compared with industrial robots with specific functions, large size and high power, small household robots that focus on meeting some needs in people's daily life are one of the current industry hotspots.
[0003] As the problem of population aging becomes increasingly prominent, the demand for elderly care and companionship is increasing. However, the aging population has led to a shortage of caregivers and rising care costs. The traditional companionship model can no longer meet social needs. Changes in family structure and the diversification of lifestyles have also increased this trend. More and more families are facing the situation where parents are busy at work and their children lack company. An intelligent care and companionship solution is needed to meet this challenge.
[0004] Playing chess has been one of the classic puzzle games for humans since ancient times. It not only exercises logical thinking, but also cultivates calm and rational personality traits. At the same time, through learning chess skills, the friendship between the two parties is deepened. But for most people, it is difficult to find a fixed chess friend, especially for teenagers who are learning chess and the elderly who need leisure care. The physical chess game can bring a better experience and sense of accomplishment than the virtual game on digital products, so various chess robots came into being.
[0005] At present, the outstanding achievements in the technical solutions for realizing the functions of chess robots include: Beijing Shangtang Technology Development Co., Ltd.'s "Yuan Luobo" AI chess robot, Qingdao Evolver Xiaopang Robot Technology Co., Ltd.'s "Evolver" chess robot, Hangzhou Xiangzheng Technology Co., Ltd.'s chess robot, and intelligent chessboards such as Yinzhi and Fermi, etc. Taking the first two as examples, the current mainstream chess robot hardware generally adopts the form of connected fixed fuselage and chessboard, three-dimensional mobile positioning mechanism and vertical chess piece grabbing mechanism in terms of actuators. Among them, the "Yuan Luobo" AI chess robot adopts a horizontal two-axis mechanical arm with a vertically retractable magnetic gripper, and some products on the same production line also use multi-joint clamping grippers. The "Evolver" chess robot adopts a horizontal orthogonal slide with a vertically retractable magnetic gripper; in terms of image recognition, multiple external cameras are generally used to collect information and send it to the internal programmable circuit for processing; in terms of human-computer interaction, there are both large display screens or small digital screens installed on the robot body for graphic interaction, and microphones, speakers and other modules for voice interaction, and remote interaction through wired or wireless connection to mobile phones.
[0006] In summary, the overall solution of the current chess-playing robot technology is still mainly based on a connected and fixed body chessboard, a horizontal multi-axis robotic arm with a magnetic gripper, an external camera, and a graphic or voice interaction module. However, the customized chessboard fixed to the body often occupies a large volume and weight, making it difficult to store, and it is difficult to apply to chessboards and chess pieces of different sizes and materials. It is even not friendly to users who are accustomed to a certain type of chess board style. In addition, the use of a magnetic gripper must be matched with special magnetic chess pieces, which not only increases the manufacturing cost and the weight of the chess pieces, but also limits the adaptability of the chess-playing robot to various chess pieces on the market. Summary of the invention
[0007] In view of the above, the present invention provides a four-axis chess-playing robot system, which can automatically place chess pieces according to different chess shapes and automatically play chess according to different levels of difficulty, and can meet the physical chess requirements of people of all ages. At the same time, the system also has the function of online chess.
[0008] A four-axis chess robot system includes a chessboard, a robot body, a controller and a host computer. A camera is installed on the robot body. The camera takes a chess image on the chessboard and sends it to the host computer. The host computer processes the image information, analyzes the current chess shape, calculates the chess strategy, and sends it to the controller to control the robot body to play chess on the chessboard. The host computer includes:
[0009] An image capture module is used to call a camera to capture a global image of the chessboard and close-up images of some chess pieces;
[0010] An image processing module is used to pre-process the image and detect the position of each chess piece in the image;
[0011] A neural network model is used to identify the preprocessed image and obtain the type of each chess piece;
[0012] The game calculation module inputs and outputs the chess piece position variables in matrix form through the game algorithm according to the type and position of each chess piece on the chessboard.
[0013] The system communication module is used to transmit the robot status data stream and chess piece position variables to the controller to control the robot body to play chess according to the strategy.
[0014] Furthermore, the image capture module uses OpenCV library statements to call a camera connected to the host computer to capture a global image of the chessboard and close-up images of some chess pieces.
[0015] Furthermore, the image processing module performs operations including cropping and rotation, graying, binarization, edge detection, and improved Hough circle detection on the global image to improve the recognition accuracy of the chess piece position, performs color space conversion, gamma transformation, and threshold screening on the global image to improve the recognition accuracy of the chess piece type, and crops and rotates the close-up image to simulate the position change of the chess piece during shooting.
[0016] Furthermore, the improved Hough circle detection operation divides the Hough transform into two stages, the first stage detects the center of the circle, and the second stage derives the radius from the center of the circle, thereby reducing the dimension of the Hough space and improving the statistical efficiency.
[0017] Furthermore, the neural network model adopts a VGG (Visual Geometry Group) deep convolutional neural network, which includes an input layer, a convolutional layer, a non-linear activation layer, a pooling layer, and a fully connected layer, wherein multiple convolutional layers and pooling layers are stacked, the input layer receives an image, the convolutional layer is used to extract features, and the pooling layer is used to reduce the feature dimension. After the image undergoes multiple sets of continuous convolution-pooling operations, the network can capture the complex pattern of the image and output it to the fully connected layer, and the fully connected layer is used to fuse and classify image features and predict the type of each chess piece.
[0018] Furthermore, an independently designed game algorithm is integrated in the game operation module, and the algorithm integrates deep search technology, historical heuristic evaluation technology based on Monte Carlo tree search, and α-β pruning optimization technology. First, all possible branch actions on the chess game are preferentially traversed through the deep search technology, and then the branches that do not affect the decision results are deleted through the α-β pruning optimization technology to determine the local optimal solution and reduce the search range. Then, the historical heuristic evaluation technology is used to assign priorities from high to low to each branch action according to the historical effects from good to bad, thereby improving the search efficiency; finally, the game operation mechanism is constructed in the form of a matrix, and the types and positions of each chess piece on the chessboard at the current moment identified by the previous detection are called as the input matrix of the game algorithm. The output matrix of the algorithm contains the types and positions of each chess piece on the chessboard at the next moment. The action trajectory of each grid chess piece can be obtained by subtracting it from the input matrix, and this trajectory is expressed as a robot code.
[0019] Furthermore, the deep search technology uses the Minimax algorithm to perform deep search. First, a game tree is constructed, and each node represents a possible game state. In the odd-numbered layers, namely the Max layers, our side tries to choose the state that benefits us the most; in the even-numbered layers, namely the Min layers, the opponent tries to choose the state that benefits us the least. Starting from the bottom of the tree, each state is scored and fed back upward, and finally the best step to be taken is obtained at the top of the tree.
[0020] Furthermore, the α-β pruning optimization technology reduces the nodes of the Minimax algorithm search tree. During the search process, two parameters α and β are introduced to represent the minimum and maximum values on the search path. When the condition α≥β is met, the search of the current subtree is stopped and meaningless branches in the search tree are pruned, thereby improving the search speed.
[0021] Furthermore, the historically inspired evaluation technology further optimizes the search strategy. The basic idea is to simulate the human way of thinking, give high priority to actions with good historical effects, give low priority to actions with poor historical effects, and perform local optimization according to the trend of historical actions, so as to find a better solution within an acceptable time frame.
[0022] Furthermore, the system communication module uses serial communication to transmit the robot status data stream to the controller, and is responsible for the operation control, status monitoring and alarm information transmission of the robot in online mode. It uses Ethernet communication to transmit the chess piece position variables generated by the game algorithm to the controller in real time, and is responsible for determining the movement trajectory of each grid chess piece.
[0023] Furthermore, a mechanical arm and an air circuit are provided on the robot body, and an external air pump draws air to generate a positive pressure source, which is then converted into negative pressure after passing through a vacuum generator, and finally suction is generated at the suction cup at the end of the mechanical arm through the air circuit, thereby effectively sucking up the chess pieces; a solenoid valve is provided in the air circuit, and the opening and closing of the solenoid valve is controlled by a DC switching power supply, and the DC power supply is controlled by a host computer, and the picking up and putting down of the chess pieces is realized by the opening and closing of the solenoid valve.
[0024] Furthermore, the robot body is provided with a voice module and an interactive panel. The voice module collects the user's voice input through an integrated microphone, and then uses the built-in processor to recognize and understand the voice, and finally generates a responsive voice file through voice synthesis and plays it to achieve voice interaction with the user; the interactive panel is connected to the controller to provide the user with a touch method for function selection and game experience.
[0025] The present invention focuses on the robot body, and can solve the adaptability problems of existing robots and chessboards and chess pieces. For example, it uses a fixed frame with adjustable size, which can adapt to most chessboard sizes on the market; it innovatively uses a pneumatic chess piece grabbing method, combined with suction cups of different calibers and shapes, which can adapt to most chess pieces of different sizes and materials on the market. In addition, the present invention is based on a multi-axis controllable actuator, image recognition relying on neural networks, and human-computer interaction combined with text, image and voice. The algorithm is highly portable on a variety of industrial robot platforms, providing new ideas and methods for the design of similar technical products, and has great practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1This is a system block diagram of the four-axis chess-playing robot of the present invention.
[0027] Figure 2 It is a side view of the device of the four-axis chess-playing robot of the present invention.
[0028] Figure 3 The figure is a top view of the four-axis chess-playing robot of the present invention.
[0029] Figure 4 The schematic diagram of the circuit of the four-axis chess-playing robot device of the present invention adopts the board.
[0030] Figure 5 Schematic diagram of connector port numbering of the four-axis chess-playing robot device of the present invention.
[0031] Figure 6 The figure is a schematic diagram of the algorithm flow of the four-axis chess-playing robot device of the present invention. DETAILED DESCRIPTION
[0032] In order to describe the present invention more specifically, the technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0033] like Figure 1 As shown, the four-axis chess robot system of the present invention includes two parts: hardware and software. The hardware part is as follows Figure 2 and Figure 3 As shown, it includes a base platform 2 built with industrial aluminum profiles, and a series of facilities such as a robot body 3, an interactive touch screen 4, a chessboard 5, an air pump 6, a vacuum generator 7, a solenoid valve 8, a suction cup 9, a PV air circuit 10, and an external power supply are arranged on its upper surface.
[0034] In order to facilitate human-machine interaction, the robot system is mainly set up on a table 1 at a certain height. The degassing pump 6, some lines, controllers and other equipment are arranged below the table 1, and other equipment is arranged above the table 1. The base platform 2 is composed of multiple aluminum materials, which are used to bear the weight of the robot body 3. There are grooves on the aluminum materials for installing various components. The specific installation methods are quite diverse, and the user should choose the appropriate installation method according to the characteristics of the components.
[0035] The robot body 3 is based on the Mitsubishi RH-3FRH5515-D horizontal multi-joint industrial robot. The robot has a first robotic arm, a second robotic arm, two movable arms from J1 to J4, and four free axes. The maximum motion range of its robotic arm is a sector with a radius of 350 mm and an angle of 263.5° with the center of the robot base as the axis. The height movement range of the robot gripper is 0 to 370 mm from the end of the second robotic arm downward. A suction cup 9 is installed at the front end of the gripper, and the suction cup 9 has a diameter of 20 mm. Therefore, the robot system needs to be equipped with a chessboard and chess pieces of appropriate size to facilitate the movement of the robotic arm and the suction of the suction cup.
[0036] A high-resolution industrial camera is installed above the shell of the first joint of the robot body 3. The camera sends the captured image to the host computer, which processes the image information, analyzes the current chess shape, calculates the move method, and sends it to the robot controller to control the movement of the robot.
[0037] An interactive touch screen 4 is placed on the side of the robot body 3, in which a specially written interactive program is run. The main interface displays three main options: chess game, system settings, and product introduction. The chess game includes quick game, chess form teaching, endgame challenge, and replay analysis. The system settings include online and offline mode selection, difficulty selection, volume setting, interface setting, etc. The product introduction includes an overview of the chess robot system and a brief introduction to the modules. The interactive touch screen 4 can be a general tablet computer, or a special touch screen 4 can be set up. The touch screen 4 is connected to the robot controller by wire for communication, and the touch screen 4 is tilted for users to watch and operate.
[0038] In order to realize the emergency stop and mode selection functions of the system, it is necessary to use the dedicated input and output terminals equipped with the robot, such as Figure 5 As shown, connect the corresponding switches of the switch box to "7-23", "14-30" and "5-21", "12-28" of the CNUSR11 connector respectively; the robot uses a 2D-TZ368 board, such as Figure 4 As shown, it is a leak type. Insert it into the slot of the controller, select SLOT1, and set the pin configuration of the connector as shown in Table 1 to obtain a valid parallel input and output interface to realize the output function.
[0039] Table 1
[0040]
[0041] The robot body 3 is equipped with an air circuit, which generates a positive pressure source by pumping air through an external air pump 6, which is converted into negative pressure after passing through a vacuum generator 7, and finally generates suction at the suction cup 9 at the end of the robot arm, achieving effective suction of the chess piece within a height difference of 5 mm. A solenoid valve 8 is added to the air circuit, and the solenoid valve 8 is controlled to open and close by an external DC switching power supply. The DC power supply is integrated into the main switch box and controlled by the host computer. Therefore, the opening and closing of the solenoid valve is used to realize the action of picking up and putting down the chess piece. The air pump 6 is arranged in the space below the desktop. A general industrial small air compressor can be used. When using this system, the air pump 6 is kept in a normally open state. A certain silencing method can be used to reduce noise. The air pump 6 is connected to the vacuum generator 7 arranged on the desktop through the PV air pipe 10. The vacuum generator 7 can use general industrial-grade devices such as EV10DV15. The vacuum generator 7 is connected to the solenoid valve 8. The solenoid valve 8 can use general industrial-grade devices such as 4V210-08. The solenoid valve 8 only needs to open the front and rear two inlets and outlets, and the other ports should be closed. The solenoid valve 8 is then connected to the suction cup 9 axis through the PV air pipe 10, thereby transmitting negative pressure for sucking up the chess piece. The solenoid valve 8 has a wiring terminal inside, which can be connected to the terminal block of an external DC switching power supply or a robot controller. The valve switch is controlled by inputting a 0V / 5V voltage. The voltage change can be controlled by a PC program or PLC to instantly regulate the picking up and putting down of the chess piece. The above-mentioned components should be fixed, and they can be made in the same structure in an integrated manner to seal and prevent dust and reduce noise.
[0042] When using this robot system, first turn on the power of the robot system, and wait until the robot controller and interactive touch screen are initialized before using it. The system has an external LD3320 voice module, which collects the user's voice input through the integrated microphone, and then uses the built-in processor and algorithm to recognize and understand the voice, and finally generates a response through voice synthesis and feeds it back to the user; program the STC microcontroller, add customized recognition sentences and control programs, and the robot uses the voice module and voice playback chip to convert the voice text into an MP3 format voice file with software, and then output it to the speaker after conversion.
[0043] The user selects a function on the interactive touch screen. After clicking "Chess Game - Quick Game", the user needs to select the online / offline mode. If the offline mode is selected, the user and the robot will play on the physical chessboard. If the online mode is selected, the user can complete the game on the touch screen. If the user makes a wrong move or cheats in the offline game, the system will recognize and issue a voice warning. The user can also select other functions on the touch screen. The chess shape teaching provides teaching on the optimal moves of some classic chess shapes. The endgame challenge can command the robot to automatically set a specific endgame and start the game from then on. The replay analysis can retrieve the move records of the previous game from the system and command the robot to restore the chess shape. The difficulty selection can change the difficulty of the game artificial intelligence, the volume setting can change the system volume, the interface setting can change the font size, and the product introduction provides an overview of this chess robot system and an introduction to each module.
[0044] The robot system software includes image capture module, image processing module, neural network model, game operation module, and system communication module. The specific operation process between modules is as follows: Figure 6 As shown:
[0045] The image capture module uses OpenCV library statements to call an external high-resolution industrial camera connected to the host computer to capture the global image of the chessboard and close-up images of some chess pieces.
[0046] The image processing module uses OpenCV library statements to perform grayscale, binarization, edge detection, Hough circle detection and other operations on the captured images to identify the positions of chess pieces on the board, and performs color space conversion, gamma transformation, threshold screening and other operations on the captured images to improve the accuracy of identifying chess pieces of different colors. It also performs operations such as cropping and rotating the captured close-ups of chess pieces to simulate the position changes of chess pieces during shooting. Finally, the preprocessed images are sent to the neural network for model construction.
[0047] In this embodiment, each image obtained by shooting is preprocessed, and the specific process is as follows:
[0048] (1) Cropping and rotation: Cropping the global chessboard image to obtain partial chess piece images, and rotating the individual chess piece images to simulate the different placement positions of chess pieces in the actual environment.
[0049] (2) RGB-HSV color space conversion. The HSV color space divides the color representation into three dimensions: hue, saturation, and value. Compared with the red, green, and blue primary color representation of the RGB color space, the HSV color space is more intuitive to the human eye and more suitable for color segmentation and comparison processing. The specific formula is:
[0050]
[0051] V=max
[0052] (3) Grayscale and binarization: By reducing the full color information to brightness information, the influence of chess piece pattern color change on recognition accuracy can be eliminated, and the grayscale component method can be realized. The commonly used formula is I gray =0.299×I R +0.587×I G +0.114×I B , as well as the maximum method, average method, etc., to achieve binarization, it is necessary to select a suitable threshold.
[0053] (4) Gamma transform: adjusts brightness and contrast by performing power operations on image pixels for image enhancement. The formula for gamma transform is s = c × r γ , where s is the output pixel value, r is the input pixel value, c is a constant, and γ is the gamma coefficient.
[0054] (5) Edge detection. Commonly used algorithms include the Canny algorithm. First, the image is grayed out and a Gaussian filter is used to remove noise. The gradient direction and intensity of the image are then calculated using the Sobel operator or other differential operators to locate the edge in a direction perpendicular to the maximum magnitude gradient direction. Non-maximum suppression and double threshold detection are used to eliminate pseudo edges. Finally, edge tracking is used to connect and form a complete edge.
[0055] The Gaussian filter formula is: Where G(x,y) is a Gaussian function and σ is the filter standard deviation.
[0056] The Sobel operator formula is: Among them G x and G y Represent the gradient values in the horizontal and vertical directions respectively, and * represents the convolution operator.
[0057] The formula for gradient direction and magnitude is: Where M(x,y) represents the gradient strength of the pixel, and θ(x,y) represents the gradient direction of the pixel.
[0058] The non-maximum suppression formula is:
[0059]
[0060] Among them, M L is the low threshold of gradient strength, δ x and δ y is the offset value in the gradient direction.
[0061] The dual threshold detection formula is:
[0062]
[0063] Among them, M H is the high threshold of gradient strength, Strong, Weak, and Non represent strong edge, weak edge, and non-edge, respectively.
[0064] (6) Hough circle detection, an algorithm for detecting circular contours in an image. It first detects the edge of the image to obtain the foreground point, then takes several foreground points and draws circles on them with radius R values from small to large. Once all circles have a common intersection under a certain R value, the intersection is determined to be the center of a circular edge, and the radius R value is the radius of the circular contour.
[0065] The principle of standard Hough circle detection is: the expression of the circle in polar coordinates is Transformed into Hough space: That is, a point in the three-dimensional Hough space can represent a circle. Hough circle detection (21HT) is an improvement on the standard Hough circle detection. The Hough transform is divided into two stages. The first stage detects the center of the circle, and the second stage derives the radius from the center of the circle, thereby reducing the dimension of the Hough space and improving statistical efficiency.
[0066] (7) Threshold screening: By setting the upper and lower thresholds of different colors in the HSV color space, red chess pieces and black chess pieces can be distinguished. For example, red can be set to (160, 50, 255) to (180, 50, 255) and black can be set to (0, 0, 0) to (180, 255, 46), which can achieve a better distinction effect.
[0067] The neural network model uses VGG, which is a deep convolutional neural network, which is divided into six layers: input layer, convolution layer, nonlinear activation layer, pooling layer, fully connected layer, and loss layer. The preprocessed images are divided into two parts: training set and validation set. The training set is input into the neural network, and the output result is compared with the validation set. The back propagation algorithm and the gradient descent algorithm are used to adjust the parameters of each layer of the neural network according to the comparison results. This is done through continuous iteration. After dozens of trainings, a usable neural network model is constructed.
[0068] The specific operation process of model training is as follows: take multiple photos of the chessboard in the real environment in advance, capture the images of some chess pieces, and also take multiple photos of the chess pieces in the real environment separately. All the above photos are divided into 14 groups according to the types of chess pieces (color and name), each group has about 30 photos, and more supplementary images are obtained after appropriate preprocessing, each group has about 90 photos, and then all the above photos are divided into two groups, as training set and verification set respectively, each mother set is also divided into 14 subsets, a total of 28 groups, each group has about 45 photos; call the algorithm of the neural network model to train and verify all images, repeat the training many times to continuously improve the matching degree, and use the model parameters with the best effect as the parameters of the image recognition algorithm; when the effect of multiple training is still not good, more supplementary images can be added, or more necessary preprocessing can be performed, and the training can be repeated again until the expected effect is achieved.
[0069] The game operation module adopts an independently designed game algorithm, which integrates deep search, Monte Carlo tree search, historical heuristic evaluation, α-β pruning optimization, etc. The Minimax deep search algorithm is used to prioritize traversing all possibilities of the chess game, and the α-β pruning algorithm is used to delete branches that do not affect the decision-making results, determine the local optimal solution, and reduce the search range. The historical heuristic algorithm is used to assign priorities from high to low to each branch action according to the historical effects from good to bad, thereby improving the search efficiency. Then, the game operation form is constructed in the form of a matrix, and the types and positions of each chess piece on the chessboard at the current moment generated by the previous image recognition function are called as the input matrix of the game algorithm. The algorithm output matrix contains the types and positions of each chess piece on the chessboard at the next moment. By subtracting it from the input matrix, the action trajectory of each grid chess piece can be obtained, and this trajectory is expressed as a robot code to control the robotic arm.
[0070] This implementation method uses Python language to design a game algorithm, and the specific process is as follows: the Minimax algorithm is used for deep search. First, a game tree is constructed, and each node represents a possible game state. In the odd-numbered layers, namely the Max layers, our side tries to choose the state that benefits us the most, and in the even-numbered layers, namely the Min layers, the opponent tries to choose the state that benefits us the least. Starting from the bottom of the tree, each state is scored and fed back upward, and finally the best step to be taken is obtained at the top of the tree.
[0071] Then, the α-β pruning algorithm is used to reduce the nodes of the Minimax algorithm search tree. During the search process, two parameters α and β are introduced to represent the minimum and maximum values on the search path. When the condition α≥β is met, the search of the current subtree is stopped to prune meaningless branches in the search tree, thereby improving the search speed. This algorithm is suitable for many two-person adversarial decision-making processes.
[0072] Finally, the historical heuristic algorithm is used to further optimize the search strategy. The basic idea is to simulate the human way of thinking, give high priority to actions with good historical effects, give low priority to actions with poor historical effects, and make local optimization according to the trend of historical actions, so as to find a better solution within an acceptable time frame.
[0073] In addition, this embodiment uses RT-Toolbox Mitsubishi industrial robot programming software, and the programming statements used are Basic V language to write the motion program of the robot arm and gripper, the control program of the solenoid valve, and the communication program between the robot controller and the host computer.
[0074] The system communication module adopts serial communication and Ethernet communication. The host computer and the robot controller use serial communication to transmit the robot status data stream, which is responsible for the operation control, status monitoring and alarm information transmission of the robot in online mode. Ethernet communication is used for timely transmission of position variables in the game algorithm, which is responsible for determining the movement trajectory of each grid chess piece.
[0075] This implementation uses Mitsubishi's own robot programming software RT-Toolbox to control the operation of the robot, and achieves communication by establishing a data link. The specific steps for establishing communication are: use the COM3 serial port to establish an Ethernet connection, connect the controller and the host computer with a network cable, check whether communication is achieved through the terminal ping command, send and receive data through the network debugging assistant, obtain the format of data transmission and reception, and control the movement of the robot. The information transmission and reception interval is 0.5s.
[0076] The above description of the embodiments is to facilitate the understanding and application of the present invention by those skilled in the art. It is obvious that those skilled in the art can easily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments. Improvements and modifications made by those skilled in the art to the present invention based on the disclosure of the present invention should be within the protection scope of the present invention.
Claims
1. A four-axis chess-playing robot system, Features: It includes a chessboard, a robot body, a controller and a host computer. A camera is installed on the robot body. The camera takes a chess image on the chessboard and sends it to the host computer. The host computer processes the image information, analyzes the current chess shape, calculates the chess strategy, and sends it to the controller to control the robot body to play chess on the chessboard. The host computer includes: An image capture module is used to call a camera to capture a global image of the chessboard and close-up images of some chess pieces; An image processing module is used to pre-process the image and detect the position of each chess piece in the image; A neural network model is used to identify the preprocessed image and obtain the type of each chess piece; The game calculation module inputs and outputs the chess piece position variables in matrix form through the game algorithm according to the type and position of each chess piece on the chessboard. The system communication module is used to transmit the robot status data stream and chess piece position variables to the controller to control the robot body to play chess according to the strategy.
2. The four-axis chess-playing robot system according to claim 1, Features: The image capture module uses OpenCV library statements to call a camera connected to a host computer to capture a global image of the chessboard and close-up images of some chess pieces.
3. The four-axis chess-playing robot system according to claim 1, Features: The image processing module performs operations including cropping and rotation, graying, binarization, edge detection, and improved Hough circle detection on the global image to improve the recognition accuracy of the chess piece position, performs color space conversion, gamma transformation, and threshold screening on the global image to improve the recognition accuracy of the chess piece type, and crops and rotates the close-up image to simulate the position change of the chess piece during shooting.
4. The four-axis chess-playing robot system according to claim 3, Features: The improved Hough circle detection operation divides the Hough transform into two stages, the first stage detects the center of the circle, and the second stage derives the radius from the center of the circle, thereby reducing the dimension of the Hough space and improving the statistical efficiency.
5. The four-axis chess-playing robot system according to claim 1, Features: The neural network model adopts the VGG deep convolutional neural network, which includes an input layer, a convolutional layer, a nonlinear activation layer, a pooling layer, and a fully connected layer, wherein multiple convolutional layers and pooling layers are stacked, the input layer receives an image, the convolutional layer is used to extract features, and the pooling layer is used to reduce the dimension of features. After the image undergoes multiple sets of continuous convolution-pooling operations, the network can capture the complex patterns of the image and output it to the fully connected layer, which is used to fuse and classify image features and predict the type of each chess piece.
6. The four-axis chess-playing robot system according to claim 1, Features: An independently designed game algorithm is integrated in the game operation module. The algorithm integrates deep search technology, historical heuristic evaluation technology based on Monte Carlo tree search, and α-β pruning optimization technology. First, all possible branch actions on the chessboard are preferentially traversed through the deep search technology. Then, the branches that do not affect the decision results are deleted through the α-β pruning optimization technology to determine the local optimal solution and reduce the search range. Then, the historical heuristic evaluation technology is used to assign priorities from high to low to each branch action according to the historical effects from good to bad, thereby improving the search efficiency. Finally, a game operation mechanism is constructed in the form of a matrix, and the types and positions of each chess piece on the chessboard at the current moment identified by the previous detection are called as the input matrix of the game algorithm. The output matrix of the algorithm contains the types and positions of each chess piece on the chessboard at the next moment. The action trajectory of each grid chess piece can be obtained by subtracting it from the input matrix, and this trajectory is expressed as a robot code.
7. The four-axis chess-playing robot system according to claim 6, Features: The deep search technology uses the Minimax algorithm to perform deep search. First, a game tree is constructed, and each node represents a possible game state. In the odd-numbered layer, namely the Max layer, our side tries to choose the state that benefits us the most; in the even-numbered layer, namely the Min layer, the opponent tries to choose the state that benefits us the least. Each state is scored from the bottom of the tree and fed back upward, and finally the best step to be taken is obtained at the top of the tree; the α-β pruning optimization technology is used to reduce the nodes of the Minimax algorithm search tree. During the search process, two parameters α and β are introduced to represent the minimum and maximum values on the search path. When the condition α≥β is met, the search of the current subtree is stopped, and the meaningless branches in the search tree are pruned, thereby improving the search speed; the historical inspiration evaluation technology further optimizes the search strategy. Its basic idea is to simulate the human way of thinking, give high priority to actions with good historical effects, give low priority to actions with poor historical effects, and perform local optimization according to the trend of historical actions, so as to find a better solution within an acceptable time range.
8. The four-axis chess-playing robot system according to claim 1, Features: The system communication module uses serial communication to transmit the robot status data stream to the controller, and is responsible for the operation control, status monitoring and alarm information transmission of the robot in online mode. It uses Ethernet communication to transmit the chess piece position variables generated by the game algorithm to the controller in real time, and is responsible for determining the movement trajectory of each grid chess piece.
9. The four-axis chess-playing robot system according to claim 1, Features: The robot body is provided with a mechanical arm and an air circuit. An external air pump draws air to generate a positive pressure source, which is then converted into negative pressure after passing through a vacuum generator. Finally, suction is generated at the suction cup at the end of the mechanical arm through the air circuit to achieve effective absorption of the chess pieces. A solenoid valve is provided in the air circuit. The opening and closing of the solenoid valve is controlled by a DC switching power supply. The DC power supply is controlled by a host computer. The opening and closing of the solenoid valve is used to realize the picking up and putting down of the chess pieces.
10. The four-axis chess-playing robot system according to claim 1, Features: The robot body is provided with a voice module and an interactive panel. The voice module collects the user's voice input through an integrated microphone, and then uses the built-in processor to recognize and understand the voice, and finally generates a responsive voice file through voice synthesis and plays it to achieve voice interaction with the user; the interactive panel is connected to the controller to provide the user with a touch method for function selection and game experience.
Citation Information
Patent Citations
Chess playing robot and working method
CN115056243A
Chess robot of playing chess
CN206577357U
