Hierarchical processing method, device and related equipment for AI chess model
By building and training an initial AI chess model, generating multiple levels of AI chess transition models and setting sub-level chess rules, the problem of resource waste in existing technologies is solved, the user experience is improved and multi-level level division is achieved.
Patent Information
- Application Number
- CN202111291959.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-11-02
AI Technical Summary
In the existing technology, the level classification method of AI chess models requires a large number of models, resulting in waste of resources and poor user experience.
By constructing an initial AI chess-playing model and using training samples for training, multiple levels of AI chess-playing transition models are generated according to the degree of training, and multiple sub-level chess-playing rules are set for each level to form AI chess-playing models of multiple levels.
It improves user experience, saves resources, and implements multi-level classification without increasing the number of models.
Smart Images

Figure CN113988199B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a hierarchical processing method, apparatus, and related equipment for an AI chess-playing model. Background Art
[0002] Some chess-playing apps typically use a small number of AI (Artificial Intelligence) models of varying levels to play against users of varying skill levels. However, this approach, due to the limited number of models, can result in a mismatch between the user's skill level and the game, resulting in a poor user experience.
[0003] In the existing technology, the above situation is generally solved by increasing the number of AI models of different levels. However, this method requires more AI models and occupies more resources, resulting in a waste of resources. Summary of the Invention
[0004] In view of this, the purpose of the present disclosure is to propose a hierarchical processing method, device and related equipment for an AI chess playing model to solve or partially solve the above technical problems.
[0005] Based on the above objectives, the present disclosure provides a hierarchical processing method for an AI chess model, comprising:
[0006] Build an initial model for AI chess;
[0007] The obtained training samples are used to train the initial AI chess playing model, and during the training process, multiple levels of AI chess playing transition models are obtained according to the training degree;
[0008] Setting corresponding multiple sub-level chess playing rules for the AI chess playing transition model at each level;
[0009] The multiple sub-level chess playing rules are matched to the AI chess playing transition model of the corresponding level to obtain AI chess playing models of multiple levels, wherein the AI chess playing model of one level contains multiple sub-level chess playing rules.
[0010] In some exemplary embodiments, the method of using the acquired training samples to train the initial AI chess playing model, and obtaining multiple levels of AI chess playing transition models according to the degree of training during the training process, specifically includes:
[0011] Based on the AI chess initial model, a training sample Y1 is obtained by using the model to play chess with itself;
[0012] Using the training sample Y1 to train the AI chess initial model, and determining an ELO rating P1 of the trained AI chess initial model;
[0013] In response to determining that P1 does not meet the first-level standard, obtaining a new training sample Y1' based on the trained AI chess initial model by using a model self-playing game, and continuing to train the trained AI chess initial model using the new training sample Y1';
[0014] In response to determining that P1 meets the first-level standard, using the trained AI chess playing initial model as the first-level AI chess playing transition model;
[0015] Based on the first-level AI chess transition model, the training sample Y2 is obtained by using the model's self-playing method;
[0016] Using the training sample Y2 to train the first-level AI chess transition model, and determining an ELO rating P2 of the trained first-level AI chess transition model;
[0017] In response to determining that P2 does not meet the second-level standard, obtaining a new training sample Y2' based on the trained first-level AI chess transition model by using a model self-playing game, and continuing to train the trained first-level AI chess transition model using the new training sample Y2';
[0018] In response to determining that P2 meets the second-level standard, using the trained first-level AI chess transition model as the second-level AI chess transition model;
[0019] The number N of AI chess playing transition models of various levels is obtained by statistics. In response to determining that the number N is equal to the set number value, the training process ends, and N levels of AI chess playing transition models are obtained.
[0020] In some exemplary embodiments, the method of using the acquired training samples to train the initial AI chess playing model, and obtaining multiple levels of AI chess playing transition models according to the degree of training during the training process, specifically includes:
[0021] Dividing the acquired training samples into multiple groups of training samples;
[0022] The first set of training samples is used to train the initial AI chess playing model to obtain a first-level AI chess playing transition model;
[0023] Using the second set of training samples, the first-level AI chess transition model is further trained to obtain a second-level AI chess transition model;
[0024] The remaining groups of training samples are used to continue training based on the second-level AI chess transition model until it is determined that all the multiple groups of training samples have been trained, thereby obtaining multiple levels of AI chess transition models.
[0025] In some exemplary embodiments, the step of setting multiple sub-level chess playing rules for the AI chess playing transition model at each level specifically includes:
[0026] Setting the number of recommended move points obtained by screening the AI chess transition model at each level as a first predetermined number;
[0027] Determining the winning rate values corresponding to the first predetermined number of recommended placement points, and sorting the first predetermined number of recommended placement points in descending order of the winning rate values to obtain a sorting result;
[0028] A plurality of sub-level chess playing rules are set according to the sorting result.
[0029] In some exemplary embodiments, the plurality of sub-level chess playing rules include: low-level chess playing rules, middle-level chess playing rules, and high-level chess playing rules;
[0030] The low-level chess playing rules are as follows: randomly selecting a corresponding recommended placement point from the sorting results as the target placement point;
[0031] The middle-level chess playing rule is: select the first second predetermined number of recommended placement points from the sorting results, and randomly select a corresponding recommended placement point from the first second predetermined number of recommended placement points as the target placement point;
[0032] The high-level chess playing rule is: select the recommended placement point with the highest winning rate value from the sorting results as the target placement point.
[0033] In some exemplary embodiments, the method further comprises:
[0034] Receive the start game command triggered by the target user and obtain the target user's level tag;
[0035] Selecting a target AI chess-playing model of a corresponding level from AI chess-playing models of multiple levels according to the level label;
[0036] Using the target AI chess model to play chess with the target user according to the corresponding multiple sub-level chess rules;
[0037] In response to determining that the target user meets the clearance conditions of each sub-level chess playing rule in the multiple sub-level chess playing rules, the level mark of the target user is upgraded to the next level level mark, and the next level AI chess playing model is selected to continue playing against the target user.
[0038] In some exemplary embodiments, the passing condition of each sub-level chess rule is: the proportion of the target user's winning chess games is greater than or equal to a predetermined proportion, or the number of the target user's winning chess games is greater than or equal to a predetermined number.
[0039] Based on the same inventive concept, the exemplary embodiments of the present disclosure further provide a hierarchical processing device for an AI chess-playing model, comprising:
[0040] A model building module is configured to build an initial model for AI chess;
[0041] A training module is configured to train the AI chess initial model using the acquired training samples, and obtain multiple levels of AI chess transition models according to the training degree during the training process;
[0042] A sub-level chess playing rule setting module is configured to set a plurality of corresponding sub-level chess playing rules for each level of the AI chess playing transition model;
[0043] The model grading determination module is configured to match the multiple sub-level chess playing rules to the AI chess playing transition model of the corresponding level to obtain AI chess playing models of multiple levels, wherein the AI chess playing model of one level contains multiple sub-level chess playing rules.
[0044] Based on the same inventive concept, an exemplary embodiment of the present disclosure further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the above-described methods when executing the computer program.
[0045] Based on the same inventive concept, an exemplary embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any one of the above methods.
[0046] As can be seen from the above, the hierarchical processing method, device and related equipment of the AI chess model provided by the present disclosure can obtain multiple levels of AI chess transition models according to the training level of the constructed AI chess initial model during the training process of the constructed AI chess initial model, and then add multiple sub-level chess rules to the corresponding level AI chess transition model to obtain multiple levels of AI chess models. Each sub-level chess rule is applicable to the AI chess model of the corresponding level. Under different self-playing rules, the chess strength level of the AI chess model of the corresponding level is different. This is equivalent to further multi-level division of the AI chess model of the corresponding level, and the sub-level chess rules occupy fewer resources, so that a small number of AI chess models can be used to complete the tasks of a large number of AI models, effectively saving resources while ensuring the smoothness of the AI model classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 A schematic diagram of an application scenario of an exemplary embodiment of the present disclosure;
[0049] Figure 2 Schematic diagram of a process for hierarchical processing of an AI chess-playing model according to an exemplary embodiment of the present disclosure;
[0050] Figure 3 This is a flow chart of the AI chess model in a specific application according to an exemplary embodiment of the present disclosure;
[0051] Figure 4 A schematic structural diagram of a hierarchical processing device for an AI chess-playing model according to an exemplary embodiment of the present disclosure;
[0052] Figure 5 Another structural diagram of the hierarchical processing device of the AI chess-playing model according to an exemplary embodiment of the present disclosure;
[0053] Figure 6 Schematic diagram of the electronic device structure according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0054] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. Rather, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0055] According to the embodiments of the present disclosure, a hierarchical processing method, apparatus, and related equipment for an AI chess-playing model are proposed.
[0056] It should be understood herein that any number of elements in the drawings is for illustration only and not for limitation, and any naming is only for distinction and does not have any limiting meaning.
[0057] For ease of understanding, the terms involved in the embodiments of the present disclosure are explained below:
[0058] Artificial Neural Networks (ANNs): Based on the principles of biological neural networks and the needs of practical applications, practical artificial neural network models are constructed, corresponding learning algorithms are designed, certain intelligent activities of the human brain are simulated, and then they are technically implemented to solve practical problems.
[0059] AI chess model: An intelligent chess model with a certain level of chess playing is obtained by repeatedly learning / training a neural network with training samples. This AI chess model can simulate people of corresponding levels playing chess with users.
[0060] ELO rating: A rating system invented by Arpad Elo, also known as the Elo Rating System, is a method for measuring the level of various types of chess activities and is the recognized authoritative method for evaluating chess level today.
[0061] Chess level: Different chess levels correspond to different levels of chess ability, which can be divided according to the corresponding scores of various types of chess.
[0062] The Win Rate Prediction Model (ValueNet) uses a neural network trained on a large number of samples to predict the win rates of various moves based on the current state of the chessboard. It shares the characteristics of a neural network and possesses a certain degree of self-learning capability.
[0063] Policy model (PolicyNet): After being pre-trained (learned) using a neural network, it can screen and determine the next move point based on the current chessboard.
[0064] Monte Carlo Tree Search: It is a heuristic search algorithm based on tree data structure that is still relatively effective when the search space is huge.
[0065] The principles and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure. SUMMARY OF THE INVENTION
[0067] The present disclosure aims to provide a method, apparatus, and related equipment for hierarchical processing of AI chess models, thereby enabling a solution for quickly and accurately evaluating a user's chess playing ability. Chess can refer to Go, Chinese chess, international chess, Gobang, military chess and four-nation war, dark chess, checkers, reversi, six-in-a-row chess, flying chess, shogi, and beast chess, among others.
[0068] The disclosed solution is particularly applicable to Go, one of the aforementioned chess games. Go has a wide variety of play styles, so the corresponding AI models at each level consume a relatively high amount of memory and processing resources. If a chess game software includes AI models at a high level, it will consume a large amount of memory and processing resources, easily resulting in a waste of resources.
[0069] This disclosure primarily relates to the application of hierarchical processing for AI Go models. Currently, the grading of AI Go models on the market is often accomplished by training a separate model for each grading level. This approach results in a certain degree of resource waste. This disclosure proposes a method that utilizes a small number of models and weakens rules, improving model utilization without reducing grading levels and thus conserving resources.
[0070] For example, categorizing AI Go models into 10 levels requires 10 different models for classification. Training a Go AI model that matches the corresponding level presents many challenges. For example, Ke Jie's ELO rating ranges from 2900 to 3200. It would be relatively difficult to obtain an AI model with the same skill level as Ke Jie. If the trained AI model's ELO rating exceeds 3200, it is necessary to weaken the AI model's capabilities. Furthermore, the AI model's skill level needs to be smoothly improved between different ELO levels. For example, a professional beginner has an ELO rating of approximately 2240. When the AI model's ELO is around 2240, it can be concluded that the AI's skill level is professional beginner. When the ELO is higher than this value, weakening the AI model's capabilities to bring it up to the beginner level is a technical problem to be solved by this disclosure.
[0071] Based on the above description, and in response to the problems existing in the prior art, the present disclosure provides a hierarchical processing method, device and related equipment for an AI chess model, which can obtain multiple levels of AI chess transition models according to the training degree of the constructed AI chess initial model during the training process of the constructed AI chess initial model, and then add multiple sub-level chess rules to the corresponding level of AI chess transition model to obtain multiple levels of AI chess models. Each sub-level chess rule is applicable to the AI chess model of the corresponding level. Under different self-playing rules, the chess strength level of the AI chess model of the corresponding level is different. This is equivalent to further multi-level division of the AI chess model of the corresponding level, and the sub-level chess rules occupy fewer resources. In this way, a small number of levels of AI chess models can be used to complete the tasks of a large number of levels of AI models, effectively saving resources while ensuring the smoothness of the AI model grading.
[0072] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.
[0073] Application Scenario Overview
[0074] refer to Figure 1 , which is a schematic diagram of an application scenario of the hierarchical processing method of the AI chess model provided by the embodiment of the present disclosure. The application scenario includes a terminal device 101, a server 102, and a data storage system 103. Among them, the terminal device 101, the server 102 and the data storage system 103 can be connected through a wired or wireless communication network. The terminal device 101 includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA) or other electronic devices that can realize the above functions. The server 102 and the data storage system 103 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0075] The server 102 is used to provide a hierarchical processing service of the AI chess model to the terminal device 101 , and the terminal device 101 is installed with a chess game client that communicates with the server 102 .
[0076] First, server 102 constructs an initial AI chess model based on a neural network. A large amount of chess game data is obtained as training samples to train the initial AI chess model. During the training process, the model obtained during intermediate training is used as the AI chess transition model. During the intermediate training process, multiple levels of AI chess transition models can be obtained. Then, for each level of the AI chess transition model, multiple sub-level chess rules that reflect different levels of chess playing skills are formulated. These sub-level chess rules are added to the corresponding level of AI chess transition models, thereby obtaining AI chess models of multiple levels. Finally, the multiple levels of AI chess models are transmitted via the communication network to the chess game client of terminal device 101.
[0077] In this way, the user can play chess through the chess game client of the terminal device 101. During the game, the AI chess model of the corresponding level can be matched according to the user's level. The AI chess model will first play against the user using the lowest sub-level chess rules. If the game passes, the AI chess model will use the next level of its own chess rules to play against the user. If the user passes the highest sub-level chess rules, it proves that the user has passed the AI chess model of that level. The AI chess model of the next level will then be selected and the game will continue with the user according to the above process. This solution can improve the user experience.
[0078] The following combination Figure 1 The hierarchical processing method of the AI chess model according to the exemplary embodiment of the present disclosure is described using the application scenario of FIG. It should be noted that the above application scenario is only provided to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0079] Exemplary Methods
[0080] refer to Figure 2 The embodiment of the present disclosure provides a hierarchical processing method for an AI chess model, comprising the following steps:
[0081] Step 201: Build an initial model for AI chess.
[0082] In specific implementation, an AI chess initial model is constructed based on a neural network. The AI chess initial model includes: an input layer, multiple hidden layers and an output layer. The number of input ports in the input layer and the number of hidden layers can be set according to experience and actual needs.
[0083] Step 202: Use the acquired training samples to train the AI chess initial model, and obtain multiple levels of AI chess transition models according to the training degree during the training process.
[0084] The training samples can be training samples that are continuously obtained through model self-play, or they can be a large number of training samples obtained at one time.
[0085] The first method is to train the training samples obtained by using the model's self-play method. The training process includes:
[0086] Step 2021: Based on the initial AI chess model, a training sample Y1 is obtained by using the model to play chess with itself.
[0087] In specific implementation, the process of obtaining training samples is as follows:
[0088] 1. Randomly initialize the initial model of AI chess and conduct preliminary training on the initial model of AI chess.
[0089] 2. Use the strongest AI chess initial model and the second strongest AI chess initial model to play self-game. Generate a certain number of game board samples. This will generate a batch of game board samples, which will be used as training samples Y1.
[0090] Step 2022: Use the training sample Y1 to train the AI chess initial model, and determine the ELO rating P1 of the trained AI chess initial model.
[0091] In a specific implementation, the first training sample can be input into the input port of the input layer of the initial AI chess model. The input layer then passes the sample data to the hidden layer for processing. The previous hidden layer passes the processing result to the next hidden layer for processing, until the last hidden layer sends the processing result to the output layer, which integrates the processing results and outputs the processing result. Then, based on the output processing result and the actual result of the training sample, the loss function is determined. The loss value obtained by the loss function is used to adjust the parameters of each layer in the initial AI chess model, thus completing the training process. This training process is repeated until all the training samples are trained.
[0092] Finally, the trained AI chess initial model is scored according to the ELO scoring mechanism to determine the ELO rating P1 of the trained AI chess initial model. In this way, the chess playing ability of the trained AI chess initial model can be judged based on P1.
[0093] Step 2023: In response to determining that P1 does not meet the first-level standard, a new training sample Y1' is obtained based on the trained AI chess initial model using a model self-playing method, and the trained AI chess initial model is continued to be trained using the new training sample Y1'.
[0094] In a specific implementation, if after all training samples are trained, the ELO rating P1 of the obtained AI chess initial model still does not meet the first-level standard, the last trained AI chess initial model is used as the current strongest AI chess initial model, and the previous trained AI chess initial model is used as the second strongest AI chess initial model. The two are played against each other to obtain new training samples Y1', which are then used to train the trained AI chess initial model again. If the results still do not meet the first-level standard, the above process is repeated, using the model to play against each other to obtain new training samples and continue training until the first-level standard is met.
[0095] Step 2024: In response to determining that P1 meets the first-level standard, the trained AI chess playing initial model is used as the first-level AI chess playing transition model.
[0096] Step 2025: Based on the first-level AI chess transition model, a training sample Y2 is obtained by using the model self-playing game.
[0097] In a specific embodiment, after obtaining the first-level AI chess transition model, training must continue. The first-level AI chess transition model needs to be used as the strongest model, and the previous AI chess initial model of the first-level AI chess transition model needs to be used as the second-strongest model. The two models play against each other to obtain training samples Y2.
[0098] Step 2026: Use the training sample Y2 to train the first-level AI chess transition model, and determine the ELO rating P2 of the trained first-level AI chess transition model.
[0099] In specific implementation, the ELO rating P2 of the first-level AI chess transition model after training is also scored using the ELO scoring mechanism.
[0100] In step 2027, in response to determining that P2 does not meet the second-level standard, a new training sample Y2' is obtained based on the trained first-level AI chess transition model using the model self-playing method, and the trained first-level AI chess transition model is continued to be trained using the new training sample Y2'.
[0101] In specific implementations, if after all training samples are trained, the ELO rating P2 of the trained first-level AI chess transition model still does not meet the second-level standard, the last trained first-level AI chess transition model is used as the current strongest model, and the previously trained model is used as the second-strongest model. These two models are then used to play against each other, thereby obtaining new training samples Y2'. This new training sample Y2' is then used to train the trained first-level AI chess transition model again. If the results still do not meet the second-level standard, the above process is repeated, using the model to play against itself to obtain new training samples and continue training until the second-level standard is met.
[0102] Step 2028: In response to determining that P2 meets the second-level standard, the trained first-level AI chess transition model is used as the second-level AI chess transition model.
[0103] In specific implementation, the above description is the training process of the first and second level AI chess transition models. The subsequent training process of the third, fourth, and fifth level AI chess transition models is similar to the above. They all use the model to play against itself to continuously obtain new training samples, continuously learn and train the model, and then use the ELO rating of the trained model as the division standard for each level.
[0104] Step 2029, the number N of AI chess transition models of various levels is obtained by counting. In response to determining that the number N is equal to the set number value, the training process ends, and N levels of AI chess transition models are obtained.
[0105] In practice, the number N of AI chess transition models of different levels should be at least two. The present disclosure preferably uses five levels of AI chess transition models. This is because five levels of AI chess transition models are not too many and can meet the needs of most chess game users.
[0106] The second method is to obtain a large number of training samples from historical data of some chess games. The training process using these large number of training samples, i.e., step 202, specifically includes:
[0107] Step 2021': divide the acquired training samples into multiple groups of training samples.
[0108] During specific implementation, the AI chess transition model is grouped and divided according to the number of levels required, and each level corresponds to a group of training samples.
[0109] The training samples can be divided into groups by average grouping, or the user can group the training samples according to actual needs (for example, the first group has 100, the second group has 200, the third group has 500, etc.), or the number of training samples in each group can be divided according to a certain formula (for example, in a linear growth manner, the first group has 200, the second group has 400, the third group has 600, the fourth group has 800, etc.).
[0110] Step 2022': Use the first set of training samples to train the initial AI chess playing model to obtain a first-level AI chess playing transition model.
[0111] In specific implementation, the first training sample in the first set of training samples is input into the input port of the input layer of the initial AI chess model. The input layer then passes this sample data to the hidden layer for processing. The previous hidden layer passes the processing result to the next hidden layer for processing, until the last hidden layer sends the processing result to the output layer, which integrates the processing results and outputs the processing result. Then, based on the output processing result and the actual result of the training sample, the loss function is determined. The loss value obtained by the loss function is used to adjust the parameters of each layer in the initial AI chess model, thus completing the training process. This training process is repeated until all the first set of training samples are trained. After training, the first-level AI chess transition model is obtained.
[0112] Step 2023': Continue training the first-level AI chess transition model using the second set of training samples to obtain a second-level AI chess transition model.
[0113] In specific implementation, the second group of training samples is used to continue training the first-level AI chess transition model according to the training process of the first group mentioned above. After all the training samples of the second group are trained, the second-level AI chess transition model is obtained.
[0114] Step 2024', continue training based on the second-level AI chess transition model using the remaining groups of training samples until it is determined that all the multiple groups of training samples have been trained, thereby obtaining multiple levels of AI chess transition models.
[0115] In specific implementation, the disclosure also prefers a 5-level AI chess transition model in the second training scheme because the number of 5-level AI chess transition models is not large and can meet the needs of most chess game users.
[0116] Based on the AI chess transition models of various levels obtained by the first and second training schemes, the model's capabilities are further weakened. Specifically, the weakening method can be to use sub-level chess rules of different difficulty levels to weaken the capabilities. The specific process is as follows:
[0117] Step 203: Set multiple sub-level chess playing rules for the AI chess playing transition model at each level.
[0118] The specific implementation includes:
[0119] Step 2031: Set the number of recommended move points obtained by the AI chess transition model at each level to a first predetermined number. The first predetermined number can be 5, 10, or 20, etc., and can be set based on actual needs. In the present disclosure, 10 is preferred.
[0120] In specific implementation, the process of selecting recommended drop points includes:
[0121] Initially, a pre-trained strategy model is used to search the pre-obtained Monte Carlo tree based on the pushed chessboard, according to the predetermined search breadth, to determine N recommended placement points. The predetermined search breadth can be set based on actual needs, for example, (analysisWideRootNoise)[0,1], where the closer the value is to 0, the narrower the search breadth; the closer the value is to 1, the wider the search breadth. Increasing the predetermined search breadth can expand the search scope, thereby increasing the weight of the number of visits to each node in the Monte Carlo tree given by the UCB (upper confidence bound) value during the search, thereby increasing the chances of visiting nodes with fewer visits in the Monte Carlo tree.
[0122] Step 2032: determine the winning rate values corresponding to the first predetermined number of recommended placement points, and sort the first predetermined number of recommended placement points in descending order of the winning rate values to obtain a sorting result.
[0123] The above ranking method uses a pre-trained win rate prediction model to determine N corresponding win rates for N recommended moves; then sorts the N recommended moves in descending order based on these win rates to obtain the ranking result. This ranking method is purely based on win rate, and this sorting operation is simple and fast.
[0124] There is another sorting method: use the pre-trained win rate prediction model and Monte Carlo tree to sort the N recommended placement points to obtain a sorting result.
[0125] In specific implementation, the N recommended moves are obtained through the win rate prediction model to obtain the win rate X (X1, X2...X N ). Get the number of visits Y (Y1, Y2...Y) corresponding to the N recommended moves in the Monte Carlo tree N ). Appropriate weights are assigned to the obtained X and Y, so that the two can be combined to determine the ranking result. The resulting ranking result is not simply based on the win rate or the number of visits, making the ranking result more in line with the actual needs and playing habits of users.
[0126] Step 2033: Set multiple sub-level chess playing rules based on the sorting result. The specific number of sub-level chess playing rules can be selected according to actual conditions.
[0127] In specific implementation, the multiple sub-level chess playing rules include: low-level chess playing rules, middle-level chess playing rules and high-level chess playing rules.
[0128] The low-level chess playing rule is: randomly selecting the corresponding recommended placement point from the sorting results as the target placement point.
[0129] The neutron-level chess rules are as follows: select the first second predetermined number of recommended placement points from the sorted results, and randomly select a corresponding recommended placement point from the first second predetermined number of recommended placement points as the target placement point. The second predetermined number is less than the total number of sorted results and can be set according to actual needs.
[0130] In specific implementation, the corresponding sub-level rules can be divided into multiple categories, that is, the first second predetermined number of selected items can be divided into multiple categories. For example, among 10 sorting results, the first 8 are selected as the first level, the first 6 are selected as the second level, the first 4 are selected as the third level, and the first two are selected as the fourth level.
[0131] The high-level chess playing rule is: select the recommended placement point with the highest winning rate value from the sorting results as the target placement point.
[0132] Step 204: Match the multiple sub-level chess playing rules to the AI chess playing transition model of the corresponding level to obtain AI chess playing models of multiple levels, wherein the AI chess playing model of one level contains multiple sub-level chess playing rules.
[0133] In this way, when a user reaches a certain level, the AI chess model of that level will be used to select rules in the order of low-level, medium-level, and high-level. This is equivalent to weakening the AI chess model of a level into three sub-levels. Furthermore, without increasing the number of AI chess models of the corresponding level, the effects of multiple levels can be produced. The program for the chess rules of each sub-level is relatively simple and consumes fewer resources. Therefore, based on this solution, a small number of AI chess models can be used to complete the tasks of AI models of a large number of levels, effectively saving resources while ensuring the smoothness of AI model grading.
[0134] After obtaining AI chess playing models of multiple levels, all of the AI chess playing models of multiple levels are stored in the corresponding chess playing game, or the first-level AI chess playing model is first stored in the corresponding chess playing game.
[0135] If all data is stored in the chess game, then when the user reaches the next level, the next level AI chess model will be quickly activated to play against the user. However, this method takes up relatively more storage resources.
[0136] If only the first-level AI chess model is initially stored in the chess game, when the user reaches the next level, the second-level AI chess model will be retrieved from the service platform and stored on the user's client, while the first-level AI chess model will be deleted. This method uses less storage space, but due to the time required for downloading, it may not be possible to quickly enter the next level.
[0137] like Figure 3 As shown, based on the above two storage methods of AI chess models of various levels, the actual game process of users using the chess game client is as follows:
[0138] Step 205: Receive a game start instruction triggered by the target user and obtain the target user's level tag.
[0139] Step 206: Select a target AI chess-playing model of a corresponding level from AI chess-playing models of multiple levels according to the level label.
[0140] Step 207: Use the target AI chess model to play chess with the target user according to the corresponding multiple sub-level chess rules.
[0141] Step 208: In response to determining that the target user meets the clearance conditions of each of the multiple sub-level chess rules, the target user's level mark is upgraded to a next-level level mark, and the next-level AI chess model is selected to continue playing against the target user.
[0142] In specific implementations, a user starts with an ELO rating of 0. As the user progresses through the game, their skill level increases, and their chances of winning increase. Once the user meets the requirements for the lower-level rules, the intermediate-level rules are combined with the first-level AI chess model to continue playing against the user. Furthermore, if the user passes the requirements for the corresponding sub-level rules, their level will be marked with the corresponding sub-level label. For example, a label of "Level 1 - Medium" indicates that the user is in the process of passing the first-level, intermediate-level rules.
[0143] When the user passes the high-level chess rules in the first-level AI chess model, it proves that the user has successfully passed the first level and can enter the second level and continue to play against the user using the second-level AI chess model.
[0144] In some optional implementations, the passing condition for each sub-level chess rule is: the proportion of the target user's winning chess games is greater than or equal to a predetermined proportion, or the number of the target user's winning chess games is greater than or equal to a predetermined number.
[0145] In specific implementation, the percentage of winning games or the number of winning games are evaluated based on the user's most recent predetermined number of games (e.g., ten games). The specific values of the predetermined percentage and the predetermined number can be set according to actual needs.
[0146] For example, a level can be cleared if the winning percentage out of ten games is greater than or equal to 70% (or 80% or 90% or 100%). Alternatively, a level can be cleared if at least seven out of ten games are won. In this way, if a user wins seven games in a row, the next three games can be cleared directly without playing.
[0147] Based on the solution of the above embodiment, during the training process of the constructed AI chess initial model, multiple levels of AI chess transition models can be obtained according to the training level of the AI chess initial model, and then multiple sub-level chess rules can be added to the AI chess transition model of the corresponding level to obtain AI chess models of multiple levels. Each sub-level chess rule is applicable to the AI chess model of the corresponding level. Under different self-playing rules, the chess strength level of the AI chess model of the corresponding level is different. This is equivalent to further multi-level division of the AI chess model of the corresponding level, and the sub-level chess rules occupy fewer resources. In this way, a small number of AI chess models can be used to complete the tasks of a large number of AI models of different levels, effectively saving resources while ensuring the smoothness of the AI model classification.
[0148] Exemplary devices
[0149] refer to Figure 4 Based on the same inventive concept as any of the above-mentioned chess playing ability testing method embodiments, the disclosed embodiment also provides a hierarchical processing device for an AI chess playing model.
[0150] The hierarchical processing device of the AI chess model includes:
[0151] Model building module 401, configured to build an initial model of AI playing chess;
[0152] A training module 402 is configured to train the initial AI chess playing model using the acquired training samples, and obtain multiple levels of AI chess playing transition models according to the training process;
[0153] A sub-level chess playing rule setting module 403 is configured to set a plurality of corresponding sub-level chess playing rules for each level of the AI chess playing transition model;
[0154] The model grading determination module 404 is configured to match the multiple sub-level chess playing rules to the AI chess playing transition model of the corresponding level to obtain AI chess playing models of multiple levels, wherein the AI chess playing model of one level contains multiple sub-level chess playing rules.
[0155] In some optional implementations, the training module 402 includes:
[0156] A sample acquisition unit is configured to obtain a training sample Y1 based on the AI chess initial model by using the model self-playing game;
[0157] A first training unit is configured to train the AI chess initial model using the training sample Y1 and determine an ELO rating P1 of the trained AI chess initial model;
[0158] a level determination unit configured to, in response to determining that P1 does not meet the first-level standard, obtain new training samples Y1' based on the trained AI chess initial model by using a model self-playing game, and continue training the trained AI chess initial model using the new training samples Y1'; and, in response to determining that P1 meets the first-level standard, use the trained AI chess initial model as a first-level AI chess transition model;
[0159] The sample acquisition unit is further configured to obtain a training sample Y2 by using the model self-playing game based on the first-level AI chess transition model;
[0160] The first training unit is further configured to train the first-level AI chess transition model using the training sample Y2, and determine an ELO rating P2 of the trained first-level AI chess transition model;
[0161] The level determination unit is further configured to, in response to determining that P2 does not meet the second-level standard, obtain new training samples Y2' based on the trained first-level AI chess transition model using a model self-playing method, and continue training the trained first-level AI chess transition model using the new training samples Y2'; in response to determining that P2 meets the second-level standard, use the trained first-level AI chess transition model as the second-level AI chess transition model;
[0162] The first statistical unit is configured to count the number N of AI chess transition models of various levels. In response to determining that the number N is equal to the set number value, the training process ends and N levels of AI chess transition models are obtained.
[0163] In some optional implementations, the training module 402 further includes:
[0164] a grouping unit, configured to divide the acquired training samples into multiple groups of training samples;
[0165] A second training unit is configured to train the initial AI chess playing model using the first set of training samples to obtain a first-level AI chess playing transition model;
[0166] The second training unit is further configured to continue training the first-level AI chess transition model using a second set of training samples to obtain a second-level AI chess transition model;
[0167] The second statistical unit is configured to continue training based on the second-level AI chess transition model using the remaining groups of training samples until it is determined that all the multiple groups of training samples have been trained, thereby obtaining corresponding AI chess transition models of multiple levels.
[0168] In some optional implementations, the AI chess transition model for each level is configured with multiple sub-level chess playing rules, specifically including:
[0169] Setting the number of recommended move points obtained by screening the AI chess transition model at each level as a first predetermined number;
[0170] Determining the winning rate values corresponding to the first predetermined number of recommended placement points, and sorting the first predetermined number of recommended placement points in descending order of the winning rate values to obtain a sorting result;
[0171] A plurality of sub-level chess playing rules are set according to the sorting result.
[0172] In some optional embodiments, the plurality of sub-level chess playing rules include: low-level chess playing rules, middle-level chess playing rules, and high-level chess playing rules;
[0173] The low-level chess playing rules are as follows: randomly selecting a corresponding recommended placement point from the sorting results as the target placement point;
[0174] The middle-level chess playing rule is: select the first second predetermined number of recommended placement points from the sorting results, and randomly select a corresponding recommended placement point from the first second predetermined number of recommended placement points as the target placement point;
[0175] The high-level chess playing rule is: select the recommended placement point with the highest winning rate value from the sorting results as the target placement point.
[0176] In some optional embodiments, such as Figure 5 As shown, the device also includes:
[0177] The game module 405 is configured to receive a start game instruction triggered by a target user and obtain a level mark of the target user; select a target AI chess model of a corresponding level from multiple levels of AI chess models according to the level mark; use the target AI chess model to play games with the target user according to the corresponding multiple sub-level chess rules; in response to determining that the target user meets the clearance conditions of each sub-level chess rule in the multiple sub-level chess rules, upgrade the level mark of the target user to a next-level level mark, and select the next-level AI chess model to continue playing games with the target user.
[0178] In some optional implementations, the passing condition for each sub-level chess rule is: the proportion of the target user's winning chess games is greater than or equal to a predetermined proportion, or the number of the target user's winning chess games is greater than or equal to a predetermined number.
[0179] For the convenience of description, the above devices are described as being functionally divided into various modules. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0180] The device of the above embodiment is used to implement the hierarchical processing method of the corresponding AI chess playing model in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0181] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the hierarchical processing method of the AI chess model described in any of the above embodiments is implemented.
[0182] Figure 6 6 shows a more specific hardware structure diagram of an electronic device provided in this embodiment. The device may include: a processor 610, a memory 620, an input / output interface 630, a communication interface 640, and a bus 650. The processor 610, the memory 620, the input / output interface 630, and the communication interface 640 are connected to each other within the device via the bus 650.
[0183] The processor 610 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0184] The memory 620 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 620 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 620 and is called and executed by the processor 610.
[0185] The input / output interface 630 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0186] The communication interface 640 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0187] The bus 650 comprises a pathway for transmitting information between the various components of the device, such as the processor 610 , the memory 620 , the input / output interface 630 , and the communication interface 640 .
[0188] It should be noted that although the above device only shows the processor 610, the memory 620, the input / output interface 630, the communication interface 640, and the bus 650, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0189] The electronic device of the above embodiment is used to implement the hierarchical processing method of the corresponding AI chess model in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0190] Exemplary Program Products
[0191] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the hierarchical processing method of the AI chess model as described in any of the above embodiments.
[0192] The above-mentioned non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid-state drives (SSDs)), etc.
[0193] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the hierarchical processing method of the AI chess model described in any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0194] Those skilled in the art will appreciate that embodiments of the present invention may be implemented as a system, method, or computer program product. Therefore, the present disclosure may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention may also be implemented in the form of a computer program product in one or more computer-readable media containing computer-readable program code.
[0195] Any combination of one or more computer-readable media can be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive examples) of computer-readable storage media can include, for example: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0196] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0197] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0198] The computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0199] It should be understood that each block in the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine. These computer program instructions are executed by the computer or other programmable data processing device to produce a device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0200] These computer program instructions can also be stored in a computer-readable medium that enables a computer or other programmable data processing device to operate in a specific manner. In this way, the instructions stored in the computer-readable medium produce a product that includes an instruction device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0201] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions executed on the computer or other programmable apparatus provide a process that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0202] Furthermore, although the operations of the present method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in that particular order, or that all of the operations shown must be performed to achieve the desired results. Rather, the steps depicted in the flowcharts may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into a single step, and / or a single step may be broken down into multiple steps.
[0203] The use of the verbs "comprise", "include" and their conjugations in the application documents does not exclude the presence of elements or steps other than those stated in the application documents. The article "a" or "an" preceding an element does not exclude the presence of a plurality of such elements.
[0204] Although the spirit and principles of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the specific embodiments disclosed, and the division into various aspects does not mean that the features of these aspects cannot be combined to benefit. Such division is merely for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Claims
1. A hierarchical processing method for an AI chess model, comprising: Build an initial model for AI chess; The obtained training samples are used to train the initial AI chess playing model, and during the training process, multiple levels of AI chess playing transition models are obtained according to the training degree; Setting corresponding multiple sub-level chess playing rules for the AI chess playing transition model at each level; Matching the multiple sub-level chess playing rules to the AI chess playing transition model of the corresponding level to obtain AI chess playing models of multiple levels, wherein the AI chess playing model of one level contains multiple sub-level chess playing rules; The method comprises the following steps: using the acquired training samples to train the AI chess initial model, and obtaining multiple levels of AI chess transition models according to the degree of training during the training process, specifically comprising: obtaining a training sample Y1 based on the AI chess initial model by using the model to play chess by itself; using the training sample Y1 to train the AI chess initial model, and determining the ELO rating P1 of the trained AI chess initial model; in response to determining that P1 does not meet the first-level standard, obtaining a new training sample Y1' based on the trained AI chess initial model by using the model to play chess by itself, and continuing to train the trained AI chess initial model with the new training sample Y1'; in response to determining that P1 meets the first-level standard, using the trained AI chess initial model as the first-level AI chess transition model; and based on the first-level AI chess initial model, obtaining a new training sample Y1' based on the trained AI chess initial model by using the model to play chess by itself. The chess-playing transition model obtains a training sample Y2 by means of model self-playing games; the first-level AI chess-playing transition model is trained by means of the training sample Y2, and the ELO rating P2 of the trained first-level AI chess-playing transition model is determined; in response to determining that P2 does not meet the second-level standard, a new training sample Y2' is obtained based on the trained first-level AI chess-playing transition model by means of model self-playing games, and the trained first-level AI chess-playing transition model is continued to be trained by means of the new training sample Y2'; in response to determining that P2 meets the second-level standard, the trained first-level AI chess-playing transition model is used as the second-level AI chess-playing transition model; the number N of AI chess-playing transition models of each level obtained is counted, and in response to determining that the number N is equal to the set number value, the training process ends, and N levels of AI chess-playing transition models are obtained.
2. The method according to claim 1, wherein The AI chess initial model is trained using the acquired training samples, and multiple levels of AI chess transition models are obtained according to the training degree during the training process, specifically including: Dividing the acquired training samples into multiple groups of training samples; The first set of training samples is used to train the initial AI chess playing model to obtain a first-level AI chess playing transition model; Using the second set of training samples, the first-level AI chess transition model is further trained to obtain a second-level AI chess transition model; The remaining groups of training samples are used to continue training based on the second-level AI chess transition model until it is determined that all the multiple groups of training samples have been trained, thereby obtaining multiple levels of AI chess transition models.
3. The method according to claim 1, wherein The AI chess transition model for each level is configured with multiple sub-level chess playing rules, specifically including: Setting the number of recommended move points obtained by screening the AI chess transition model at each level as a first predetermined number; Determining the winning rate values corresponding to the first predetermined number of recommended placement points, and sorting the first predetermined number of recommended placement points in descending order of the winning rate values to obtain a sorting result; A plurality of sub-level chess playing rules are set according to the sorting result.
4. The method according to claim 3, wherein: The multiple sub-level chess playing rules include: low-level chess playing rules, middle-level chess playing rules and high-level chess playing rules; The low-level chess playing rules are as follows: randomly selecting a corresponding recommended placement point from the sorting results as the target placement point; The middle-level chess playing rule is: select the first second predetermined number of recommended placement points from the sorting results, and randomly select a corresponding recommended placement point from the first second predetermined number of recommended placement points as the target placement point; The high-level chess playing rule is: select the recommended placement point with the highest winning rate value from the sorting results as the target placement point.
5. The method according to claim 1, wherein The method further comprises: Receive the start game command triggered by the target user and obtain the target user's level tag; Selecting a target AI chess-playing model of a corresponding level from AI chess-playing models of multiple levels according to the level label; Using the target AI chess model to play chess with the target user according to the corresponding multiple sub-level chess rules; In response to determining that the target user meets the clearance conditions of each sub-level chess playing rule in the multiple sub-level chess playing rules, the level mark of the target user is upgraded to the next level level mark, and the next level AI chess playing model is selected to continue playing against the target user.
6. The method according to claim 5, wherein: The passing condition of each sub-level chess playing rule is: the proportion of the target user's winning chess games is greater than or equal to a predetermined proportion, or the number of the target user's winning chess games is greater than or equal to a predetermined number.
7. A hierarchical processing device for an AI chess model, comprising: A model building module is configured to build an initial model for AI chess; A training module is configured to train the AI chess initial model using the acquired training samples, and obtain multiple levels of AI chess transition models according to the training degree during the training process; A sub-level chess playing rule setting module is configured to set a plurality of corresponding sub-level chess playing rules for each level of the AI chess playing transition model; a model grading determination module configured to match the multiple sub-level chess playing rules to the AI chess playing transition model of the corresponding level to obtain AI chess playing models of multiple levels, wherein the AI chess playing model of one level contains multiple sub-level chess playing rules; The method comprises the following steps: using the acquired training samples to train the AI chess initial model, and obtaining multiple levels of AI chess transition models according to the degree of training during the training process, specifically comprising: obtaining a training sample Y1 based on the AI chess initial model by using the model to play chess by itself; using the training sample Y1 to train the AI chess initial model, and determining the ELO rating P1 of the trained AI chess initial model; in response to determining that P1 does not meet the first-level standard, obtaining a new training sample Y1' based on the trained AI chess initial model by using the model to play chess by itself, and continuing to train the trained AI chess initial model with the new training sample Y1'; in response to determining that P1 meets the first-level standard, using the trained AI chess initial model as the first-level AI chess transition model; and based on the first-level AI chess initial model, obtaining a new training sample Y1' based on the trained AI chess initial model by using the model to play chess by itself. The chess-playing transition model obtains a training sample Y2 by means of model self-playing games; the first-level AI chess-playing transition model is trained by means of the training sample Y2, and the ELO rating P2 of the trained first-level AI chess-playing transition model is determined; in response to determining that P2 does not meet the second-level standard, a new training sample Y2' is obtained based on the trained first-level AI chess-playing transition model by means of model self-playing games, and the trained first-level AI chess-playing transition model is continued to be trained by means of the new training sample Y2'; in response to determining that P2 meets the second-level standard, the trained first-level AI chess-playing transition model is used as the second-level AI chess-playing transition model; the number N of AI chess-playing transition models of each level obtained is counted, and in response to determining that the number N is equal to the set number value, the training process ends, and N levels of AI chess-playing transition models are obtained.
8. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Electronic chess and card decision-making model training method and device and strategy generation method and device
CN109621422A
Automatic course training method for intelligent model playing chess with rules
CN111882072A