A computer war game offensive mission planning method and system based on ant colony algorithm
The computer wargame offensive task planning is carried out through the ant colony algorithm, which solves the problem of a single task mode of the agent, and realizes that the agent can learn and find the optimal offensive route with the assistance of the unmanned brain, dynamically adjusts the path, and improves the authenticity and efficiency of wargame deduction.
Patent Information
- Application Number
- CN202210721117.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-06-24
AI Technical Summary
The existing computer wargame intelligent body has a single task mode and a fixed route, which does not conform to the real battlefield environment, making it difficult to achieve intelligent action and task planning.
Ant colony algorithm is used to plan computer wargame offensive tasks, and through map information modeling, enemy unit information modeling and path generation, the ant colony algorithm is used to generate the optimal offensive route, and dynamically adjust the offensive path.
It realizes that computer wargame agents can learn and find the optimal attack strategy with the help of unmanned brains, dynamically adjust the offensive path, conform to the real battlefield environment, and improve the efficiency and rationality of task decisions.
Smart Images

Figure CN115186578B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer war game simulation, and in particular to a computer war game offensive task planning method and system based on an ant colony algorithm. Background Art
[0002] Existing computer wargame agents only have mature intelligent algorithms for simple hexagonal path planning. When faced with complex tasks like mission planning and target selection, existing algorithms alone cannot achieve intelligent action. Human brain-assisted selection is essential, resulting in low intelligence and prone to bugs. In this scenario, current agent mission planning is typically pre-set by the human brain. These pre-set, fixed tasks suffer from a single mission model and a fixed route that doesn't change over the course of the game. As the number of games increases, once the player has a sufficient understanding of the scenario, they can even memorize the agent's next move. This clearly doesn't align with a realistic battlefield environment and makes wargame simulations difficult to achieve. Summary of the Invention
[0003] In response to the problems that existing computer wargame agents have a single task mode, a fixed route that does not change as the game progresses, etc., which does not conform to the real battlefield environment and makes it difficult to achieve the purpose of wargame simulation, the present invention proposes a computer wargame offensive task planning method and system based on ant colony algorithm. The ant colony algorithm is innovatively applied to computer wargame offensive task planning, making the task decision-making and planning of wargame agents more efficient and reasonable.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] In one aspect, the present invention provides a computer war game offensive mission planning method based on an ant colony algorithm, comprising:
[0006] Step 1: Map information modeling: First, rasterize the map to convert terrain information into movement value consumption information;
[0007] Step 2: Enemy unit information modeling: The threat area of the discovered enemy units is mapped on the map, and when the computer war game passes through this area, the pheromone volatility, i.e., the ρ value, is adjusted upward;
[0008] Step 3: Use the ant colony algorithm to generate the path for departure at that moment.
[0009] Furthermore, the step 2 includes:
[0010] When node i is located in the enemy non-threat zone, the ρ value is in the range of [0.2, 0.5]; when it is in the enemy warning zone, the ρ value is adjusted to 0.9; when it is in the enemy patrol zone, the ρ value is adjusted to 1.
[0011] Furthermore, the step 3 includes:
[0012] Step 3.1: Calculate the probability of computer chess k moving from the current node i to the next node j according to the following formula: And iterate over all nodes:
[0013]
[0014] Among them, η ij (t) is the heuristic function, which represents the size of the heuristic information when the computer game moves from node position i to node position j at time t; τ ij (t) represents the pheromone concentration on path ij at time t; allowk is the set of visited locations of computer game k; α is the pheromone coefficient; β is the heuristic function coefficient;
[0015] Step 3.2: After each iteration, update the pheromone concentration on each location path according to the following formula:
[0016] τ ij (t+1)=(1-ρ)*τ ij (t)+Δτ ij
[0017]
[0018] τ ij (t+1) represents the pheromone concentration on path ij at time t+1; ρ represents the volatility of pheromone; Δτ ij It represents the total pheromone concentration left by each computer war game operator after passing through the ij path; represents the pheromone concentration left by the computer war game operator k after passing through the ij path;
[0019]
[0020] Where Q is the pheromone constant, L k is the total length of the path traversed by the computer war game operator k;
[0021] Step 3.3, determine whether the iteration termination condition is met. If so, output the optimal attack route at that moment. If not, go to step 3.1.
[0022] Another aspect of the present invention provides a computer war game offensive mission planning system based on an ant colony algorithm, comprising:
[0023] The map information modeling module is used for map information modeling: first, the map is rasterized to convert the terrain information into movement value consumption information;
[0024] The enemy unit information modeling module is used for enemy unit information modeling: the threat area of the discovered enemy unit is mapped on the map, and the pheromone volatility, i.e., the ρ value, is adjusted when the computer war game passes through this area;
[0025] The path generation module is used to generate the path for departure at that moment using the ant colony algorithm.
[0026] Furthermore, the enemy unit information modeling module is specifically used to:
[0027] When node i is located in the enemy non-threat zone, the ρ value is in the range of [0.2, 0.5]; when it is in the enemy warning zone, the ρ value is adjusted to 0.9; when it is in the enemy patrol zone, the ρ value is adjusted to 1.
[0028] Furthermore, the path generation module includes:
[0029] The transition probability calculation module is used to calculate the probability of the computer chess k moving from the current node i to the next node j according to the following formula: And iterate over all nodes:
[0030]
[0031] Among them, η ij (t) is the heuristic function, which represents the size of the heuristic information when the computer game moves from node position i to node position j at time t; τ ij (t) represents the pheromone concentration on path ij at time t; allowk is the set of visited locations of computer game k; α is the pheromone coefficient; β is the heuristic function coefficient;
[0032] The pheromone update module is used to update the pheromone concentration on each location path according to the following formula after each iteration:
[0033] τ ij (t+1)=(1-ρ)*τ ij (t)+Δτ ij
[0034]
[0035] τ ij (t+1) represents the pheromone concentration on path ij at time t+1; ρ represents the volatility of pheromone; Δτ ij It represents the total pheromone concentration left by each computer war game operator after passing through the ij path; represents the pheromone concentration left by the computer war game operator k after passing through the ij path;
[0036]
[0037] Where Q is the pheromone constant, L k is the total length of the path traversed by the computer war game operator k;
[0038] The judgment module is used to determine whether the iteration termination condition is met. If so, it outputs the optimal attack route at that moment. If not, it switches to the transition probability calculation module.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] The present invention enables computer wargame agents to self-learn and find optimal attack strategies without human assistance, making their task decision-making and planning more efficient and reasonable. At the start of a game, the agent moves along a random route, gathering situational information and laying down "pheromones." After an initial period of random movement, if a path is identified as optimal, the agent will attack along that path. As the human wargame agent adjusts its strategy, the agent will abandon its original attack path and adopt a new one as the pheromones become diluted, continuously and dynamically adjusting its attack path. With the present invention, the agent no longer follows a fixed path, but instead dynamically adjusts its attack path based on the real-time changing "pheromones," finding the optimal attack plan that better reflects the real battlefield environment and thus achieves the purpose of wargame simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a basic flow chart of a method for planning offensive tasks in a computer war game based on an ant colony algorithm according to an embodiment of the present invention;
[0042] Figure 2 This is a schematic diagram of the architecture of a computer war game offensive mission planning system based on an ant colony algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0044] like Figure 1 As shown, a computer war game offensive mission planning method based on ant colony algorithm includes:
[0045] Step 1, map information modeling: First, rasterize the map and convert the terrain information into movement value consumption information (for details, see Tang Fen, Zhang Xin, You Xiong, Wu Zhiqiang, Li Kunwei. Research on the Design Method of Army Tactical War Game Map [J]. Journal of System Simulation, 2019, 31(05): 869-878. DOI: 10.16182 / j.issn1004731x.joss.17-0164.);
[0046] Step 2: Enemy unit information modeling: The threat area of the discovered enemy units is mapped on the map, and when the computer war game passes through this area, the pheromone volatility, i.e., the ρ value, is adjusted upward;
[0047] Step 3: Use the ant colony algorithm to generate the path for departure at that moment.
[0048] Specifically, step 1 includes:
[0049] Build a working environment, determine the starting point and target point, initialize relevant parameters, rasterize the existing terrain map, and convert the terrain map into an information map, that is, convert terrain information into consumption information of movement value (marked on the edge of the hexagonal grid, indicating the maneuver value or time consumed by moving two hexagonal grids on the same edge).
[0050] Specifically, the step 2 includes:
[0051] Initialize the information and model the known enemy units. Map the threat zones created by discovered enemy units on the map to visualize the enemy's impact on our units. The algorithm adjusts the ρ value as it passes through the threat zone, integrating the enemy unit information with the information map to facilitate information integration. As a possible implementation, when node i is in an enemy non-threat zone, the ρ value is in the range [0.2, 0.5]; when in an enemy alert zone, the ρ value is adjusted to 0.9; and when in an enemy patrol zone, the ρ value is adjusted to 1.
[0052] Specifically, step 3 includes:
[0053] Search for the optimal path. According to the ant colony algorithm, the next node to be moved is selected from the current node. It is affected not only by the information density, but also by the movement consumption between the current node and the surrounding nodes. According to the formula, the transfer probability from the current node to the next node is calculated, and all nodes are traversed from the current node to find the suitable next node.
[0054] To update pheromones, the operator will leave pheromones on the path during the search process. The paths with short distances will have more and more pheromones, but the pheromones will also decrease over time. According to the pheromone concentration formula, the pheromone concentration on each position path is calculated after each iteration, so as to update the pheromones.
[0055] Determine whether the final destination has been reached. If so, the path with the highest pheromone concentration is output. If not, continue to calculate the transfer probability of the next node and traverse all nodes.
[0056] Furthermore, the step 3 includes:
[0057] Step 3.1: Calculate the probability of computer chess k moving from the current node i to the next node j according to the following formula: And iterate over all nodes:
[0058]
[0059] Among them, η ij (t) is the heuristic function, which represents the size of the heuristic information when the computer game moves from node position i to node position j at time t; τ ij (t) represents the pheromone concentration on path ij at time t; allowk is the set of locations visited by computer game k; α is the pheromone coefficient; and β is the heuristic function coefficient. As one possible implementation, the heuristic function coefficient β is in the range [3, 4.5], the pheromone coefficient α is in the range [1, 4], and the total number of operators in the computer game is 1.5 times the number of nodes.
[0060] Step 3.2: After each iteration, update the pheromone concentration on each location path according to the following formula:
[0061] τ ij (t+1)=(1-ρ)*τ ij (t)+Δτ ij
[0062]
[0063] τ ij (t+1) represents the pheromone concentration on path ij at time t+1; ρ represents the volatility of pheromone;
[0064] Specifically, the pheromone concentration left by computer war game (agent operator) k after passing through path ij is calculated according to the following formula:
[0065]
[0066] Where Q is the pheromone constant, L k is the total length of the path traversed by the computer war game operator k. As an implementation method, the value of the pheromone constant Q is in the range [10, 1000].
[0067] In step 3.3, determine whether the iteration termination condition has been met. If so, output the optimal attack route at that moment; otherwise, proceed to step 3.1. Specifically, the route with the highest pheromone concentration is the optimal attack route at that moment. By adjusting the attack time, calculating the pheromone concentration of the optimal route at different times, and establishing a T-τ function (T is time, τ is the pheromone concentration of the path (i.e., path value)), we can intuitively find the optimal attack time, and the optimal attack plan is complete.
[0068] Based on the above embodiments, Figure 2 As shown, another aspect of the present invention provides a computer war game offensive mission planning system based on an ant colony algorithm, comprising:
[0069] The map information modeling module is used for map information modeling: first, the map is rasterized to convert the terrain information into movement value consumption information;
[0070] The enemy unit information modeling module is used for enemy unit information modeling: the threat area of the discovered enemy unit is mapped on the map, and the pheromone volatility, i.e., the ρ value, is adjusted when the computer war game passes through this area;
[0071] The path generation module is used to generate the path for departure at that moment using the ant colony algorithm.
[0072] Furthermore, the enemy unit information modeling module is specifically used to:
[0073] When node i is located in the enemy non-threat zone, the ρ value is in the range of [0.2, 0.5]; when it is in the enemy warning zone, the ρ value is adjusted to 0.9; when it is in the enemy patrol zone, the ρ value is adjusted to 1.
[0074] Furthermore, the path generation module includes:
[0075] The transition probability calculation module is used to calculate the probability of the computer chess k moving from the current node i to the next node j according to the following formula: And iterate over all nodes:
[0076]
[0077] Among them, η ij (t) is the heuristic function, which represents the size of the heuristic information when the computer game moves from node position i to node position j at time t; τ ij (t) represents the pheromone concentration on path ij at time t; allowk is the set of visited locations of computer game k; α is the pheromone coefficient; β is the heuristic function coefficient;
[0078] The pheromone update module is used to update the pheromone concentration on each location path according to the following formula after each iteration:
[0079] τ ij (t+1)=(1-ρ)*τ ij (t)+Δτ ij
[0080]
[0081] τ ij (t+1) represents the pheromone concentration on path ij at time t+1; ρ represents the volatility of pheromone; Δτ ij It represents the total pheromone concentration left by each computer war game operator after passing through the ij path; represents the pheromone concentration left by the computer war game operator k after passing through the ij path;
[0082]
[0083] Where Q is the pheromone constant, L k is the total length of the path traversed by the computer war game operator k;
[0084] The judgment module is used to determine whether the iteration termination condition is met. If so, it outputs the optimal attack route at that moment. If not, it switches to the transition probability calculation module.
[0085] In summary, the present invention enables computer wargame agents to self-learn and find optimal attack strategies without human assistance, making their task decision-making and planning more efficient and reasonable. At the start of a game, the agent will first move along a random route, collecting situational information and laying down "pheromones." After an initial period of random movement, if a path is identified as optimal after analysis, the agent will then attack along that path. As the human wargame agent adjusts its strategy, the agent will abandon its original attack path and adopt a new one as the pheromones become diluted, continuously and dynamically adjusting its attack path. With the present invention, the agent no longer follows a fixed path, but instead dynamically adjusts its attack path based on the real-time changing "pheromones," finding the optimal attack plan that better reflects the real battlefield environment and thus achieves the purpose of wargame simulation.
[0086] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A computer war game offensive mission planning method based on ant colony algorithm, characterized by: include: Step 1: Map information modeling: First, rasterize the map to convert terrain information into movement value consumption information; Step 2: Enemy unit information modeling: The threat area of the discovered enemy units is mapped on the map, and when the computer war game passes through this area, the pheromone volatility, i.e., the ρ value, is adjusted upward; Step 3: Use the ant colony algorithm to generate the path for departure at that moment; The step 3 includes: Step 3.1: Calculate the probability of computer chess k moving from the current node i to the next node j according to the following formula: And iterate over all nodes: Among them, η ij (t) is the heuristic function, which represents the size of the heuristic information when the computer game moves from node position i to node position j at time t; τ ij (t) represents the pheromone concentration on path ij at time t; allowk is the set of visited locations of computer game k; α is the pheromone coefficient; β is the heuristic function coefficient; Step 3.2: After each iteration, update the pheromone concentration on each location path according to the following formula: t ij (t+1)=(1-ρ)*τ ij (t)+Δτ ij τ ij (t+1) represents the pheromone concentration on path ij at time t+1; ρ represents the volatility of pheromone; Δτ ij represents the total pheromone concentration left by each computer war game operator after passing through the ij path; represents the pheromone concentration left by the computer war game operator k after passing through the ij path; Where Q is the pheromone constant, L k is the total length of the path traversed by the computer war game operator k; Step 3.3, determine whether the iteration termination condition is met, if so, output the optimal attack route at that moment, if not, go to step 3.
1.
2. The computer war game offensive mission planning method based on ant colony algorithm according to claim 1 is characterized in that: The step 2 includes: When node i is located in the enemy non-threat zone, the ρ value is in the range of [0.2, 0.5]; when it is in the enemy warning zone, the ρ value is adjusted to 0.9; when it is in the enemy patrol zone, the ρ value is adjusted to 1.
3. A computer war game offensive mission planning system based on ant colony algorithm, characterized by: include: The map information modeling module is used for map information modeling: first, the map is rasterized to convert the terrain information into consumption information of movement value; The enemy unit information modeling module is used for enemy unit information modeling: the threat area of the discovered enemy unit is mapped on the map, and the pheromone volatility, i.e., the ρ value, is adjusted when the computer war game passes through this area; The path generation module is used to generate the path for departure at that moment using the ant colony algorithm; The path generation module includes: The transition probability calculation module is used to calculate the probability of the computer chess k moving from the current node i to the next node j according to the following formula: And iterate over all nodes: Among them, η ij (t) is the heuristic function, which represents the size of the heuristic information when the computer game moves from node position i to node position j at time t; τ ij (t) represents the pheromone concentration on path ij at time t; allowk is the set of visited locations of computer game k; α is the pheromone coefficient; β is the heuristic function coefficient; The pheromone update module is used to update the pheromone concentration on each location path according to the following formula after each iteration: t ij (t+1)=(1-ρ)*τ ij (t)+Δτ ij τ ij (t+1) represents the pheromone concentration on path ij at time t+1; ρ represents the volatility of pheromone; Δτ ij represents the total pheromone concentration left by each computer war game operator after passing through the ij path; represents the pheromone concentration left by the computer war game operator k after passing through the ij path; Where Q is the pheromone constant, L k is the total length of the path traversed by the computer war game operator k; The judgment module is used to determine whether the iteration termination condition is met. If so, it outputs the optimal attack route at that moment. If not, it switches to the transition probability calculation module.
4. The computer war game offensive mission planning system based on ant colony algorithm according to claim 3 is characterized in that: The enemy unit information modeling module is specifically used to: When node i is located in the enemy non-threat zone, the ρ value is in the range of [0.2, 0.5]; when it is in the enemy warning zone, the ρ value is adjusted to 0.9; when it is in the enemy patrol zone, the ρ value is adjusted to 1.
Citation Information
Patent Citations
AGV path planning method based on improved ant colony algorithm
CN113093724A