JS divergence-based strategy opponent strain capacity assessment method and device
By using a JS divergence-based method, the difference in action probability distribution of a strategy under the opponent's actions is calculated layer by layer. This solves the problems of subjectivity and single-dimensionality in existing strategy diversity assessment methods, and achieves an objective and accurate quantitative assessment of strategy diversity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF AUTOMATION CHINESE ACAD OF SCI
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-17
AI Technical Summary
Existing methods for assessing strategy diversity are polarized: qualitative methods are heavily influenced by subjective factors, while quantitative methods fail to reveal the internal operating mechanisms of strategies, making it difficult to achieve objective and accurate quantification of diversity.
The method based on JS divergence is adopted. By acquiring the opponent's decision nodes and constructing a set of legal actions, the difference in the action probability distribution of the strategy to be evaluated on the opponent's actions is calculated layer by layer. The total difference is accumulated to obtain the total difference measure, and finally the average value is calculated as a quantitative indicator of the strategy's adaptability.
It enables objective quantitative evaluation of strategy diversity, can be automatically applied in different game environments, and provides quantitative indicators of strategy adaptability and flexibility.
Smart Images

Figure CN121880141A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and apparatus for evaluating the adaptability of a strategy opponent based on JS divergence. Background Technology
[0002] The value of a strategy lies not only in its optimality under ideal conditions, but also in its ability to adapt to changing circumstances when faced with unknown opponents and dynamic environments—that is, strategy diversity. This ability ensures that agents maintain a high level of adaptability and robustness in complex and ever-changing real-world games that deviate from ideal assumptions.
[0003] Existing methods for assessing strategy diversity exhibit a clear polarization: qualitative methods based on expert knowledge can deeply analyze the decision-making logic of each step of a strategy, but the assessment results are significantly affected by subjective factors; while quantitative methods based on diverse opponents can provide objective quantitative rankings, they only remain at the level of game results and cannot reveal the internal operating mechanisms of the strategy. Summary of the Invention
[0004] This invention provides a method and apparatus for evaluating the adaptability of strategic opponents based on JS divergence, which addresses the shortcomings of existing methods for evaluating strategic diversity that only focus on the game outcome. This invention can achieve accurate measurement of strategic diversity while maintaining objectivity.
[0005] This invention provides a method for evaluating the opponent's adaptability based on JS divergence, comprising the following steps: Obtaining the opponent's decision node, the strategy to be evaluated, and the game environment, wherein the opponent's decision node is the starting node for the opponent's decision-making in the game environment; determining all legal actions corresponding to the opponent's decision node and constructing a set of legal actions; generating a corresponding friendly decision node for each pair of opponent actions in the set of legal actions, wherein the two opponent actions in each pair of opponent actions are different; starting from the friendly decision node, traversing downwards through the decision sequence of the strategy to be evaluated to a preset depth, determining the JS divergence of the action probability distribution of the strategy to be evaluated on each pair of opponent actions layer by layer; accumulating the JS divergence of the action probability distribution at each layer to obtain the total difference measure of each pair of opponent actions; determining the average of the total difference measures of all different pairs of opponent actions as a quantitative indicator of the opponent's adaptability of the strategy to be evaluated.
[0006] According to the present invention, a method for evaluating the adaptability of a strategy opponent based on JS divergence is provided, wherein determining the JS divergence of the action probability distribution of the strategy to be evaluated on each pair of opponent actions layer by layer includes: Determine the JS divergence of the action probability distribution of the strategy to be evaluated in the first layer for each pair of opponent actions; in, This represents the difference measure of the first layer. Represents the JS divergence operator. and These represent the self-decision nodes at the first layer of the strategy to be evaluated. With one's own decision-making nodes The probability distribution of actions, This refers to the opposing decision-making node. and Indicates the opponent's action; When traversing down to the nth layer, determine the JS divergence of the action probability distribution of the strategy to be evaluated in the nth layer on each pair of opponent actions: in, This represents the difference metric for the nth layer. and Represents the self-decision node at level n. With one's own decision-making nodes Expectations and This indicates the own decision node at layer n of the strategy to be evaluated. With one's own decision-making nodes The probability distribution of actions, Indicates except Place In addition, our own decision-making nodes They have the same historical action sequence.
[0007] According to the present invention, a method for evaluating the adaptability of a strategy adversary based on JS divergence is provided, the method further includes: Starting from the origin of the decision node, multiple decision paths are generated through random sampling. Each decision path includes a complete decision sequence from the origin to the preset depth. Based on the probability distribution of actions of the strategy to be evaluated at each of the self-decision nodes in each decision path, the generation probability of each decision path is determined. Determine the JS divergence value of the action probability distribution of the decision node for each decision path, and perform a weighted average based on the generation probability of each decision path to obtain the expected value of the decision node.
[0008] According to the present invention, a method for evaluating the adaptability of a strategy opponent based on JS divergence is provided, wherein the JS divergence of the action probability distribution at each layer is accumulated to obtain the total difference measure of each pair of opponent actions, including: For each pair of opponent actions, store the JS divergence of the action probability distribution at each layer in the order of decision-making; The summation of the JS divergence of the action probability distributions for each layer in the stored data yields the total difference metric for each pair of opponent actions: in, Indicates the opponent's action and Total difference measure Indicates the first Layer difference metric The preset depth.
[0009] According to the present invention, a method for evaluating the opponent's adaptability based on JS divergence is provided, wherein determining the average of the total difference measure of all different opponent action pairs as a quantitative indicator of the opponent's adaptability of the strategy to be evaluated includes: Based on the number of legal actions in the set of legal actions, the total difference measure of all different opponent action pairs is averaged to obtain a quantitative index of the opponent's adaptability of the strategy to be evaluated: in, This represents a quantitative indicator of the opponent's responsiveness to the strategy being evaluated. Indicates the number of legal actions. Indicates the opponent's action and Total difference measure.
[0010] According to the present invention, a method for evaluating the adaptability of a strategy opponent based on JS divergence is provided, the method further includes: dynamically adjusting a preset depth based on the state space complexity of the game environment. This invention also provides a device for evaluating the opponent's adaptability based on JS divergence, comprising the following modules: an acquisition module for acquiring the opponent's decision node, the strategy to be evaluated, and the game environment, wherein the opponent's decision node is the starting node for the opponent to execute decisions in the game environment; a determination module for determining all legal actions corresponding to the opponent's decision node and constructing a set of legal actions; a generation module for generating a corresponding friendly decision node for each pair of opponent actions in the set of legal actions, wherein the two opponent actions in each pair of opponent actions are different; a JS divergence module for traversing the decision sequence of the strategy to be evaluated down to a preset depth, starting from the friendly decision node, and determining the JS divergence of the action probability distribution of the strategy to be evaluated on each pair of opponent actions layer by layer; an accumulation module for accumulating the JS divergence of the action probability distribution at each layer to obtain the total difference measure of each pair of opponent actions; and an output module for determining the average value of the total difference measure of all different pairs of opponent actions as a quantitative indicator of the opponent's adaptability of the strategy to be evaluated.
[0011] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a strategy opponent adaptability assessment method based on JS divergence as described above.
[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a strategy opponent adaptability assessment method based on JS divergence as described above.
[0013] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a strategy opponent adaptability assessment method based on JS divergence as described above.
[0014] The present invention provides a method and apparatus for evaluating the opponent's adaptability based on JS divergence. By acquiring the opponent's decision nodes, the strategy to be evaluated, and the game environment, it first determines the set of legal actions corresponding to the opponent's decision nodes, providing a clear action space for adaptability analysis. Then, for each pair of different opponent actions, it generates corresponding friendly decision nodes, thus introducing changes in opponent actions into the evaluation framework. Based on this, starting from the friendly decision nodes, it traverses downwards to a preset depth, calculating the JS divergence of the action probability distribution of the strategy for each pair of opponent actions layer by layer, which can characterize the differences in the strategy's response under different opponent actions. Then, by accumulating the JS divergence at each layer, it obtains the total difference measure for each pair of actions, comprehensively reflecting the overall adaptability difference of the strategy in multi-step decision-making. Finally, by calculating the average of the total difference measures for all different opponent action pairs, it obtains a quantitative index of the opponent's adaptability of the strategy to be evaluated, achieving an objective and quantitative evaluation of the strategy's adaptability and flexibility in the face of different opponent decisions. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in this invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced one by one below. Obviously, the accompanying drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the strategy opponent adaptability assessment method based on JS divergence provided by the present invention.
[0017] Figure 2 This is a schematic diagram of the game tree provided by the present invention.
[0018] Figure 3 This is a schematic diagram of the calculation process provided by the present invention.
[0019] Figure 4 This is a schematic diagram of the module of the strategy opponent adaptability assessment device based on JS divergence provided by the present invention.
[0020] Figure 5 This is a schematic diagram of the physical structure of the electronic device provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0022] This invention relates to the field of multi-agent game evaluation, aiming to address the problems of poor interpretability, poor quantification, and poor scalability in existing game strategy diversity evaluation techniques. This invention proposes a method for evaluating the adaptability of a strategy opponent based on Jensen-Shannon Divergence (JS divergence). By measuring the difference in the probability distribution of the player's strategy's action sequences under different opponent actions, it quantitatively evaluates the player's adaptability, thereby characterizing its strategy diversity. This invention provides a uniformly calibrated quantitative index that is easily extended to different game environments and supports automated, large-scale applications. It can provide a solution with both theoretical depth and practical value for the research, evaluation, and optimization of various intelligent decision-making systems.
[0023] In the field of multi-agent game theory, traditional theoretical paradigms and solution methods have long focused on finding convergence to classical equilibrium points such as Nash equilibrium, considering these as the optimal solution to the game. This equilibrium-based theoretical framework is built on the ideal assumption of perfect rationality. However, with the evolution of algorithmic technology, researchers have realized that real-world game environments are often highly complex, dynamic, and informationally incomplete, making it difficult to achieve the idealized optimal equilibrium in reality, and it may even tend to become rigid and lose its practical utility.
[0024] Against this backdrop, a research paradigm shift occurred: researchers realized that the value of a strategy lies not only in its optimality under ideal conditions, but also in its adaptability to unknown opponents and dynamic environments—that is, strategy diversity. This capability ensures that agents remain adaptive and robust in real-world games where ideal assumptions are not met. Based on this understanding, the research frontier in this field began to shift from searching for a single optimal strategy to encouraging strategy diversity. This gave rise to two key technological development directions: encouraging strategy diversity and establishing methods for evaluating strategy diversity, forming a technological closed loop from generation to evaluation.
[0025] Existing methods for assessing strategy diversity mainly fall into two categories. The first is qualitative assessment based on expert knowledge. This method relies on the experience and intuition of domain experts to analyze and interpret the decision-making logic of strategies. Its advantage lies in providing context-rich, in-depth insights and capturing the "style characteristics" of strategies. However, it suffers from significant limitations, including subjective evaluation criteria, difficulty in quantification, high human resource costs, and susceptibility to cognitive biases. The second is quantitative assessment based on average scores against diverse opponents. This method constructs a strategy set containing opponents of different styles and uses the average win rate or score of the strategy to be evaluated on this set as a metric. Its advantage lies in its standardized and automated process, enabling efficient handling of large-scale comparisons. However, its fundamental limitation is that it relies entirely on a single dimension of game outcome, failing to analyze behavioral patterns in the decision-making process and reveal the internal mechanisms by which strategies respond to different opponents. This results in insufficient interpretability of the assessment and an inability to effectively represent "diversity" itself.
[0026] In summary, existing methods for assessing strategy diversity exhibit a clear polarization: qualitative methods based on expert knowledge, while capable of deeply analyzing the decision-making logic of each step of a strategy, are significantly influenced by subjective factors; while quantitative methods based on diverse opponents, although providing objective quantitative rankings, remain only at the level of game outcomes and fail to reveal the internal operational mechanisms of the strategy. Therefore, this field urgently needs an assessment method that can balance the analysis of internal strategy behavior with objective quantitative output.
[0027] To address this key issue, this invention proposes a method for evaluating the adaptability of strategic opponents based on Jensen-Shannon Divergence (JS). By measuring the differences in the probability distribution of action choices when facing different types of opponents, the method transforms the opponent's adaptability into a specific numerical indicator. This method not only objectively quantifies the diversity of strategies but also can be easily extended to different game environments, enabling automated and large-scale applications.
[0028] Figure 1 This is a flowchart illustrating the strategy opponent adaptability assessment method based on JS divergence provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps.
[0029] Step 101: Obtain the opponent's decision node, the strategy to be evaluated, and the game environment. The opponent's decision node is the starting node for the opponent to execute decisions in the game environment.
[0030] In this embodiment of the invention, the opponent decision node refers to the starting node where the opponent makes a decision in the game environment. It represents a key state point in the game tree and usually corresponds to the opponent's decision position at a specific moment.
[0031] refer to Figure 2 , Figure 2This is a schematic diagram of a game tree provided by the present invention, which includes: the opponent's node and the player's node.
[0032] The game environment defines the rules and state space of the entire interaction scenario, including the possible set of actions, state transition rules, and reward mechanisms.
[0033] The policy to be evaluated is the decision function of the agent, which outputs the probability distribution of actions based on the current state, reflecting the agent's behavioral pattern.
[0034] Step 102: Determine all legal actions corresponding to the opponent's decision node and construct a set of legal actions.
[0035] In this embodiment of the invention, the aim is to determine all legal actions of the opponent at the opponent's decision node and construct a complete set of legal actions. A legal action refers to an effective behavior that the opponent can perform at that node according to the game rules. For example, in a board game, legal actions might include moving a piece or forfeiting. When constructing the set, it is necessary to traverse the rule base or environment model, enumerating all possible actions to ensure no omissions.
[0036] Each legal action in the set of legal actions represents a possible decision by the opponent, thus providing a basis for assessing the responsiveness of one's own strategy and avoiding assessment bias due to missing actions.
[0037] Step 103: For each pair of opponent actions in the set of legal actions, generate a corresponding friendly decision node, wherein the two opponent actions in each pair of opponent actions are different.
[0038] In this embodiment of the invention, all possible action pairs are systematically selected from the set of legal actions obtained in the previous step. Each action pair contains two different opponent actions, such as action A and action B. These actions originate from the same opponent decision node, but represent different decision directions that the opponent may take at that node.
[0039] The process of generating one's own decision node is essentially a simulation of the natural evolution of the game state. When the opponent chooses a specific action at the initial decision node, the state of the game environment will change accordingly, reaching a new decision node, which is the starting point for one's own decision-making. For each pair of different opponent actions, it is necessary to calculate and record the corresponding state transition results, thereby identifying the two different decision points where one's own strategy begins to take effect.
[0040] When generating corresponding nodes, all environmental conditions and historical information must remain completely consistent, except for the opponent's action choices at the initial node. This design of controlled variables ensures the fairness of subsequent analysis, so that any observed differences in one's own strategic behavior can be clearly attributed to the differences in the opponent's initial actions, rather than other confounding factors.
[0041] Step 104: Starting from the decision node of the player, traverse the decision sequence of the strategy to be evaluated down to the preset depth, and determine the action probability distribution JS divergence of the strategy to be evaluated on each pair of opponent actions layer by layer.
[0042] The traversal begins at the player's own decision nodes generated in the preceding steps. These nodes correspond to the states where the player's strategy begins to make decisions after the opponent chooses different legal actions at the initial decision node. Starting from these nodes, the evaluation process unfolds downwards along the game tree, simulating the player's strategy's behavior at multiple consecutive decision moments in the future.
[0043] The depth of the traversal is determined by a preset depth value d, which defines the time span or step range of the analyzed decision sequence. For example, when the preset depth d=3, it means that the analysis will start from the current friendly decision node and analyze the behavioral patterns of the strategy in the next three consecutive decision steps. This hierarchical traversal approach allows the evaluation to not only focus on immediate reactions but also capture the strategy's ability to adjust and adapt in the medium to long term. In each level of analysis, the core calculation is the JS divergence of the action probability distribution.
[0044] Jensen-Shannon divergence (JS divergence) is an information-theory-based statistical measure that effectively measures the similarity or difference between two probability distributions. In this embodiment of the invention, it is used to quantify the degree of difference in the action selection probability distribution of the policy under the condition of "the same decision level, the same historical background, but only different initial actions of the opponent". Specifically, for each pair of different opponent actions (e.g., action A and action B), at each level of the decision tree, it is necessary to calculate the action probability distribution of the policy in the corresponding states induced by these two opponent actions, and then solve for the JS divergence between these two distributions.
[0045] Aside from the opponent's actions at the initial node, the two decision paths being compared should have completely identical sequences of their own historical actions. This means that when traversing to a specific level, the two compared decision nodes will have completely identical choices made by the player in their path history, with the only difference stemming from the initial opponent actions. This design of controlled variables ensures that the calculated JS divergence purely reflects the policy's sensitivity and adaptability to different initial opponent actions, rather than being influenced by other factors.
[0046] By traversing downwards layer by layer and calculating JS divergence layer by layer, this step constructs a multi-layered difference analysis framework. The shallower JS divergence values reflect more the immediate response of the strategy and the flexibility at the tactical level; while the deeper JS divergence values gradually reveal the depth of strategic adjustments and the consistency changes in long-term planning. Ultimately, this step generates a JS divergence sequence for each pair of adversary actions, unfolded according to decision-making levels.
[0047] Step 105: Accumulate the JS divergence of the action probability distribution for each layer to obtain the total difference measure of each pair of opponent actions.
[0048] In this embodiment of the invention, the aim is to integrate the multiple JS divergence values calculated layer by layer in the previous step into a comprehensive difference index. This requires a systematic cumulative calculation of the JS divergence at all levels corresponding to each pair of opponent actions.
[0049] For any specific pair of opponent actions (e.g., action A and action B), d JS divergence values from the first layer to the preset depth d layer have been calculated in the previous step. These values are arranged in order of decision hierarchy, forming a complete JS divergence sequence. During accumulation, all values in this sequence need to be summed according to the order of the layers.
[0050] This accumulation process exhibits a clear temporal accumulation characteristic. The JS divergence at shallower levels (such as layer 1) primarily reflects the differences in the immediate response of the strategy to the opponent's actions, embodying the tactical-level responsiveness. However, as the levels deepen (such as layer 2, layer 3, and up to layer d), the JS divergence captures more of the differences in the strategy's behavioral adjustments during medium- and long-term decision-making, revealing the strategic-level adaptation depth. By accumulating the difference information at different time scales, the final total difference metric can comprehensively cover the all-round responsiveness of the strategy from short-term reactions to long-term planning.
[0051] The Total Difference Measure compresses a complex, time-bound pattern of behavioral differences into a single, intuitive quantitative indicator. This indicator not only reflects the "total" amount of strategic adaptability, but its value is also directly related to the richness and flexibility of strategic behavior. A high Total Difference Measure value indicates that the strategy can significantly adjust its subsequent behavioral sequence according to different choices made by the opponent, demonstrating high adaptability and diversity; conversely, a low value suggests that the strategy's behavioral pattern may be relatively rigid and lacks flexibility in responding to change.
[0052] Step 106: Determine the average of the total difference measure for all different opponent action pairs as a quantitative indicator of the opponent's adaptability to the strategy to be evaluated.
[0053] In this embodiment of the invention, the average of the total difference measure of all different opponent action pairs is calculated, and this average is used as a quantitative indicator of the opponent's adaptability of the strategy to be evaluated. The average is obtained by summing the total difference measures of all action pairs and dividing by the number of action pairs. For example, if there are k legal action sets, the number of action pairs is k(k-1) / 2, and the average is the arithmetic mean of the total difference measures of these pairs.
[0054] This average value, as a quantitative indicator, has normalization properties. It aggregates paired differences into a single value, representing the strategy's average adaptability to changes in overall opponent behavior. A higher value indicates greater strategy diversity and better adaptability to different opponents; a lower value indicates strategy rigidity.
[0055] Through this invention, by acquiring the opponent's decision nodes, the strategy to be evaluated, and the game environment, the first step is to determine the set of legal actions corresponding to the opponent's decision nodes, providing a clear action space for response analysis. Then, for each pair of different opponent actions, a corresponding friendly decision node is generated, thus introducing changes in opponent actions into the evaluation framework. Based on this, starting from the friendly decision node, the strategy to be evaluated is traversed downwards to a preset depth, and the JS divergence of the action probability distribution of the strategy to be evaluated on each pair of opponent actions is calculated layer by layer, which can characterize the difference in the strategy's response under the inducement of different opponent actions. Then, by accumulating the JS divergence of each layer, the total difference measure of each pair of actions is obtained, comprehensively reflecting the overall response difference of the strategy in multi-step decision-making. Finally, by calculating the average of the total difference measures of all different opponent action pairs, a quantitative index of the opponent's response capability of the strategy to be evaluated is obtained, realizing an objective and quantitative evaluation of the adaptability and flexibility of the strategy when facing different opponent decisions.
[0056] According to the present invention, a method for evaluating the adaptability of a strategy opponent based on JS divergence is provided, which determines the JS divergence of the action probability distribution of the strategy to be evaluated for each pair of opponent actions layer by layer, including: Determine the JS divergence of the action probability distribution of the strategy to be evaluated in the first layer for each pair of opponent actions; in, This represents the difference measure of the first layer. Represents the JS divergence operator. and These represent the self-decision nodes at the first layer of the strategy to be evaluated. With one's own decision-making nodes The probability distribution of actions, Indicates the opponent's decision-making node. and Indicates a pair of opposing actions; When traversing down to the nth level, determine the JS divergence of the action probability distribution of the strategy to be evaluated in each pair of opponent actions in the nth level: in, This represents the difference metric for the nth layer. and Represents the self-decision node at level n. With one's own decision-making nodes Expectations and This represents the own decision node at level n of the strategy to be evaluated. With one's own decision-making nodes The probability distribution of actions, Indicates except Place In addition, our own decision-making nodes They have the same historical action sequence.
[0057] In this embodiment of the invention, the differences in decision-making behavior of the strategy to be evaluated when facing different opponent actions are quantified by using a hierarchical calculation method.
[0058] In the first layer of computation, the evaluation process directly targets the player's decision point immediately following the opponent's action selection. Once the opponent chooses a specific action at the initial decision point, the game environment enters the first player's decision point. At this level, it is necessary to calculate the difference in action probability distributions of the strategy under evaluation at the decision points corresponding to two different opponent actions. Specifically, for any pair of different opponent actions, the complete action selection probability distributions of the strategy at these two initial decision points are obtained, and then the JS divergence algorithm is used to measure the difference between these two distributions. The results of this layer directly reflect the strategy's immediate responsiveness to different opponent actions, demonstrating the strategy's sensitivity and flexibility at the starting point of the decision sequence.
[0059] From the second layer onwards, up to the preset depth of the nth layer, the calculation method shifts to an evaluation based on expected value. Within each layer, all possible reachable pairs of friendly decision nodes need to be examined. These pairs must satisfy a key condition: aside from the opponent's action choices at the initial node, the sequence of actions taken by the friendly strategy must be completely consistent throughout the entire decision history from the first layer to the current layer. This design ensures that the observed behavioral differences stem purely from differences in the opponent's initial actions, rather than different choices made by the friendly strategy during the process.
[0060] In practice, for each eligible node pair in the nth layer, the action probability distribution of the policy to be evaluated at these two nodes is calculated, and the JS divergence value between them is solved. Since there may be multiple eligible node pairs at each layer, it is necessary to calculate the expected value of the JS divergence values of all possible node pairs at that layer. This expected value represents the average degree of response of the policy at the current decision level to the difference in the opponent's initial actions, which can effectively eliminate the influence of single-path randomness and ensure the statistical stability of the evaluation results.
[0061] In this embodiment of the invention, the opponent is assumed to be at the opponent decision node. The set of legal actions on is Iterate through all possible actions of the opponent to obtain child nodes. .
[0062] Traverse the decision tree of your own side layer by layer downwards until... Layer by layer, calculate the JS divergence of one's own strategy under different actions of the opponent.
[0063] Level 1: This refers to the difference in probability distribution between one's own strategies for every two different actions of the opponent.
[0064] nth level: in This is the decision node for our side at level n. It means, except At the node In addition, our own decision-making nodes Having the same historical action sequence, .
[0065] That is, the expected difference in probability distribution between one's own strategies when the sequence of one's own actions is the same for every two different actions of the opponent.
[0066] Through the embodiments of this invention, a layer-by-layer analysis from shallow to deep levels can clearly demonstrate the dynamic changes in strategic adaptability: shallow differences mainly reflect the immediacy of tactical responses, while deep differences reveal the continuity of strategic adjustments. The entire calculation process is carried out cyclically within a preset depth range, with each layer following the same principles but focusing on strategic behaviors at different time scales, ultimately forming a complete, multi-layered difference assessment spectrum.
[0067] According to the present invention, a method for evaluating the adaptability of a strategy adversary based on JS divergence is provided, the method further includes: Starting from the starting point of our own decision node, multiple decision paths are generated through random sampling. Each decision path includes a complete decision sequence from the decision starting point to a preset depth. Based on the probability distribution of actions of the strategy to be evaluated at each of the player's decision nodes in each decision path, the generation probability of each decision path is determined. Determine the JS divergence value of the action probability distribution of the decision node for each decision path, and perform a weighted average based on the generation probability of each decision path to obtain the expected value of the decision node.
[0068] In this embodiment of the invention, the complete decision-making process of the strategy to be evaluated, starting from the player's own decision node and proceeding to a preset depth, is simulated to generate multiple representative decision paths. During implementation, the sampling starting point is first defined as the player's own decision node generated in the aforementioned steps. This node corresponds to the player's decision position after the opponent selects a specific action at the initial node. The preset depth defines the sampling range; for example, depth d indicates that each path contains d consecutive decision steps.
[0069] At each decision node, based on the probability distribution of the action output by the strategy, the next action is randomly selected, thus gradually constructing a decision sequence from the starting point to a preset depth. This process is repeated multiple times to generate a sufficient number of path samples, such as hundreds or thousands of paths generated using Monte Carlo sampling methods, to ensure coverage of the main possibilities of the strategy's behavior. During sampling, the accuracy of environmental state transitions must be maintained; that is, after each action is selected, the state is updated to the next node according to the game rules.
[0070] Each path represents a possible behavioral trajectory of a strategy under the influence of a specific opponent's actions. By generating a large number of paths, the decision-making patterns of the strategy can be fully captured, avoiding evaluation bias caused by the randomness of a single path.
[0071] After generating multiple decision paths, it is necessary to calculate the generation probability of each path. This probability represents the likelihood that the strategy to be evaluated will naturally generate that path according to its own decision rules. In practice, for each generated decision path, starting from the starting point, every friendly decision node on the path is traversed to obtain the probability distribution of the strategy's actions at that node.
[0072] In the specific calculation, the probability of a path being generated is the product of the action probabilities of each node on the path. For example, for a path containing d decision steps, at each node, the probability of the policy choosing a specific action is taken from its action probability distribution. Multiplying these probabilities together gives the overall probability of the path being generated. This calculation is based on the Markov property of the policy, that is, each decision depends only on the current state, ensuring the correctness and decomposability of the probability calculation.
[0073] For each generated decision path, its corresponding JS divergence value is calculated. This value is obtained by comparing the differences in decision behaviors induced by two different opponent actions on the same path. Specifically, for each pair of opponent actions, the JS divergence of the policy action probability distribution is calculated at each node of the path.
[0074] On each path, the divergence value captures the behavioral changes exhibited by the policy due to different initial actions of the opponent. Then, the JS divergence values of all paths are combined with their generation probabilities and a weighted average is calculated. The specific operation of the weighted average is as follows: multiply the JS divergence value of each path by its generation probability, then sum the weighted results of all paths, and finally divide by the total number of paths or the sum of probabilities to obtain the expected value.
[0075] Through the embodiments of the present invention, the expected value provides a statistically significant measure of the average strain capability of a strategy, eliminating the influence of sampling randomness and making the evaluation results more robust.
[0076] According to the present invention, a method for evaluating the adaptability of a strategy opponent based on JS divergence is provided, which accumulates the JS divergence of the action probability distribution at each layer to obtain a total difference measure for each pair of opponent actions, including: For each pair of opponents' actions, store the JS divergence of the action probability distribution at each layer according to the decision order; Summing the JS divergence of the action probability distribution at each storage layer yields a total difference metric for each pair of opponent actions: in, Indicates the opponent's action and Total difference measure Indicates the first Layer difference metric This is the preset depth.
[0077] In this embodiment of the invention, the JS divergence values of each layer are stored in the order of decision-making, and the stored values are systematically summed. Through this process, a total difference metric can be generated for each pair of opponent actions, thereby quantifying the overall adaptability of the strategy throughout the entire decision sequence.
[0078] For any pair of distinct opponent actions (e.g., action A and action B), the JS divergence values from the first layer to the nth layer of the preset depth have been calculated in the previous step. These values are organized chronologically according to the decision hierarchy and are typically stored in an ordered data structure, such as an array or list. During storage, each level's JS divergence value corresponds to a unique index, ensuring data integrity and traceability. This storage step is fundamental to subsequent summation operations; it guarantees data orderliness and accessibility, avoiding confusion or omissions during the calculation process.
[0079] Accuracy and consistency of data are paramount during storage. The JS divergence value for each layer is derived from rigorous JS divergence calculations, reflecting the policy's responsiveness to differences in opponent actions at that layer. During storage, data should be bound to corresponding opponent action pairs and decision-level labels for easy retrieval and processing. For example, in software implementation, key-value pairs or database tables can be used to manage this data, where the keys are action pair identifiers and layer numbers, and the values are JS divergence values. This structured storage supports efficient data access and facilitates automated summation.
[0080] After storage is complete, the next step is to sum the JS divergence of the action probability distribution at each layer of storage to obtain the total difference metric for each pair of opponent actions. The summation operation is linear; that is, the stored JS divergence values are read sequentially, starting from the first layer and continuing up to the preset depth n, and all values are summed to obtain a total. This sum is the total difference metric, representing the cumulative strength of the behavioral difference of the policy when facing a specific pair of opponent actions across the entire decision depth. The summation process is typically implemented using an iterative algorithm, such as using a loop structure in programming to traverse the stored dataset, progressively accumulating each value into an accumulator variable.
[0081] Superficial JS divergence values may reflect differences in immediate strategic responses, while deeper values reflect long-term strategic adjustments. By summing these differences across different time scales, a single indicator is aggregated to comprehensively capture the responsiveness of the strategy. The magnitude of the total divergence measure directly indicates the flexibility of the strategy: a higher value suggests that the strategy can significantly adjust its behavior according to the opponent's actions, exhibiting strong diversity; a lower value suggests that the behavioral pattern may be relatively fixed.
[0082] refer to Figure 3 , Figure 3 This is a schematic diagram of the calculation process provided by the present invention. It includes: Step 1, traversing all possible actions of the opponent to obtain child nodes. Step 2, traversing the player's decision tree layer by layer down to layer d, calculating the JS divergence of the player's strategy under different opponent actions layer by layer. Step 3, summing the JS divergences of each layer. Step 4, averaging the total number of different opponent actions.
[0083] Through the embodiments of the present invention, the JS divergence is calculated and accumulated layer by layer, which effectively quantifies the strategic differences of the opponent at different decision-making levels, thereby comprehensively and accurately assessing its adaptability and improving the fine granularity and reliability of the adversarial strategy analysis.
[0084] According to the present invention, a method for assessing the opponent's adaptability based on JS divergence is provided, which determines the average value of the total difference measure of all different opponent action pairs as a quantitative indicator of the opponent's adaptability of the strategy to be assessed, including: Based on the number of legal actions in the set of legal actions, the total difference measure of all different opponent action pairs is averaged to obtain a quantitative index of the opponent's adaptability of the strategy to be evaluated: in, This represents a quantitative indicator of the opponent's responsiveness to the strategy being evaluated. Indicates the number of legal actions. Indicates the opponent's action and Total difference measure.
[0085] In this embodiment of the invention, the total number of all different opponent action pairs is determined based on the size of the legal action set; the arithmetic mean of the total difference measure of these action pairs is then used to obtain the final quantitative index. This ensures the comprehensiveness and comparability of the evaluation results, providing intuitive data support for strategy optimization.
[0086] The total difference measure for all different opponent action pairs corresponds to each pair of different opponent actions in the set of legal actions, such as action A and action B, action A and action C, etc. The total difference measure for each action pair reflects the overall behavioral difference intensity of the policy under the influence of that particular action pair.
[0087] The size of the set of legal actions is determined by the number of legal actions, k, which defines the total number of actions the opponent can take at the initial decision node. The total number of different opponent action pairs can be determined using combinatorial mathematics principles, specifically the number of combinations of choosing two different actions from k actions, which is k multiplied by k minus one and then divided by two.
[0088] After determining the number of action pairs, the total difference metric for all different opponent action pairs is summed. This summation requires iterating through the stored total difference metric values, for example, by accessing the value for each action pair using an iterative algorithm and accumulating them into a sum variable. The sum represents the total strength of the policy's behavioral differences across all possible opponent action variations, but it is an unnormalized raw value. Direct use may be affected by the number of actions, therefore standardization through averaging is necessary.
[0089] Finally, the total sum of differences is divided by the total number of opponent action pairs to obtain the arithmetic mean. The specific operation of the averaging is to divide the sum by the number of action pairs to obtain the average value. This average value is a quantitative indicator of the opponent's adaptability to the strategy being evaluated, quantifying the strategy's average adaptability under changes in overall opponent behavior.
[0090] For example, if the number of legal actions k is large, the number of action pairs increases, and the averaging process can eliminate scale bias, making the indicators comparable in different environments.
[0091] Through the embodiments of the present invention, the JS divergence is calculated and accumulated layer by layer according to the decision-making order, which quantifies the differences in the action distribution of the opponent under multi-layer strategies, thereby comprehensively and dynamically assessing its adaptability and improving the accuracy and depth of the analysis of adversarial strategies.
[0092] According to the present invention, a method for evaluating the strategic adversary's adaptability based on JS divergence is provided, the method further includes: The preset depth is dynamically adjusted based on the state space complexity of the game environment.
[0093] In this embodiment of the invention, the state space complexity of the game environment is quantitatively evaluated. State space complexity is mainly reflected in the branching factor of the game tree, the number of states, and the length of the decision sequence.
[0094] For example, key parameters can be automatically calculated by analyzing game rules. The branch factor size can be obtained by statistically analyzing the average number of legal actions, the state space size can be estimated by state enumeration or sampling, and the reference value for the number of decision steps can be obtained by analyzing the length of typical games. These parameters together constitute the basic index system for complexity assessment.
[0095] After obtaining the complexity index, a mapping rule from complexity to preset depth needs to be established. This mapping relationship follows the basic principle that "the higher the complexity, the lower the preset depth should be; the lower the complexity, the higher the preset depth can be." Multiple complexity levels can be set, and a corresponding depth value range can be configured for each level. For example, for highly complex game environments (such as Go and large-scale wargaming), the preset depth can be set to 3-5 layers; for medium-complexity environments (such as chess and poker), the depth can be set to 5-8 layers; and for relatively simple environments (such as tic-tac-toe and small-scale grid worlds), the depth can be set to 8-12 layers.
[0096] The implementation of depth adjustment employs a hierarchical decision-making mechanism. It automatically identifies the game environment type and calculates a complexity score, then determines the initial depth value based on a pre-defined mapping table. During the evaluation process, dynamic fine-tuning can be performed based on the actual computational load: if the computation time exceeds a predetermined threshold, the depth value is automatically reduced; if the system detects significant differences in strategy behavior at the shallow level, deep traversal can be terminated early. This flexible adjustment mechanism ensures evaluation quality while avoiding unnecessary waste of computational resources.
[0097] Through the above embodiments of the present invention, a precise quantitative analysis of the internal decision-making mechanism of a strategy is achieved. Traditional evaluation methods can only indirectly infer the diversity of strategies from external manifestations such as subjective feelings or game results, and cannot delve into the internal decision-making process of the strategy. This method transforms the abstract "adaptability" into a concrete numerical indicator by calculating the JS divergence of the probability distribution of the strategy's actions at key decision nodes when facing different opponents' behaviors. This information theory-based quantitative approach can reveal the inherent ability of a strategy to adjust its decision-making pattern according to the characteristics of the opponent by starting from each specific decision-making behavior, thereby achieving a precise measurement of the essence of diversity.
[0098] A unified evaluation standard has been established across domains, possessing a high degree of automated scalability. Existing technologies, lacking a unified mathematical foundation, struggle to establish comparable evaluation systems across different game environments. This method utilizes the universally applicable JS divergence metric to uniformly map strategic behaviors across different environments to the same measurement scale. This standardized approach not only enables cross-domain and cross-environment strategy comparisons but, more importantly, achieves fully automated, large-scale strategy evaluation, significantly improving evaluation efficiency and expanding its application scope.
[0099] The following describes the strategic opponent's adaptability assessment device based on JS divergence provided by the present invention. The strategic opponent's adaptability assessment device based on JS divergence described below can be referred to in correspondence with the strategic opponent's adaptability assessment method based on JS divergence described above.
[0100] refer to Figure 4 , Figure 4 This is a schematic diagram of the module of the strategy opponent adaptability assessment device based on JS divergence provided by the present invention.
[0101] The acquisition module 401 is used to acquire the opponent's decision node, the strategy to be evaluated, and the game environment. The opponent's decision node is the starting node for the opponent to execute decisions in the game environment. Module 402 is used to determine all legal actions corresponding to the opponent's decision node and construct a set of legal actions; The generation module 403 is used to generate a corresponding friendly decision node for each pair of opponent actions in the set of legal actions, wherein the two opponent actions in each pair of opponent actions are different. The JS divergence module 404 is used to traverse the decision sequence of the strategy to be evaluated down to a preset depth, starting from the decision node of the player, and determine the action probability distribution JS divergence of the strategy to be evaluated on each pair of opponent actions layer by layer. The accumulation module 405 is used to accumulate the JS divergence of the action probability distribution of each layer to obtain the total difference measure of each pair of opponent actions; Output module 406 is used to determine the average of the total difference measure of all different opponent action pairs as a quantitative indicator of the opponent's adaptability to the strategy to be evaluated.
[0102] Specifically, the above-mentioned strategy opponent adaptability assessment device based on JS divergence provided by the present invention can realize all the method steps implemented in the above-mentioned strategy opponent adaptability assessment method embodiment based on JS divergence, and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0103] Figure 5 This is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other through the communications bus 540. The processor 510 can call logic instructions in the memory 530 to execute a strategy opponent adaptability evaluation method based on JS divergence. This method includes: acquiring opponent decision nodes, the strategy to be evaluated, and the game environment, wherein the opponent decision node is the starting node for the opponent to make decisions in the game environment; determining all legal actions corresponding to the opponent decision node and constructing a set of legal actions; generating a corresponding friendly decision node for each pair of opponent actions in the set of legal actions, wherein the two opponent actions in each pair are different; starting from the friendly decision node, traversing downwards through the decision sequence of the strategy to be evaluated to a preset depth, determining the JS divergence of the action probability distribution of the strategy to be evaluated for each pair of opponent actions layer by layer; accumulating the JS divergence of the action probability distribution at each layer to obtain the total difference measure for each pair of opponent actions; and determining the average of the total difference measures for all different pairs of opponent actions as a quantitative indicator of the opponent adaptability of the strategy to be evaluated.
[0104] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0105] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the strategy opponent adaptability assessment method based on JS divergence provided by the above methods. The method includes: acquiring opponent decision nodes, the strategy to be evaluated, and the game environment, wherein the opponent decision node is the starting node for the opponent to make decisions in the game environment; determining all legal actions corresponding to the opponent decision node and constructing a set of legal actions; generating a corresponding self-decision node for each pair of opponent actions in the set of legal actions, wherein the two opponent actions in each pair of opponent actions are different; starting from the self-decision node, traversing downwards through the decision sequence of the strategy to be evaluated to a preset depth, and determining the action probability distribution JS divergence of the strategy to be evaluated on each pair of opponent actions layer by layer; accumulating the action probability distribution JS divergence of each layer to obtain the total difference measure of each pair of opponent actions; and determining the average value of the total difference measure of all different pairs of opponent actions as a quantitative indicator of the opponent adaptability of the strategy to be evaluated.
[0106] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the method for evaluating the opponent's adaptability based on JS divergence provided by the above methods. The method includes: acquiring the opponent's decision node, the strategy to be evaluated, and the game environment, wherein the opponent's decision node is the starting node for the opponent to make decisions in the game environment; determining all legal actions corresponding to the opponent's decision node and constructing a set of legal actions; generating a corresponding self-decision node for each pair of opponent actions in the set of legal actions, wherein the two opponent actions in each pair of opponent actions are different; starting from the self-decision node, traversing downwards through the decision sequence of the strategy to be evaluated to a preset depth, and determining the JS divergence of the action probability distribution of the strategy to be evaluated on each pair of opponent actions layer by layer; accumulating the JS divergence of the action probability distribution at each layer to obtain the total difference measure of each pair of opponent actions; and determining the average value of the total difference measure of all different pairs of opponent actions as a quantitative indicator of the opponent's adaptability of the strategy to be evaluated.
[0107] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A JS divergence-based strategy adversary resilience assessment method, characterized in that, include: The opponent's decision node, the strategy to be evaluated, and the game environment are obtained, wherein the opponent's decision node is the starting node for the opponent to execute a decision in the game environment; Determine all legal actions corresponding to the opponent's decision node, and construct a set of legal actions; For each pair of opponent actions in the set of legal actions, a corresponding friendly decision node is generated, wherein the two opponent actions in each pair of opponent actions are different; Starting from the self-decision node, traverse the decision sequence of the strategy to be evaluated downwards to a preset depth, and determine the JS divergence of the action probability distribution of the strategy to be evaluated on each pair of opponent actions layer by layer. The JS divergence of the action probability distribution at each layer is accumulated to obtain the total difference measure of each pair of opponent actions; The average of the total difference measure of all different opponent action pairs is determined as a quantitative indicator of the opponent's adaptability to the strategy to be evaluated.
2. The JS-divergence-based policy adversary resilience assessment method of claim 1, wherein, The stepwise determination of the action probability distribution JS divergence of the strategy to be evaluated on each pair of opponent actions includes: Determine the JS divergence of the action probability distribution of the strategy to be evaluated in the first layer for each pair of opponent actions; wherein, represents a difference measure value of the first layer, represents a JS divergence operator, and respectively represent the action probability distribution of the own decision node and the opponent decision node of the first layer for the strategy to be evaluated, represents the opponent decision node, and represents a pair of opponent actions; When traversing down to the nth layer, determine the JS divergence of the action probability distribution of the strategy to be evaluated in the nth layer on each pair of opponent actions: in, This represents the difference metric for the nth layer. and Represents the self-decision node at level n. With one's own decision-making nodes Expectations and This indicates the own decision node at layer n of the strategy to be evaluated. With one's own decision-making nodes The probability distribution of actions, Indicates except Place In addition, our own decision-making nodes They have the same historical action sequence.
3. The method for evaluating the adaptability of a strategy opponent based on JS divergence according to claim 2, characterized in that, The method further includes: Starting from the origin of the decision node, multiple decision paths are generated through random sampling. Each decision path includes a complete decision sequence from the origin to the preset depth. Based on the probability distribution of actions of the strategy to be evaluated at each of the self-decision nodes in each decision path, the generation probability of each decision path is determined. Determine the JS divergence value of the action probability distribution of the decision node for each decision path, and perform a weighted average based on the generation probability of each decision path to obtain the expected value of the decision node.
4. The method for evaluating the adaptability of a strategy opponent based on JS divergence according to claim 1, characterized in that, The summation of the JS divergence of the action probability distribution at each layer to obtain the total difference measure of each pair of opponent actions includes: For each pair of opponent actions, store the JS divergence of the action probability distribution at each layer in the order of decision-making; The summation of the JS divergence of the action probability distributions for each layer in the stored data yields the total difference metric for each pair of opponent actions: in, Indicates the opponent's action and Total difference measure Indicates the first Layer difference metric The preset depth.
5. The method for evaluating the adaptability of a strategy opponent based on JS divergence according to claim 1, characterized in that, The step of determining the average of the total difference measure of all different opponent action pairs as a quantitative indicator of the opponent's adaptability of the strategy to be evaluated includes: Based on the number of legal actions in the set of legal actions, the total difference measure of all different opponent action pairs is averaged to obtain a quantitative index of the opponent's adaptability of the strategy to be evaluated: in, This represents a quantitative indicator of the opponent's responsiveness to the strategy being evaluated. Indicates the number of legal actions. Indicates the opponent's action and Total difference measure.
6. The method for evaluating the adaptability of a strategy opponent based on JS divergence according to claim 1, characterized in that, The method further includes: The preset depth is dynamically adjusted based on the state space complexity of the game environment.
7. A device for evaluating the adaptability of a strategy opponent based on JS divergence, characterized in that, include: The acquisition module is used to acquire the opponent's decision node, the strategy to be evaluated, and the game environment, wherein the opponent's decision node is the starting node for the opponent to execute a decision in the game environment; The determination module is used to determine all legal actions corresponding to the opponent's decision node and construct a set of legal actions; The generation module is used to generate a corresponding friendly decision node for each pair of opponent actions in the set of legal actions, wherein the two opponent actions in each pair of opponent actions are different. The JS divergence module is used to traverse the decision sequence of the strategy to be evaluated down to a preset depth, starting from the self-decision node, and determine the action probability distribution JS divergence of the strategy to be evaluated on each pair of opponent actions layer by layer. The accumulation module is used to accumulate the JS divergence of the action probability distribution at each layer to obtain the total difference measure of each pair of opponent actions; The output module is used to determine the average of the total difference measure of all different opponent action pairs, as a quantitative indicator of the opponent's adaptability to the strategy to be evaluated.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the strategy opponent adaptability assessment method based on JS divergence as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the strategy opponent adaptability assessment method based on JS divergence as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the strategy opponent adaptability assessment method based on JS divergence as described in any one of claims 1 to 6.