A strategy adaptive switching method for aerial game confrontation
By training an opponent strategy recognition model and switching dedicated decision-making strategies in aerial game confrontation, the lack of dynamic adjustment capability in existing technologies is solved, enabling adaptive switching of adversarial strategies and improving adversarial capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU EBOYLAMP ELECTRONICS CO LTD
- Filing Date
- 2024-02-01
- Publication Date
- 2026-06-02
AI Technical Summary
Existing deep reinforcement learning algorithms for aerial game adversarial competition lack dynamic adjustment capabilities and cannot adjust their strategies in response to constantly changing opponent strategies during the adversarial process, making it difficult to guarantee their adversarial capabilities.
By initializing the adversarial environment, the blue agent randomly selects an expert strategy to compete against the red agent using a general decision-making strategy. Feature-action data pairs are collected to train the opponent's strategy recognition model. The model with the highest prediction accuracy is selected and switched to the dedicated decision-making strategy to achieve adaptive strategy switching.
It enhances the richness of the decision-making algorithm pool, effectively identifies policy changes of the opposing agent, improves adversarial capabilities, and avoids a decline in adversarial capabilities due to changes in the opponent's policy.
Smart Images

Figure CN118014058B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of game theory and specifically relates to a strategy adaptive switching method for aerial game theory and confrontation. Background Technology
[0002] As the focal point of confrontation, the field of aerial combat urgently requires rapid and autonomous decision-making.
[0003] Deep reinforcement learning, as a typical artificial intelligence technology, combines the ability of deep learning to represent high-dimensional situational information with the decision-making capabilities of reinforcement learning, making it highly suitable for aerial game-based adversarial scenarios. In recent years, research on autonomous decision-making in aerial adversarial scenarios based on deep reinforcement learning algorithms has attracted widespread attention and research from both academia and industry. However, existing deep reinforcement learning algorithms for aerial game-based adversarial scenarios lack dynamic adjustment capabilities during inference applications; that is, they cannot adaptively switch response strategies based on changes in the opponent's strategy during the game, making it difficult to guarantee their overall adversarial capabilities.
[0004] The main drawback of existing deep reinforcement learning algorithms for aerial game adversarial applications in inference is the lack of dynamic adjustment capability. That is, they cannot adjust their strategies in response to the constantly changing strategies of the opponent during the adversarial process, which makes it difficult to guarantee their adversarial capabilities. Summary of the Invention
[0005] The purpose of this invention is to address the problems raised in the background art by proposing an adaptive strategy switching method for aerial game confrontation.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] The present invention proposes a strategy adaptive switching method for aerial game confrontation, including step 1: firstly, initialize the confrontation environment, the blue agent randomly selects an expert strategy from a pre-built expert strategy pool according to a preset number of rounds to conduct confrontation, and the red agent adopts a pre-trained general decision strategy to conduct confrontation.
[0008] Step 2: Determine whether the confrontation between the red and blue agents has ended based on the preset conditions. If it has ended, the confrontation ends. If it has not ended, collect the feature-action data pairs of the blue agent during the confrontation and construct the first feature-action data pair set by the feature-action data pairs corresponding to the expert strategy selected by the blue agent each time, and store them in the data cache pool.
[0009] Step 3: Determine whether the number of first feature-action data pairs in the data cache pool is greater than the preset first threshold. If it is greater than the first threshold, proceed to step 4; otherwise, return to step 2.
[0010] Step 4: Input the corresponding features in each first feature-action data pair set into the trained opponent strategy recognition model to obtain the predicted action. Compare the predicted action with the action in the first feature-action data pair set to obtain the prediction accuracy of each opponent strategy recognition model. Each opponent strategy recognition model is trained based on the corresponding second feature-action data pair set. The second feature-action data pair set is the feature-action data pair set of the blue agent in the process of adversarial between the dedicated decision-making strategy and the expert strategy.
[0011] Step 5: Determine whether the prediction accuracy of each opponent strategy identification model is greater than the preset second threshold. If it is, proceed to step 6; otherwise, clear the data cache pool and return to step 2.
[0012] Step 6: Select the opponent strategy identification model with the highest prediction accuracy, then find the expert strategy adopted by the blue agent during the training process of the opponent strategy identification model, and finally replace the strategy of the red agent with a pre-trained special decision-making strategy that can counter the expert strategy, thus completing the strategy switching.
[0013] Preferably, the initialization of the adversarial environment includes at least:
[0014] Initialize the initial position, height, velocity, and angle of the red and blue agents in the battle.
[0015] Preferably, the expert strategy includes at least one-sided offensive tactics, two-sided offensive tactics, cross-attack tactics, pincer attack tactics, defensive offensive tactics, and S-shaped defensive tactics.
[0016] Preferably, the training process for the general decision-making strategy is as follows:
[0017] Each game, the agent randomly selects an expert strategy as its opponent to compete against until the agent's general decision-making strategy reaches a set level.
[0018] Preferably, the preset conditions for determining whether the confrontation between the red and blue agents has ended include at least the number of rounds in which the confrontation has been reached.
[0019] Preferably, the training process of the dedicated decision-making strategy is as follows:
[0020] The agent engages in confrontation with each expert strategy in turn, and in turn obtains a special decision-making strategy that can counter the corresponding expert strategy.
[0021] Preferably, the training process for each opponent strategy identification model is as follows:
[0022] Step 4.1: Match the pre-trained dedicated decision-making strategies one-to-one with the corresponding expert strategies in N rounds of adversarial training. During the adversarial training, collect the second feature-action data pairs of the agents using the expert strategies. All dedicated decision-making strategies are denoted as follows: The expert strategy pool is denoted as Each set of second feature-action data pairs is denoted as The set of all second-feature-action data pairs is denoted as Where, p i Let e represent the i-th specific decision strategy. i Let D represent the i-th expert strategy. i Let N represent the set of second feature-action data pairs collected during the i-th expert strategy adversarial process. E N represents the number of expert strategies in the expert strategy pool or the total number of dedicated decision-making strategies. i This represents the total number of second feature-action data pairs, where j represents the j-th second feature-action data pair. Let represent the feature value of the j-th second feature-action data pair collected during the i-th expert strategy adversarial process, and Represents d-dimensional features, Represents one-dimensional features. This represents the action value in the j-th second feature-action data pair collected during the i-th expert strategy adversarial process;
[0023] Step 4.2: For any set D of second feature-action data pairs i The missing values and outliers are processed sequentially to obtain the training dataset. And the training dataset As a node;
[0024] Step 4.3: First, determine whether the current node or the partitioned node is a node to be split. The determination conditions include: all actions in the feature-action data pairs in the node belong to the same action category; the number of feature-action data pairs in the node is less than a preset third threshold; and the number of actions in any category of the feature-action data pairs in the node is greater than a preset fourth threshold. If any one of the three determination conditions is met, it is not a node to be split, and step 4.7 is executed. If none of the conditions are met, it is a node to be split, and step 4.4 is executed.
[0025] Step 4.4: Set a preset number of separation values for all features in all feature-action data pairs in the node to be split, according to a preset method;
[0026] Step 4.5: For each feature in the node to be split, traverse all the separator values, calculate the Gini coefficient value of each separator value, and select the separator value corresponding to the smallest Gini coefficient value as the first optimal separator value for that feature.
[0027] The formula for calculating the Gini coefficient is as follows:
[0028]
[0029] in, Indicated by feature f j To divide features, with The separator value is the node to be split. The Gini coefficient value for segmentation, V represents the value based on feature f. j and separator value The number of child nodes obtained after splitting. Indicates the node to be split The number of all feature-action data pairs in the data. This represents the number of feature-action data pairs in the v-th child node of V. Represents the v-th child node The Gini coefficient value, |Y v | represents the number of action categories in the feature-action data pair of the v-th child node. This represents the proportion of the number of features belonging to the kth action category in the feature-action data pair of the vth child node out of the total number of action categories.
[0030] Step 4.6: Then, iterate through all the first optimal separator values of all features in the node to be split, and select the feature corresponding to the smallest Gini coefficient value and the first optimal separator value from all the first optimal separator values as the optimal feature f of the node to be split. * Second optimal separation value The node to be split is then divided using the optimal feature and the second optimal separation value, as shown in the following formula:
[0031]
[0032] Where F represents the training dataset The set of all features in;
[0033] Step 4.7: Repeat steps 4.3-4.6 until there are no more nodes to be split, and obtain the decision tree. Use the decision tree as the trained adversary strategy recognition model.
[0034] Preferably, the features in the feature-action data pair include at least relative distance, relative angle, relative altitude, and relative speed, and the actions in the feature-action data pair include at least left cut, right cut, climb, dive to the upper left, lower left, upper right, lower right, and level flight.
[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0036] 1. This strategy adaptive switching method for aerial game confrontation adopts expert strategies of different styles as training opponents, and obtains special decision-making strategies and general decision-making strategies through game confrontation training, thereby improving the richness of the decision-making algorithm pool.
[0037] 2. The system uses a dedicated decision-making strategy to compete against an expert strategy, and trains the opponent strategy recognition model with the feature-action data of the expert strategy during the competition. This enables the opponent strategy recognition model to effectively identify the opponent's strategy and switch to the corresponding strategy, thus avoiding a decrease in the local competitive capability due to changes in the opponent's strategy and improving the competitive capability. Attached Figure Description
[0038] Figure 1 This is a flowchart of the strategy adaptive switching method for aerial game confrontation according to the present invention;
[0039] Figure 2 This is a schematic diagram illustrating the training process of the decision-making strategy specific to this invention.
[0040] Figure 3 This is a schematic diagram illustrating the training process of the general decision-making strategy of this invention;
[0041] Figure 4 This is a schematic diagram illustrating the training process of the opponent strategy recognition model of the present invention. Detailed Implementation
[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0043] It should be noted that when a component is referred to as being "connected" to another component, it can be directly connected to the other component or there may be an intervening component. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to limit the application.
[0044] like Figure 1-4 As shown, a strategy adaptive switching method for aerial game confrontation includes:
[0045] Step 1: First, initialize the adversarial environment. The blue team agent randomly selects an expert policy from a pre-built pool of expert policies according to a preset number of rounds. The red team agent uses a pre-trained general decision-making policy to engage in the adversarial process. Specifically:
[0046] Initializing the adversarial environment includes at least initializing the initial positions, altitudes, speeds, and angles of the red and blue agents in this embodiment. In this embodiment, the red agent is the player, and the blue agent is the enemy. The expert strategy pool is a set of adversarial strategies developed based on experience in existing aerial game adversarial domains, denoted as […]. e i N represents the i-th expert policy in the expert policy pool. E This indicates the number of expert strategies in the expert strategy pool. Expert strategies must include at least one-sided attack tactics, two-sided attack tactics, cross-attack tactics, pincer attack tactics, defensive attack tactics, and S-shaped defensive tactics. During the red-blue team's match, the blue team changes its expert strategy every set number of rounds (e.g., every 10 rounds, for a total of 100 rounds). Figure 3 As shown, the training process of the pre-trained general decision-making strategy is as follows: each game, the agent randomly selects an expert strategy as an opponent to compete against until the agent's general decision-making strategy reaches a set level (the agent's general decision-making strategy has a certain competitive ability, and the specific set level can be measured by the set win rate. For example, when the agent's win rate reaches 80%, the training stops, and the general decision-making strategy is obtained).
[0047] Step 2: Determine whether the confrontation between the red and blue agents has terminated based on preset conditions. If it has terminated, the confrontation ends. If it has not terminated, collect the feature-action data pairs of the blue agent during the confrontation, and construct the first feature-action data pair set by the feature-action data pairs corresponding to each expert strategy selected by the blue agent, and store it in the data cache pool. Specifically:
[0048] The preset conditions for determining whether the confrontation between the red and blue agents has ended include at least the following: reaching the required number of confrontation rounds (once the number of confrontation rounds is reached, the red and blue agents will no longer engage in confrontation); if the confrontation has not ended, feature-action data pairs of the blue agent are collected during the confrontation between the red and blue agents in step 1. The first feature-action data pair set is formed by the expert strategy selected by the blue agent each time, based on the expert strategy selected by the blue agent each time. The features in the feature-action data pair include at least relative distance, relative angle, relative altitude, and relative speed, and the actions in the feature-action data pair include at least left cut, right cut, climb, dive to the upper left, lower left, upper right, lower right, and level flight.
[0049] Step 3: Determine whether the number of first feature-action data pairs in the data cache pool is greater than the preset first threshold. If it is greater than the first threshold, proceed to step 4; otherwise, return to step 2. The specific value of the first threshold is not limited and can be set according to the actual situation.
[0050] Step 4: Input the corresponding features from each first feature-action data pair set into the trained opponent policy recognition model to obtain the predicted action. Compare the predicted action with the actions in the first feature-action data pair set to obtain the prediction accuracy of each opponent policy recognition model. Each opponent policy recognition model is trained based on the corresponding second feature-action data pair set. The second feature-action data pair set is the pre-trained feature-action data pair set of the blue team agent in the process of adversarial between dedicated decision-making strategies and expert strategies, specifically:
[0051] like Figure 2 As shown, the training process of the dedicated decision-making strategy is as follows: the agent (autonomous decision-making) confronts each expert strategy in turn, and obtains the dedicated decision-making strategy that can overcome the corresponding expert strategy in turn (that is, each dedicated decision-making strategy corresponds to one expert strategy. When all dedicated decision-making strategies reach a certain level, the specific level of each dedicated decision-making strategy can be measured by the set win rate. For example, when the win rate of the agent reaches 80%, the training stops and the dedicated decision-making strategy corresponding to each expert strategy is obtained).
[0052] like Figure 4 As shown, the training process for each opponent strategy identification model is as follows:
[0053] Step 4.1: Match the pre-trained dedicated decision-making strategies one-to-one with the corresponding expert strategies in N rounds of adversarial training. During the adversarial training, collect the set of second feature-action data pairs of the blue team agents using the expert strategies. All dedicated decision-making strategies are denoted as follows: (Dedicated decision-making strategy pool), expert strategy pool denoted as Each set of second feature-action data pairs is denoted as The set of all second-feature-action data pairs is denoted as Where, p i Let e represent the i-th specific decision strategy. i Let D represent the i-th expert strategy. i Let N represent the set of second feature-action data pairs collected during the i-th expert strategy adversarial process. E N represents the number of expert strategies in the expert strategy pool or the total number of dedicated decision-making strategies. i This represents the total number of second feature-action data pairs, where j represents the j-th second feature-action data pair. Let represent the feature value of the j-th second feature-action data pair collected during the i-th expert strategy adversarial process, and Represents d-dimensional features, Represents one-dimensional features. This represents the action value in the j-th second feature-action data pair collected during the i-th expert strategy adversarial process;
[0054] It should be noted that each of the obtained dedicated decision-making strategies (adopted by the red agent) will be used to compete against the corresponding expert strategies (adopted by the blue agent) in N rounds. During the competition, feature-action data pairs of the blue agent will be collected, and the feature-action data pairs of the blue agent corresponding to each dedicated decision-making strategy in the competition will be used to form a second feature-action data pair set.
[0055] Step 4.2: For any set D of second feature-action data pairs i The missing values and outliers are processed sequentially to obtain the training dataset. And the training dataset As a node;
[0056] Step 4.3: First, determine whether the current node or the node after the split is the node to be split (generally the first node, i.e., the training dataset). This node is assumed to be a node to be split, and the judgment conditions include: all actions in the feature-action data pairs in this node belong to the same action category, the number of feature-action data pairs in this node is less than a preset third threshold, and the number of actions in any category of the feature-action data pairs in this node is greater than a preset fourth threshold. If any one of these three judgment conditions is met, it is not a node to be split, and step 4.7 is executed; if none of these conditions are met, it is a node to be split, and step 4.4 is executed. (The specific values of each threshold are not limited and can be set according to the actual situation).
[0057] Step 4.4: Set a preset number of separation values for all features in all feature-action data pairs in the node to be split, according to a preset method;
[0058] It should be noted that since the separator value is the separator value of the feature, taking the feature of relative distance as an example, for one node to be split, all feature values are: 10KM, 20KM, 30KM, 40KM... (sort these features from largest to smallest). The separator value is set as follows: select two adjacent feature values, calculate the average value, and use the average value as one of the separator values. There is no limit to the number of separator values set.
[0059] Step 4.5: For each feature in the node to be split, traverse all the separator values, calculate the Gini coefficient value of each separator value, and select the separator value corresponding to the smallest Gini coefficient value as the first optimal separator value for that feature.
[0060] The formula for calculating the Gini coefficient is as follows:
[0061]
[0062] in, Indicated by feature f j To divide features, with The separator value is the node to be split. The Gini coefficient value for segmentation, V represents the value based on feature f. j and separator value The number of child nodes obtained after splitting. Indicates the node to be split The number of all feature-action data pairs in the data. This represents the number of feature-action data pairs in the v-th child node of V. Represents the v-th child node The Gini coefficient value, |Y v | represents the number of action categories in the feature-action data pair of the v-th child node. This represents the proportion of the number of features belonging to the kth action category in the feature-action data pair of the vth child node out of the total number of action categories.
[0063] Step 4.6: Then, iterate through all the first optimal separator values of all features in the node to be split, and select the feature corresponding to the smallest Gini coefficient value and the first optimal separator value from all the first optimal separator values as the optimal feature f of the node to be split. * Second optimal separation value The node to be split is then divided using the optimal feature and the second optimal separation value, as shown in the following formula:
[0064]
[0065] Where F represents the training dataset The set of all features in;
[0066] Step 4.7: Repeat steps 4.3-4.6 (determine whether each node after splitting is a node to be split) until there are no more nodes to be split, thus obtaining the decision tree, and use the decision tree as the trained adversary strategy recognition model.
[0067] Step 5: Determine whether the prediction accuracy of each opponent strategy identification model is greater than the preset second threshold. If it is, proceed to step 6; otherwise, clear the data cache pool and return to step 2.
[0068] Step 6: Select the opponent strategy identification model with the highest prediction accuracy, then find the expert strategy adopted by the blue agent during the training process of the opponent strategy identification model, and finally replace the strategy of the red agent with a pre-trained special decision-making strategy that can counter the expert strategy (i.e., the special decision-making strategy obtained in step 4), thereby completing the strategy switching, and then return to step 2.
[0069] Since the red agent has no way of knowing the strategy adopted by the blue agent at the beginning, it adopts a general decision-making strategy to compete against the blue agent. After detecting the specific strategy adopted by the blue agent, it enters the strategy adaptive switching stage, which can adaptively switch strategies according to the identified blue agent strategy to ensure the ability to compete.
[0070] This adaptive strategy switching method for aerial game adversarial competition uses expert strategies of different styles as training opponents. Through game adversarial training, it obtains specialized and general decision-making strategies, thereby enriching the decision-making algorithm pool. It uses specialized decision-making strategies to compete against expert strategies, and trains the opponent strategy recognition model with the feature-action data of expert strategies during the adversarial process. This enables the opponent strategy recognition model to effectively identify the opponent's strategy and switch to the corresponding strategy, avoiding the decline of the local adversarial capability due to changes in the opponent's strategy, and thus improving the adversarial capability.
[0071] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0072] The embodiments described above are merely specific and detailed examples of the embodiments described in this application, and should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this patent application should be determined by the appended claims.
Claims
1. A strategy adaptive switching method for aerial game confrontation, characterized in that: The adaptive strategy switching method for aerial game confrontation includes: Step 1: First, initialize the adversarial environment. The blue team agent randomly selects an expert policy from the pre-built expert policy pool according to the preset number of rounds to engage in adversarial battles. The red team agent uses a pre-trained general decision-making policy to engage in adversarial battles. Step 2: Determine whether the confrontation between the red and blue agents has ended based on the preset conditions. If it has ended, the confrontation ends. If it has not ended, collect the feature-action data pairs of the blue agent during the confrontation and construct the first feature-action data pair set by the feature-action data pairs corresponding to the expert strategy selected by the blue agent each time, and store them in the data cache pool. Step 3: Determine whether the number of first feature-action data pairs in the data cache pool is greater than the preset first threshold. If it is greater than the first threshold, proceed to step 4; otherwise, return to step 2. Step 4: Input the corresponding features in each first feature-action data pair set into the trained opponent strategy recognition model to obtain the predicted action. Compare the predicted action with the action in the first feature-action data pair set to obtain the prediction accuracy of each opponent strategy recognition model. Each opponent strategy recognition model is trained based on the corresponding second feature-action data pair set. The second feature-action data pair set is the feature-action data pair set of the blue agent in the process of adversarial between the dedicated decision-making strategy and the expert strategy. Step 5: Determine whether the prediction accuracy of each opponent strategy identification model is greater than the preset second threshold. If it is, proceed to step 6; otherwise, clear the data cache pool and return to step 2. Step 6: Select the opponent strategy identification model with the highest prediction accuracy, then find the expert strategy adopted by the blue agent during the training process of the opponent strategy identification model, and finally replace the strategy of the red agent with a pre-trained special decision-making strategy that can counter the expert strategy, thus completing the strategy switching.
2. The strategy adaptive switching method for aerial game confrontation as described in claim 1, characterized in that: The initialization of the adversarial environment includes at least: Initialize the initial position, height, velocity, and angle of the red and blue agents in the battle.
3. The strategy adaptive switching method for aerial game confrontation as described in claim 1, characterized in that: The expert strategies include at least one-sided offensive tactics, two-sided offensive tactics, cross-attack tactics, pincer attack tactics, defensive offensive tactics, and S-shaped defensive tactics.
4. The strategy adaptive switching method for aerial game confrontation as described in claim 1, characterized in that: The training process for the general decision-making strategy is as follows: Each game, the agent randomly selects an expert strategy as its opponent to compete against until the agent's general decision-making strategy reaches a set level.
5. The strategy adaptive switching method for aerial game confrontation as described in claim 1, characterized in that: The preset conditions for determining whether the confrontation between the red and blue agents has ended include at least the number of rounds in which the confrontation has been reached.
6. The strategy adaptive switching method for aerial game confrontation as described in claim 1, characterized in that: The training process for the dedicated decision-making strategy is as follows: The agent engages in confrontation with each expert strategy in turn, and in turn obtains a special decision-making strategy that can counter the corresponding expert strategy.
7. The strategy adaptive switching method for aerial game confrontation as described in claim 1, characterized in that: The training process for each opponent strategy identification model is as follows: Step 4.1: Match the pre-trained dedicated decision-making strategies one-to-one with the corresponding expert strategies in N rounds of adversarial training. During the adversarial training, collect the second feature-action data pairs of the agents using the expert strategies. All dedicated decision-making strategies are denoted as follows: The expert strategy pool is denoted as Each set of second feature-action data pairs is denoted as The set of all second-feature-action data pairs is denoted as Where, p i Let e represent the i-th specific decision strategy. i Let D represent the i-th expert strategy. i Let N represent the set of second feature-action data pairs collected during the i-th expert strategy adversarial process. E N represents the number of expert strategies in the expert strategy pool or the total number of dedicated decision-making strategies. i This represents the total number of second feature-action data pairs, where j represents the j-th second feature-action data pair. Let represent the feature value of the j-th second feature-action data pair collected during the i-th expert strategy adversarial process, and Represents d-dimensional features, Represents one-dimensional features. This represents the action value in the j-th second feature-action data pair collected during the i-th expert strategy adversarial process; Step 4.2: For any set D of second feature-action data pairs i The missing values and outliers are processed sequentially to obtain the training dataset. And the training dataset As a node; Step 4.3: First, determine whether the current node or the partitioned node is a node to be split. The determination conditions include: all actions in the feature-action data pairs in the node belong to the same action category; the number of feature-action data pairs in the node is less than a preset third threshold; and the number of actions in any category of the feature-action data pairs in the node is greater than a preset fourth threshold. If any one of the three determination conditions is met, it is not a node to be split, and step 4.7 is executed. If none of the conditions are met, it is a node to be split, and step 4.4 is executed. Step 4.4: Set a preset number of separation values for all features in all feature-action data pairs in the node to be split, according to a preset method; Step 4.5: For each feature in the node to be split, traverse all the separator values, calculate the Gini coefficient value of each separator value, and select the separator value corresponding to the smallest Gini coefficient value as the first optimal separator value for that feature. The formula for calculating the Gini coefficient is as follows: in, Indicated by feature f j To divide features, with The separator value is the node to be split. The Gini coefficient value for segmentation, V represents the value based on feature f. j and separator value The number of child nodes obtained after splitting. Indicates the node to be split The number of all feature-action data pairs in the data. This represents the number of feature-action data pairs in the v-th child node of V. Represents the v-th child node The Gini coefficient value, |Y v | represents the number of action categories in the feature-action data pair of the v-th child node. This represents the proportion of the number of features belonging to the kth action category in the feature-action data pair of the vth child node out of the total number of action categories. Step 4.6: Then, iterate through all the first optimal separator values of all features in the node to be split, and select the feature corresponding to the smallest Gini coefficient value and the first optimal separator value from all the first optimal separator values as the optimal feature f of the node to be split. * Second optimal separation value The node to be split is then divided using the optimal feature and the second optimal separation value, as shown in the following formula: Where F represents the training dataset The set of all features in; Step 4.7: Repeat steps 4.3-4.6 until there are no more nodes to be split, and obtain the decision tree. Use the decision tree as the trained adversary strategy recognition model.
8. The strategy adaptive switching method for aerial game confrontation as described in claim 1, characterized in that: The features in the feature-action data pair include at least relative distance, relative angle, relative altitude, and relative speed, and the actions in the feature-action data pair include at least left cut, right cut, climb, dive, upper left flight, lower left flight, upper right flight, lower right flight, and level flight.