Method for selecting a placement point, device for selecting a placement point, display device and storage medium
By introducing prior probabilities and winning evaluation factors into AI chess skills, the obvious optimal move point is determined and selected, which solves the problem of randomness in AI move selection in human-machine games and improves the naturalness and authenticity of the game.
Patent Information
- Application Number
- CN202410272288.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-03-11
AI Technical Summary
When existing AI simulates lower levels of chess skill in human-machine games, its move selection is too random and lacks naturalness, making it difficult to fully compete with human chess players.
By obtaining the candidate position sequence of the current chess game, we use the prior probability and the winning evaluation factor to determine the obvious optimal position, and adjust the condition parameters according to the chess skill level and game stage to select the appropriate position to achieve a more natural and realistic selection of moves. .
It improves the naturalness and authenticity of AI's move selection in human-machine games, allowing AI to get closer to the performance of human chess players.
Smart Images

Figure CN117861190B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method for selecting a placement point, a device for selecting a placement point, a display device, and a storage medium. Background Art
[0002] Chess is a game of thinking. It is a competitive intellectual game that uses a chessboard and chess pieces as tools and is based on chess rules. With the development of computer game technology, Deep Blue, which used the AlphaBeta algorithm, defeated the world chess champion, and used the AlphaGoZero algorithm to defeat the world Go champion.
[0003] Nowadays, various AI-based human-computer chess platforms are emerging one after another, and their training methods are constantly iterating and upgrading, from learning human chess records to exploring according to the rules. As the AI chess strength continues to improve, human chess players almost always fail in full-scale games against AI. Therefore, in human-computer games, several difficulty levels are generally pre-set, and AI simulates different chess strength levels according to different difficulty levels.
[0004] When simulating a lower chess skill level, the AI in the prior art often chooses a point with a lower advantage or randomly chooses a point in a fixed range at each step. As a result, the moves made by the AI in the prior art tend to be more random, which is quite different from the obvious moves generally recognized by humans, and the simulation state is relatively stiff. Summary of the invention
[0005] The main technical problem solved by the present application is to provide a method for selecting a placement point, a device for selecting a placement point, a display device and a storage medium, which can achieve a more natural and realistic simulation of the state of placement.
[0006] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a method for selecting a placement point, including: obtaining a first candidate placement point sequence for the next step of the current chess game, the first candidate placement point sequence including several candidate placement points; using at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among the several candidate placement points, the evaluation factor being used to characterize the suitability of the corresponding candidate placement point as the next placement point; in response to the existence of an obvious optimal placement point, using the obvious optimal placement point as the next placement point of the current chess game.
[0007] Among them, at least one evaluation factor of the candidate placement points is used to determine whether there is an obvious optimal placement point among several candidate placement points, including: based on the first evaluation factor of each candidate placement point, selecting a potential optimal placement point from several candidate placement points; analyzing whether at least one second evaluation factor of the potential optimal placement point meets the corresponding conditional parameters to obtain an analysis result; based on the analysis result, determining whether the potential optimal placement point is an obvious optimal placement point.
[0008] Among them, the first evaluation factor is the prior probability. The potential optimal placement point has the largest prior probability in the first candidate placement point sequence and is the sequence optimal placement point in the second candidate placement point sequence. The first candidate placement point sequence and the second candidate placement point sequence are the next step candidate placement point sets selected for the current chess game using different methods.
[0009] Among them, the second evaluation factor satisfies the corresponding condition parameter when the second evaluation factor is greater than the corresponding condition parameter; and / or, before analyzing whether at least one second evaluation factor of the potential optimal placement point satisfies the corresponding condition parameter and obtaining the analysis result, it also includes at least one of the following steps: based on the current simulated chess strength level, adjusting the condition parameters corresponding to each second evaluation factor, wherein the higher the chess strength level, the smaller the condition parameter; when the second evaluation factor includes a priori probability, based on the stage of the current chess game, adjusting the condition parameters corresponding to the priori probability, wherein the later the stage of the current chess game, the smaller the condition parameters corresponding to the priori probability.
[0010] Among them, at least one second evaluation factor includes a priori probability and at least one winning evaluation factor, and the winning evaluation factor is used to characterize the possibility of winning; based on the analysis result, determining whether the potential optimal placement point is an obvious optimal placement point includes: in response to the prior probability satisfying the corresponding probability condition parameter, or the current chess game is in the target stage and at least one winning evaluation factor satisfies the corresponding winning condition parameter, determining that the potential optimal placement point is an obvious optimal placement point.
[0011] Among them, analyzing whether at least one second evaluation factor of the potential optimal placement point satisfies the corresponding conditional parameters to obtain the analysis result, including: judging whether the prior probability of the potential optimal placement point satisfies the corresponding probability conditional parameters; in response to the prior probability of the potential optimal placement point not satisfying the corresponding probability conditional parameters, analyzing the stage of the current chess game; in response to the current chess game being in the target stage, judging whether at least one winning evaluation factor of the potential optimal placement point satisfies the corresponding winning conditional parameters.
[0012] Among them, analyzing the stage of the current chess game includes: obtaining the degree of possession of all grid points of the current chess game by both sides; based on the degree of possession, determining the stability of each area of the chessboard; based on the stability of each area, determining the stage of the current chess game.
[0013] Among them, the later the stage of the current chess game is, the higher the stability of each area; and / or, based on the degree of occupancy, determining the stability of each area of the chessboard includes: obtaining at least one reference degree threshold, counting the proportion of grid points in each area whose occupancy degree is greater than each degree threshold; determining the stability of each area based on the statistical results.
[0014] The method also includes: in response to the current chess game not being in the target stage, or the potential optimal placement point having a winning evaluation factor that does not satisfy the corresponding winning condition parameter, the next placement point is extracted from the third candidate placement point sequence according to the current simulated chess strength level, the third candidate placement point sequence is the first candidate placement point sequence, or the second candidate placement point sequence, or the union of the first candidate placement point sequence and the second candidate placement point sequence, the first candidate placement point sequence and the second candidate placement point sequence are the next candidate placement point sets selected for the current chess game using different methods.
[0015] Among them, at least one winning evaluation factor includes one or more of the following: a value representing the advantage of the number of points of the potential best placement point compared with the reference placement point, and a value representing the advantage of the winning rate of the potential best placement point compared with the reference placement point.
[0016] Among them, the reference landing point is the second preferred landing point in the second candidate landing point sequence, and the first candidate landing point sequence and the second candidate landing point sequence are sets of candidate landing points for the next step selected for the current chess game using different methods; and / or, the value representing the point advantage of the potential optimal landing point compared to the reference landing point is the difference between the point number of the potential optimal landing point and the point number of the reference landing point; and / or, the value representing the winning rate advantage of the potential optimal landing point compared to the reference landing point is the difference between the winning rate of the potential optimal landing point and the winning rate of the reference landing point.
[0017] Among them, the target stage is the closing stage.
[0018] Among them, before using at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among several candidate placement points, the method also includes: in response to the second candidate placement point sequence satisfying a preset condition, using the candidate placement point with the largest prior probability in the first candidate placement point sequence as the next placement point for the current chess game, the preset condition being that there is only one candidate placement point in the second candidate placement point sequence, or the sequence optimal placement point in the second candidate placement point sequence is a bye, and the first candidate placement point sequence and the second candidate placement point sequence are sets of next candidate placement points selected for the current chess game using different methods; in response to the second candidate placement point sequence not satisfying the preset condition, executing at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among several candidate placement points and subsequent steps.
[0019] Among them, the first candidate point sequence is a candidate point sequence obtained by using a neural network, which is sorted according to prior probability and illegal candidate points are eliminated, and the second candidate point sequence is a candidate point sequence with ranking information obtained by using Monte Carlo tree search.
[0020] In order to solve the above technical problems, another technical solution adopted by the present application is: to provide a device for selecting a chess piece placement point, including: an acquisition module: to obtain a first candidate chess piece placement point sequence for the next step of the current chess game, the first candidate chess piece placement point sequence including several candidate chess piece placement points; a judgment module: to use at least one evaluation factor of the candidate chess piece placement point to determine whether there is an obvious optimal chess piece placement point among several candidate chess piece placement points, the evaluation factor being used to characterize the suitability of the corresponding candidate chess piece placement point as the next chess piece placement point; an execution module: in response to the existence of an obvious optimal chess piece placement point, to use the obvious optimal chess piece placement point as the next chess piece placement point of the current chess game.
[0021] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide a display device, including: a display screen and a processor coupled to the display screen, the processor is used to execute any of the above-mentioned methods for selecting a placement point.
[0022] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a storage medium on which program instructions are stored, and the program instructions are executed to implement any of the above-mentioned time series data storage methods.
[0023] Different from the prior art, the beneficial effect of the present application is: the present application determines whether there is an obvious optimal placement point in the current chess game based on at least one evaluation factor, that is, it judges whether there is an obvious placement point generally recognized by humans in the current situation, and in response to the existence of an obvious optimal placement point, the obvious optimal placement point is used as the next placement point, that is, the obvious placement point generally recognized by humans is selected as the next placement point, so as to achieve a more natural and realistic simulation of the placement state. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flowchart of an implementation method of a drop point selection method of the present application;
[0025] Figure 2 yes Figure 1 A schematic diagram of a flow chart of an implementation method corresponding to step S12;
[0026] Figure 3 yes Figure 2 A schematic diagram of a flow chart of an implementation method corresponding to step S222 in FIG.
[0027] Figure 4 yes Figure 2 A flowchart of another implementation method corresponding to step S222 in FIG.
[0028] Figure 5 This is a structural schematic diagram of an implementation method of a device for selecting a placement point of the present application;
[0029] Figure 6 It is a schematic structural diagram of an embodiment of a display device of the present application;
[0030] Figure 7 It is a structural schematic diagram of an implementation method of a storage medium of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail below with reference to the accompanying drawings and examples.
[0032] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a variety, for example, including at least one of A, B, and C, and can mean including any one or more elements selected from the set consisting of A, B, and C. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features.
[0033] The method for selecting a move point provided later in this application can be applied to various chess games, and the chess games may include at least one of Go, chess, backgammon, and military chess.
[0034] See also Figure 1 , Figure 1 : is a flow chart of an implementation method of a method for selecting a move point in the present application, the method comprising:
[0035] Step S11: Obtain a first candidate placement point sequence for the next step of the current chess game, wherein the first candidate placement point sequence includes a plurality of candidate placement points.
[0036] The current chess game is information recording the current chess game board state, which may be a chess game screen, chess board point information, etc., and the information may be in the form of a data table or a data graph, etc. In some embodiments, the chess board data in the current chess game application may be read to obtain the current chess game. In another embodiment, the chess board data of the players in the current chess game screen may be read to obtain the current chess game, or a data table recording the chess board point information may be loaded to obtain the current chess game.
[0037] The first candidate placement point sequence is a sequence of candidate placement points sorted from best to worst, and the candidate placement points are placement points that exclude illegal candidate points. Specifically, illegal candidate placement points are placement points that do not comply with the current rules of the chess game. It can be understood that the candidate placement points may include a bye in this round, i.e., no placement. If the candidate placement point is a bye in this round, it means that the current player has lost the game or won. The first candidate placement point sequence can be obtained by inputting the current chess surface into one or more of a neural network algorithm, a game algorithm, or a virtual regret minimization algorithm.
[0038] In one embodiment, the first candidate drop point sequence is a candidate drop point sequence obtained by using a neural network, which is sorted according to prior probability and excluding illegal candidate points. Prior probability refers to: the probability of a subsequent event occurring based on past experience. Specifically, the probability of the neural network selecting the drop point as the next drop point based on past chess game experience is recorded as the prior probability of the drop point. The greater the prior probability of a candidate drop point, the higher the ranking of the candidate drop point in the first candidate drop point sequence.
[0039] Specifically, the current chess game is input into a neural network to obtain a number of placement points, illegal candidate points whose prior probability values are not greater than 0 are eliminated from the number of placement points, and then the remaining placement points are sorted from large to small according to the prior probability values to generate a candidate placement point sequence, and the candidate placement point sequence is used as the first candidate placement point sequence. In another embodiment, the first candidate placement point sequence is a placement point sequence sorted by the number of advantage points of the own side after each placement point is used as the next placement point, or a placement point sequence sorted by the winning rate of the own side after each placement point is used as the next placement point.
[0040] Step S12: using at least one evaluation factor of the candidate placement points, determining whether there is an obvious optimal placement point among the candidate placement points, the evaluation factor being used to characterize the suitability of the corresponding candidate placement point as the next placement point.
[0041] In one embodiment, before determining whether there is an obvious optimal placement point, the suitability of the second candidate placement point sequence as the next placement point may be determined first, specifically, determining whether the second candidate placement point sequence meets a preset condition.
[0042] In response to the second candidate placement point sequence satisfying the preset condition, the candidate placement point with the highest a priori probability in the first candidate placement point sequence is used as the next placement point of the current chess game. Alternatively, in response to the second candidate placement point sequence not satisfying the preset condition, the step S12 is executed to determine whether there is an obvious optimal placement point among the candidate placement points using at least one evaluation factor of the candidate placement points and the subsequent steps.
[0043] In some embodiments, the preset condition may be that there is only one candidate placement point in the second candidate placement point sequence, or the best placement point in the second candidate placement point sequence is a bye, that is, if the second candidate placement point sequence satisfies any of the conditions that there is only one candidate placement point in the sequence or the best placement point in the second candidate placement point sequence is a bye, then the candidate placement point with the highest a priori probability in the first candidate placement point sequence is used as the next placement point of the current chess game. It is understandable that if there is only one candidate placement point in the second candidate placement point sequence and the candidate placement point is a bye, then the candidate placement point with the highest a priori probability in the first candidate placement point sequence is used as the next placement point of the current chess game.
[0044] Among them, the first candidate drop point sequence and the second candidate drop point sequence are sets of candidate drop points for the next step selected for the current chess game in different ways. In a specific embodiment: the first candidate drop point sequence can be a candidate drop point sequence obtained by using a neural network and sorted according to a priori probability and eliminating illegal candidate points. The second candidate drop point sequence can be a candidate point sequence with ranking information obtained by using a Monte Carlo tree search. The higher the ranking, the better the candidate point, and the candidate point sequence obtained by the Monte Carlo tree search will not contain illegal candidate points, and can be directly used as the second candidate drop point sequence. Specifically, to obtain the second candidate drop point sequence, the current chess surface information can be input into the trained neural network to obtain all drop points and the priori probability of this round of byes and some other intermediate data results. For example, the current chess surface is a Go chess surface, and the current Go chess surface is input into the trained neural network to obtain 19*19+1 groups of data, which are used as the input of the Monte Carlo tree search. After searching, a candidate point sequence with ranking information is obtained as the second candidate drop point sequence.
[0045] In another specific embodiment: the first candidate placement point sequence can be a sequence of candidate placement points obtained by using a game algorithm and sorted according to point advantage or win rate advantage, and illegal placement points are eliminated, and the greater the point advantage or win rate advantage, the higher the ranking. The second candidate placement point sequence can be a sequence sorted according to the results of simulated games, and the better the game results, the higher the ranking.
[0046] As described above, in response to the second candidate drop point not satisfying the preset condition, step S12 and subsequent steps are continued to be executed, see Figure 2 , Figure 2 for Figure 1 FIG. 1 is a flow chart of an implementation method corresponding to step S12 in FIG. 1 . In this embodiment, the implementation process of step S12 includes the following sub-steps:
[0047] S221: Based on the first evaluation factor of each candidate placement point, a potential optimal placement point is selected from a number of candidate placement points.
[0048] Specifically, if there is a candidate drop point among the candidate drop points that satisfies the first evaluation factor, then the candidate drop point is a potential optimal drop point. In one embodiment, the first evaluation factor is a priori probability, and the potential optimal drop point has the largest priori probability in the first candidate drop point sequence, and is the sequence optimal drop point in the second candidate drop point sequence. It can be understood that when the candidate drop point with the largest priori probability in the first candidate drop point sequence is consistent with the sequence optimal drop point in the second candidate drop point sequence, then the consistent candidate drop point is the potential optimal drop point. It can be that the candidate drop point satisfies the priori probability threshold, and if there is a candidate drop point among the candidate drop points that satisfies the priori probability threshold, then the candidate drop point is the potential optimal drop point. In another embodiment, the first evaluation factor may be that the candidate placement point has the largest prior probability in the first candidate placement point sequence and is the optimal placement point in the second candidate placement point sequence while satisfying the prior probability threshold, wherein the prior probability threshold can be adjusted based on the current simulated chess skill level or the stage of the current chess game, wherein the higher the chess skill level, the smaller the prior probability threshold; the later the stage of the current chess game, the smaller the prior probability threshold.
[0049] As mentioned above, the first candidate placement point sequence and the second candidate placement point sequence are sets of candidate placement points for the next step selected for the current chess game in different ways. In this embodiment, the first candidate placement point sequence may be a candidate placement point sequence obtained by using a neural network and sorted according to prior probability and with illegal candidate points eliminated. The second candidate placement point sequence may be a candidate point sequence with ranking information obtained after inputting the first candidate placement point sequence into a Monte Carlo tree search, and the optimal placement point of the second candidate placement point sequence may be a candidate placement point that is ranked first after the candidate point sequence with ranking information is sorted according to the ranking information.
[0050] The first evaluation factor may be an evaluation factor for determining the optimality of a candidate placement point. For example, the first evaluation factor may be the number of points of advantage after each placement point is used as the placement point for the next step, and the first candidate placement point sequence is a placement point sequence that is sorted from large to small using the number of points of advantage after each placement point is used as the placement point for the next step. Selecting a potential optimal placement point from a number of candidate placement points may be that when the candidate placement point with the largest number of points of advantage after selecting each placement point as the placement point for the next step in the first candidate placement point sequence is consistent with the placement point with the best sequence in the second candidate placement point sequence, the consistent candidate placement point is the potential optimal placement point.
[0051] For another example, the first evaluation factor may be the winning rate of each placement point after it is used as the next placement point, and the first candidate placement point sequence is a placement point sequence sorted from large to small using the winning rate of each placement point after it is used as the next placement point. The potential optimal placement point may be that when the first candidate placement point in the first candidate placement point sequence is consistent with the optimal placement point in the second candidate placement point sequence, the consistent candidate placement point is the potential optimal placement point.
[0052] S222: Analyze whether at least one second evaluation factor of the potential optimal placement point satisfies the corresponding conditional parameter to obtain an analysis result. Specifically, the second evaluation factor satisfies the corresponding conditional parameter when the second evaluation factor is greater than the corresponding conditional parameter. Among them, the conditional parameter can be adjusted based on the current simulated chess strength level, and the higher the chess strength level, the smaller the conditional parameter. In one embodiment, at least one second evaluation factor includes a priori probability and at least one winning evaluation factor, and the winning evaluation factor is used to characterize the possibility of winning.
[0053] Specifically, when the second evaluation factor includes the prior probability, the conditional parameter corresponding to the prior probability is adjusted based on the stage of the current chess game, wherein the later the stage of the current chess game is, the smaller the conditional parameter corresponding to the prior probability is. Figure 3 , Figure 3 for Figure 2 A flowchart of an implementation method corresponding to step S222 in FIG. 1 is shown in FIG. 1 . Step S222 specifically includes the following sub-steps:
[0054] Sub-step S31: Determine whether the prior probability of the potential optimal drop point satisfies the corresponding probability condition parameter. In response to the prior probability satisfying the corresponding probability condition parameter, determine that the potential optimal drop point is the obvious optimal drop point. Specifically, the probability condition parameter can be a threshold of the prior probability, and the threshold of the prior probability can be adjusted based on the current simulated chess strength level. The higher the chess strength level, the smaller the threshold of the prior probability. Under the same chess strength level, the later the stage of the current chess game is, the smaller the threshold of the prior probability.
[0055] Sub-step S32: In response to the prior probability of the potential optimal chess point not satisfying the corresponding probability condition parameter, analyzing the stage of the current chess game. The prior probability not satisfying the corresponding probability condition parameter may specifically be that the prior probability of the potential optimal chess point does not satisfy the corresponding prior probability threshold. In this embodiment, the stage of the current chess game is analyzed. Specifically, the occupation degree of both parties of all grid points in the current chess game can be obtained, and the stability of each area of the chessboard is determined based on the occupation degree, and the stage of the current chess game is determined based on the stability of each area. In one embodiment, the later the stage of the current chess game is, the higher the stability of each area. For example, the stage of the current chess game can be divided into the opening, the middle game and the closing game, and the stability requirements of each stage are successively increased, that is, the stability of the closing game is higher than the stability of the middle game, and the stability of the middle game is higher than the stability of the opening game. In another embodiment, the stability of each area of the chessboard can be determined based on the occupation degree, including: obtaining at least one reference threshold, counting the proportion of grid points in each area whose occupation degree is greater than each degree threshold, and determining the stability of each area based on the statistical results. Specifically, the degree of possession represents the possession of each placement point in the current chess game by multiple players.
[0056] In a specific embodiment, the current chess game may be Go, and the chessboard area may be divided into the center, periphery, and overall. In this embodiment, the current chess game occupancy degree may be the situation where each grid point on the current Go board is occupied by both sides of the game. The occupancy degree of each grid point can be represented by an occupancy rate A, 0≤A≤1, A=0 means that the current grid point does not belong to any party at all, A=1 means that the current chess game completely belongs to one side of the game, and the closer A is to 1, the higher the degree of belonging of the current grid point. For example, the reference threshold for obtaining the middle game stage may be satisfied that the proportion of grid points with a grid point occupancy rate greater than 0.5 in the peripheral area of the chessboard reaches 40%, and the proportion of grid points with a grid point occupancy rate greater than 0.3 in the peripheral area of the chessboard reaches 60%; or the proportion of grid points with a grid point occupancy rate greater than 0.5 in the center area of the chessboard reaches 10%, and the proportion of grid points with a grid point occupancy rate greater than 0.5 in the peripheral area of the chessboard reaches 30%, then the current chess game is judged to be the middle game stage.
[0057] Sub-step S33: In response to the current chess game being in the target stage, it is determined that at least one winning evaluation factor of the potential optimal drop point satisfies the corresponding winning condition parameter. Specifically, at least one winning evaluation factor includes one or more of the following: a characterization value of the number of points advantage of the potential optimal drop point compared to the reference drop point, and a characterization value of the winning rate advantage of the potential optimal drop point compared to the reference drop point. In the case where the current chess game stage is divided into opening, middle and closing, the target stage may be the closing stage. In one embodiment, the reference drop point is the second preferred drop point in the second preferred drop point sequence, and the first candidate drop point sequence and the second candidate drop point sequence are sets of next step candidate drop points selected for the current chess game in different ways. The characterization value of the number of points advantage of the potential optimal drop point compared to the reference drop point is the difference between the number of points of the potential optimal drop point and the number of points of the reference drop point; or, the characterization value of the winning rate advantage of the potential optimal drop point compared to the reference drop point is the difference between the winning rate of the potential optimal drop point and the winning rate of the reference drop point. For example, the number of points of the potential optimal placement point may be the number of points of the player's side on the chessboard after the potential optimal placement point is used as the next placement point or after a number of steps, the number of points of the reference placement point may be the number of points of the player's side on the chessboard after the potential optimal placement point is used as the next placement point or after a number of steps, the winning rate of the potential optimal placement point may be the winning rate value obtained after the potential optimal placement point is input into the Monte Carlo tree search, and the winning rate of the reference placement point may be the winning rate value obtained after the reference placement point is input into the Monte Carlo tree search. For another example, the number of points of the potential optimal placement point may be the value of the player's side's point obtained after the potential optimal placement point is input into the Monte Carlo tree search, the number of points of the reference placement point may be the value of the player's side's point obtained after the reference placement point is input into the Monte Carlo tree search, the winning rate of the potential optimal placement point may be the number of points of the player's side on the chessboard after the potential optimal placement point is used as the next placement point or after a number of steps, and the winning rate of the reference placement point may be the number of points of the player's side on the chessboard after the reference placement point is used as the next placement point or after a number of steps. Specifically, the winning condition parameters include one or more of the following: the difference between the number of points of the potential optimal landing point and the number of points of the reference landing point is greater than a preset number of points threshold; or, the difference between the winning rate of the potential optimal landing point and the winning rate of the reference landing point is greater than a preset winning rate threshold.
[0058] S223: Based on the analysis results, determine whether the potential optimal point of placement is an obvious optimal point of placement. Specifically, if the analysis result is that the current chess game is in the target stage and at least one winning evaluation factor satisfies the corresponding winning condition parameters, the potential optimal point of placement is determined to be an obvious optimal point of placement. In one embodiment, the target stage is the closing stage. If the current chess game is in the closing stage, and the difference between the number of points of the potential optimal point of placement and the number of points of the second preferred point of placement in the second preferred point sequence is greater than the preset number of points threshold, and the difference between the winning rate of the potential optimal point of placement and the winning rate of the second preferred point of placement in the second priority point sequence is greater than the preset winning rate threshold, then the potential optimal point of placement is determined to be an obvious optimal point of placement. If the analysis result is that the current chess game is in the target stage and there is a winning evaluation factor of the potential optimal point of placement that does not meet the corresponding winning condition parameters, then it is determined that the potential optimal point of placement is not an obvious optimal point of placement. In one embodiment, if the potential optimal drop point is not the obvious optimal drop point, the next drop point is extracted from the third candidate drop point sequence according to the current simulated chess strength level. Among them, the third candidate drop point sequence is the first candidate drop point sequence, or the second candidate drop point sequence, or the union of the first candidate drop point sequence and the second candidate drop point sequence. The first candidate drop point sequence and the second candidate drop point sequence are sets of next candidate drop points selected for the current chess game using different methods. The extraction method is, for example, but not limited to, random extraction, fixed range extraction, etc. Different extraction methods can be used according to different chess strength levels, chess game types, or chess game stages. For example, by random extraction, the first N candidate points can be selected from the third candidate drop point sequence, and then one of the N candidate points can be randomly extracted:
[0059] N = max(L×n%, 1).
[0060] Among them, in the above formula, L is the number of drop points in the third candidate drop point sequence, 0<n≤100, the smaller n is, the higher the possibility of drawing a better candidate point, and the higher the simulated chess strength level. It can be understood that the value of n can be set according to the chess strength level simulated in the current chess game, and the higher the chess strength level of the current chess game, the smaller n is set. For another example, by using fixed range extraction, candidate points ranked as N1~N2 can be selected from the third candidate drop point sequence.
[0061] N1 = max(L×(nb)%,1);
[0062] N2= max(L×(nb)%,L).
[0063] Among them, L is the number of placement points in the third candidate placement point sequence, 0<n≤100, the smaller n is, the higher the possibility of drawing a better candidate point, and the higher the simulated chess strength level, 0<b≤100, the smaller b is, the more stable the simulated chess strength.
[0064] See also Figure 4 , Figure 4 yes Figure 2 Schematic diagram of another implementation method corresponding to step S222 in FIG. 1 . In this embodiment, the method includes the following steps:
[0065] Sub-step S41: Determine whether the prior probability of the potential optimal placement point satisfies the corresponding probability condition parameter.
[0066] Sub-step S42: In response to the prior probability of the potential optimal move point not satisfying the corresponding probability condition parameter, analyzing the stage of the current chess game.
[0067] Among them, steps S41 and S42 can refer to the above-mentioned S31 and S32, and will not be described in detail here.
[0068] Sub-step S43: In response to the current chess game not being in the target stage, extract the next step point from the third candidate point sequence according to the current simulated chess strength level. The third candidate point sequence is the first candidate point sequence, or the second candidate point sequence, or the union of the first candidate point sequence and the second candidate point sequence. The first candidate point sequence and the second candidate point sequence are sets of next step candidate points selected for the current chess game in different ways.
[0069] S13: In response to the existence of an obvious optimal placement point, the obvious optimal placement point is used as the next placement point of the current chess game. The obvious optimal placement point can be obtained according to the analysis result in step S12. It can be understood that the obvious optimal placement point can be a potential optimal placement point. Specifically, when the analysis result shows that the current chess game is in the target stage and at least one winning evaluation factor satisfies the corresponding winning condition parameter, the potential optimal placement point is the obvious optimal placement point, or there is a candidate placement point among the candidate placement points that satisfies the first evaluation factor, then the candidate placement point is the potential optimal placement point. In one embodiment, if the first candidate placement point sequence of the current chess game is consistent with the first-ranked placement point of the second candidate placement point sequence, and the prior probability of the first-ranked placement point satisfies the prior probability threshold, then the first-ranked placement point is the obvious optimal placement point. If the current chess game is in the closing stage, and the difference between the number of points of the potential best move point and the second preferred move point in the second preferred move point sequence is greater than the preset number of points threshold, and the difference between the winning rate of the potential best move point and the winning rate of the second preferred move point in the second priority move point sequence is greater than the preset winning rate threshold, then the potential best move point is determined to be the obvious best move point. And the above obvious best move point is used as the next move point of the current chess game, so as to achieve a more natural and realistic simulation of the move state.
[0070] See also Figure 5 , Figure 5This is a structural diagram of an embodiment of a device for selecting a chess piece at a certain point in the present application. The device for selecting a chess piece at a certain point 50 includes an acquisition module 51 , a judgment module 52 and an execution module 53 .
[0071] Specifically, the acquisition module 51 is used to obtain the first candidate placement point sequence for the next step of the current chess game, and the first candidate placement point sequence includes several candidate placement points. The judgment module 52 is used to use at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among the several candidate placement points, and the evaluation factor is used to characterize the suitability of the corresponding candidate placement point as the next placement point. The execution module 53 is used to respond to the existence of an obvious optimal placement point and use the obvious optimal placement point as the next placement point of the current chess game.
[0072] In one embodiment, the judgment module 52 is specifically used to determine whether there is an obvious optimal point among several candidate points using at least one evaluation factor of the candidate points, including: selecting a potential optimal point from several candidate points based on the first evaluation factor of each candidate point; analyzing whether at least one second evaluation factor of the potential optimal point satisfies the corresponding condition parameter to obtain an analysis result; and determining whether the potential optimal point is an obvious optimal point based on the analysis result. Among them, the first evaluation factor is a priori probability, the potential optimal point has the largest priori probability in the first candidate point sequence, and is the sequence optimal point in the second candidate point sequence, and the first candidate point sequence and the second candidate point sequence are sets of candidate points for the next step selected for the current chess game using different methods.
[0073] In one embodiment, the condition parameter corresponding to the second evaluation factor is that the second evaluation factor is greater than the corresponding condition parameter; before analyzing whether at least one second evaluation factor of the potential optimal chess point satisfies the corresponding condition parameter and obtaining the analysis result, at least one of the following steps is also included: based on the current simulated chess strength level, the condition parameters corresponding to each second evaluation factor are adjusted. The higher the chess strength level, the smaller the condition parameter: when the second evaluation factor includes a priori probability, the condition parameter corresponding to the priori probability is adjusted based on the stage of the current chess game. The later the stage of the current chess game, the smaller the condition parameter corresponding to the priori probability.
[0074] Specifically, at least one second evaluation factor includes a priori probability and at least one winning evaluation factor, and the winning evaluation factor is used to characterize the possibility of winning; based on the analysis result, determining whether the potential optimal placement point is an obvious optimal placement point includes: in response to the prior probability satisfying the corresponding probability condition parameter, or the current chess game is in the target stage and at least one winning evaluation factor satisfies the corresponding winning condition parameter, determining that the potential optimal placement point is an obvious optimal placement point.
[0075] In one embodiment, the judgment module 52 is used to analyze whether at least one second evaluation factor of the potential optimal placement point satisfies the corresponding conditional parameters to obtain analysis results, including: judging whether the prior probability of the potential optimal placement point satisfies the corresponding probability conditional parameters; in response to the prior probability of the potential optimal placement point not satisfying the corresponding probability conditional parameters, analyzing the stage of the current chess game; in response to the current chess game being in the target stage, judging whether at least one winning evaluation factor of the potential optimal placement point satisfies the corresponding winning conditional parameters.
[0076] In one embodiment, the judgment module 52 is also used to analyze the stage of the current chess game, including: obtaining the occupation degree of both parties of all grid points of the current chess game; determining the stability of each area of the chessboard based on the occupation degree; and determining the stage of the current chess game based on the stability of each area. The later the stage of the current chess game is, the higher the stability of each area; and / or, determining the stability of each area of the chessboard based on the occupation degree includes: obtaining at least one reference degree threshold, counting the proportion of grid points in each area whose occupation degree is greater than each degree threshold; and determining the stability of each area based on the statistical results.
[0077] The judgment module 52 is also used for extracting the next step of the chess game from the third candidate chess game sequence according to the current simulated chess strength level in response to the current chess game not being in the target stage, or the potential optimal chess game having a winning evaluation factor that does not meet the corresponding winning condition parameter, the third candidate chess game sequence is the first candidate chess game sequence, or the second candidate chess game sequence, or the union of the first candidate chess game sequence and the second candidate chess game sequence, and the first candidate chess game sequence and the second candidate chess game sequence are the next step of the chess game candidate sets selected for the current chess game in different ways. Among them, at least one winning evaluation factor includes one or more of the following: a representation value of the number of points advantage of the potential optimal chess game compared to the reference chess game, and a representation value of the winning rate advantage of the potential optimal chess game compared to the reference chess game.
[0078] In some embodiments, the reference placement point is the second preferred placement point in the second candidate placement point sequence, and the first candidate placement point sequence and the second candidate placement point sequence are sets of candidate placement points for the next step selected for the current chess game in different ways; and / or, the value representing the point advantage of the potential optimal placement point over the reference placement point is the difference between the point advantage of the potential optimal placement point and the point advantage of the reference placement point; and / or, the value representing the winning rate advantage of the potential optimal placement point over the reference placement point is the difference between the winning rate of the potential optimal placement point and the winning rate of the reference placement point. Wherein, the target stage is the closing stage. Among them, before using at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among several candidate placement points, the method also includes: in response to the second candidate placement point sequence satisfying a preset condition, using the candidate placement point with the largest prior probability in the first candidate placement point sequence as the next placement point for the current chess game, the preset condition being that there is only one candidate placement point in the second candidate placement point sequence, or the sequence optimal placement point in the second candidate placement point sequence is a bye, and the first candidate placement point sequence and the second candidate placement point sequence are sets of next candidate placement points selected for the current chess game using different methods; in response to the second candidate placement point sequence not satisfying the preset condition, executing at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among several candidate placement points and subsequent steps.
[0079] In a specific embodiment, the first candidate placement point sequence is a candidate point sequence obtained by using a neural network, which is sorted according to prior probability and illegal candidate points are eliminated, and the second candidate placement point sequence is a candidate point sequence with ranking information obtained by using a Monte Carlo tree search.
[0080] See also Figure 6 , Figure 6 It is a structural diagram of an embodiment of the display device of the present application. The display device 60 can be a computer, a chess robot, a mobile phone, etc. It includes a display screen 61 and a processor 62 coupled to the display screen. The processor 62 is used to execute the method for selecting a placement point mentioned in any of the above embodiments.
[0081] In the above scheme, the present application determines whether there is an obvious optimal placement point in the current chess game based on at least one evaluation factor, that is, it judges whether there is an obvious placement point generally recognized by humans in the current situation, and in response to the existence of an obvious optimal placement point, the obvious optimal placement point is used as the next placement point, that is, the obvious placement point generally recognized by humans is selected as the next placement point, so as to achieve a more natural and realistic simulation of the placement state.
[0082] See also Figure 7 , Figure 7Schematic diagram of the structure of an embodiment of the storage medium of the present application. In this embodiment, the storage medium 70 stores a computer program 71, and the computer program 71 is processed to execute the method for selecting a move point mentioned in any of the above embodiments.
[0083] The storage medium may specifically be a medium that can store program data, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or may be a server that stores the program data. The server may send the stored program data to other devices for execution, or may execute the stored program data itself.
[0084] In the above scheme, the present application determines whether there is an obvious optimal placement point in the current chess game based on at least one evaluation factor, that is, it judges whether there is an obvious placement point generally recognized by humans in the current situation, and in response to the existence of an obvious optimal placement point, the obvious optimal placement point is used as the next placement point, that is, the obvious placement point generally recognized by humans is selected as the next placement point, so as to achieve a more natural and realistic simulation of the placement state.
[0085] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for selecting a drop point, characterized in that: The method comprises: Obtaining a first candidate placement point sequence for the next step of the current chess game, wherein the first candidate placement point sequence includes a plurality of candidate placement points; Using at least one evaluation factor of the candidate placement points, determine whether there is an obvious optimal placement point among the several candidate placement points, the evaluation factor is used to characterize the suitability of the corresponding candidate placement point as the next placement point; wherein the evaluation factor includes a first evaluation factor, the first evaluation factor is used to select a potential optimal placement point from several candidate placement points; the first evaluation factor is a priori probability, or the candidate placement point has the largest priori probability in the first candidate placement point sequence and is the sequence optimal placement point in the second candidate placement point sequence and satisfies the priori probability threshold, or the winning rate of the side after each of the candidate placement points is used as the next placement point, or the number of points of advantage of the side after each of the candidate placement points is used as the next placement point; in response to the existence of the obvious optimal placement point, use the obvious optimal placement point as the next placement point of the current chess game; The first candidate placement point sequence and the second candidate placement point sequence are sets of next step candidate placement points selected for the current chess game in different ways.
2. The method according to claim 1, characterized in that The step of using at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among the candidate placement points includes: Selecting the potential optimal placement point from the plurality of candidate placement points based on the first evaluation factor of each candidate placement point; Analyze whether at least one second evaluation factor of the potential optimal move point satisfies a corresponding condition parameter to obtain an analysis result; Based on the analysis result, determine whether the potential optimal placement point is the obvious optimal placement point.
3. The method according to claim 2, characterized in that The first evaluation factor is the prior probability, and the potential optimal placement point has the largest prior probability in the first candidate placement point sequence, and is the sequence optimal placement point in the second candidate placement point sequence.
4. The method according to claim 2, characterized in that: The second evaluation factor satisfies the corresponding condition parameter when the second evaluation factor is greater than the corresponding condition parameter; And / or, before analyzing whether at least one second evaluation factor of the potential optimal move point satisfies a corresponding condition parameter and obtaining an analysis result, at least one of the following steps is further included: Based on the current simulated chess skill level, adjusting the condition parameters corresponding to each of the second evaluation factors, wherein the higher the chess skill level, the smaller the condition parameters; In the case where the second evaluation factor includes a priori probability, the conditional parameter corresponding to the priori probability is adjusted based on the stage of the current chess game, wherein the later the stage of the current chess game is, the smaller the conditional parameter corresponding to the priori probability is.
5. The method according to claim 2, characterized in that: The at least one second evaluation factor includes a priori probability and at least one winning evaluation factor, and the winning evaluation factor is used to characterize the possibility of winning; The determining, based on the analysis result, whether the potential optimal placement point is the obvious optimal placement point comprises: In response to the prior probability satisfying the corresponding probability condition parameter, or the current chess game is in the target stage and the at least one winning evaluation factor satisfies the corresponding winning condition parameter, the potential optimal placement point is determined to be the obvious optimal placement point.
6. The method according to claim 5, characterized in that The analyzing whether at least one second evaluation factor of the potential optimal move point satisfies a corresponding condition parameter to obtain an analysis result includes: Determine whether the prior probability of the potential optimal move point satisfies the corresponding probability condition parameter; In response to the prior probability of the potential optimal move point not satisfying the corresponding probability condition parameter, analyzing the stage of the current chess game; In response to the current chess game being in the target stage, it is determined whether the at least one winning evaluation factor of the potential optimal chess move point satisfies a corresponding winning condition parameter.
7. The method according to claim 6, characterized in that The analyzing the stage of the current chess game includes: Obtaining the possession degree of both parties of all grid points in the current chess game; Based on the degree of occupation, determining the stability of each area of the chessboard; Based on the stability of each of the areas, the stage of the current chess game is determined.
8. The method according to claim 7, characterized in that The later the stage of the current chess game is, the higher the stability of each area is; And / or, determining the stability of each area of the chessboard based on the occupation degree includes: Obtain at least one reference degree threshold, and count the proportion of grid points in each of the regions whose occupancy degree is greater than each degree threshold; Based on the statistical results, the stability of each of the areas is determined.
9. The method according to claim 6, characterized in that The method further comprises: In response to the current chess game not being in the target stage, or the potential optimal chess placement point having the winning evaluation factor that does not satisfy the corresponding winning condition parameter, the next chess placement point is extracted from a third candidate chess placement point sequence according to the currently simulated chess strength level, the third candidate chess placement point sequence is the first candidate chess placement point sequence, or the second candidate chess placement point sequence, or the union of the first candidate chess placement point sequence and the second candidate chess placement point sequence, the first candidate chess placement point sequence and the second candidate chess placement point sequence are sets of next candidate chess placement points selected for the current chess game using different methods.
10. The method according to claim 5, characterized in that The at least one winning evaluation factor includes one or more of the following: a value representing the advantage in points of the potential optimal placement point compared to the reference placement point, and a value representing the advantage in winning rate of the potential optimal placement point compared to the reference placement point.
11. The method according to claim 10, characterized in that The reference chess point is a second preferred chess point in a second candidate chess point sequence, wherein the first candidate chess point sequence and the second candidate chess point sequence are sets of candidate chess points for the next step selected for the current chess game in different ways; And / or, the representation value of the advantage of the potential optimal placement point in terms of the number of points over the reference placement point is the difference between the number of points of the potential optimal placement point and the number of points of the reference placement point; And / or, the winning rate advantage representation value of the potential optimal placement point compared to the reference placement point is the difference between the winning rate of the potential optimal placement point and the winning rate of the reference placement point.
12. The method according to claim 5, characterized in that The target stage is the closing stage.
13. The method according to claim 1, characterized in that Before determining whether there is an obvious optimal placement point among the candidate placement points by using at least one evaluation factor of the candidate placement points, the method further includes: In response to the second candidate placement point sequence satisfying a preset condition, the candidate placement point with the largest prior probability in the first candidate placement point sequence is used as the next placement point of the current chess game, wherein the preset condition is that there is only one candidate placement point in the second candidate placement point sequence, or the best placement point in the second candidate placement point sequence is a bye, and the first candidate placement point sequence and the second candidate placement point sequence are sets of next candidate placement points selected for the current chess game by using different methods; In response to the second candidate placement point sequence not satisfying the preset condition, performing the steps of using at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among the candidate placement points and subsequent steps.
14. The method according to claim 3 or 9 or 11 or 13, characterized in that: The first candidate point sequence is a candidate point sequence obtained by using a neural network, sorted according to prior probability and with illegal candidate points eliminated, and the second candidate point sequence is a candidate point sequence with sequence information obtained by using a Monte Carlo tree search.
15. A device for selecting a drop point, characterized in that: include: An acquisition module is used to acquire a first candidate placement point sequence for the next step of the current chess game, wherein the first candidate placement point sequence includes a plurality of candidate placement points; Judgment module: using at least one evaluation factor of the candidate placement points to determine whether there is an obvious optimal placement point among the candidate placement points, the evaluation factor is used to characterize the suitability of the corresponding candidate placement point as the next placement point; wherein the evaluation factor includes a first evaluation factor, the first evaluation factor is used to select a potential optimal placement point from the candidate placement points; the first evaluation factor is a priori probability, or the candidate placement point has the largest priori probability in the first candidate placement point sequence and is the sequence optimal placement point in the second candidate placement point sequence while satisfying a priori probability threshold, or the winning rate of the side after each of the candidate placement points is used as the next placement point, or the number of points advantage of the side after each of the candidate placement points is used as the next placement point; The first candidate placement point sequence and the second candidate placement point sequence are sets of next step candidate placement points selected for the current chess game in different ways.
16. A display device, characterized in that: include: A display screen and a processor coupled to the display screen, wherein the processor is configured to execute the method according to any one of claims 1 to 14.
17. A storage medium, characterized in that: The storage medium stores program instructions, and the program instructions are executed to implement the method according to any one of claims 1 to 14.
