A hexagonal grid-based wargame path planning method and device and a storage medium
By using a hexagonal grid-based path planning method and combining battlefield situation factors to calculate wargaming paths, the problem of inaccurate path selection in traditional algorithms is solved, and the adaptability of path planning and decision support capabilities of the wargaming system are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NO 15 INST OF CHINA ELECTRONICS TECH GRP
- Filing Date
- 2025-06-17
- Publication Date
- 2026-07-14
Smart Images

Figure CN120875019B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wargaming technology, and in particular to a method, apparatus and storage medium for wargaming path planning based on a hexagonal grid. Background Technology
[0002] Traditional path planning algorithms construct coordinate space mappings using regular quadrilateral grids and employ Euclidean distance as the evaluation function for planning. However, in wargaming, the selection of piece paths is influenced by factors such as terrain, topography, elevation, and the deployment of both sides. Therefore, using a single Euclidean distance as the evaluation function for coordinate points cannot fully account for the impact of battlefield situation on path planning, and thus fails to meet the path planning requirements of wargaming. Therefore, how to accurately and simply implement path planning for wargaming has become an urgent problem to be solved. Summary of the Invention
[0003] This invention provides a method, apparatus, and storage medium for planning wargame simulation paths based on a hexagonal grid, in order to solve the problem that existing methods cannot accurately and simply plan wargame simulation paths.
[0004] In a first aspect, the present invention provides a wargaming path planning method based on a hexagonal grid. The method includes: discretizing the battlefield space using a hexagonal grid to construct a battlefield environment model, wherein the battlefield environment model includes geographical elements of the battlefield space and enemy deployment; based on the battlefield environment model, calculating the estimated cost from the starting node to each extended node under the current node through an evaluation function, starting from the starting node, to determine the path with the minimum estimated cost from the starting node to the ending node; using the calculated path with the minimum estimated cost from the starting node to the ending node as the optimal wargaming path, and making operational decisions based on this optimal wargaming path; wherein the evaluation function... , This is the influence factor on maneuver speed, used to evaluate the speed from the starting node to the extended node. The influence of environmental factors on the movement speed of chess pieces. Weighting is assigned to the influence of maneuver speed; This is the path direction influence factor, used to evaluate the influence from the starting node to the extension node. The influence of path direction, The path direction affects the weight; Deploy influence factors for the enemy to evaluate the process from the starting node to the extended node. The impact of enemy deployments, The impact weight of enemy deployments.
[0005] Optionally, the step of discretizing the battlefield space based on a hexagonal grid to construct a battlefield environment model includes: constructing a hexagonal grid on the battlefield space, wherein the hexagonal grid is a coordinate system with the east-west direction as the X-axis, the north-south direction as the Y-axis, and the east and north directions as positive directions, and the origin coordinates are (0,0); describing the geographical elements of the battlefield space and the enemy deployment on the hexagonal grid to construct the battlefield environment model.
[0006] Optionally, ,in, The influence of terrain on maneuver speed; The influence factor of ground features on maneuver speed; The influence factor of elevation on maneuver speed; The influence of weather on vehicle speed; The influence factor of visibility on maneuver speed The influence factor of the control zone on maneuver speed;
[0007] Wherein, the direction weight It is the difference between the first slope and the second slope. The first slope is the slope of the straight line formed between the starting node and the ending node, and the second slope is the slope of the straight line formed between the starting node and the i-th extended node. n is the total number of all extended nodes from the starting node to the extended node n.
[0008] ,in, The influencing factor is the type of military unit, which includes one or more of the following: infantry, artillery, engineers, armored forces, and air defense forces. The factor influencing troop level includes army, division, regiment, battalion, company, platoon, or squad. The life value influencing factor is the current damage level of the enemy forces. The relative position influence factor refers to the distance between the current expansion node and the enemy's position node. , and All are weighting coefficients.
[0009] Optionally, calculating the direction weights includes: setting the starting node coordinates as ( The coordinates of the end node are ( The coordinates of the extended node corresponding to the current node are ( );
[0010] Calculate the slope of the straight line formed between the start node and the end node. And calculate the slope of the straight line formed between the starting node and the extended node n. ;
[0011] This is used to measure the value of path direction.
[0012] Optionally, before calculating the slope of the straight line formed between the starting node and the extended node, the method further includes: performing an input format conformity judgment on the center point coordinates of the starting node, the center point coordinates of the ending node, and the center point coordinates of the extended node corresponding to the current node.
[0013] The input format conformity judgment for the center point coordinates of the starting node, the ending node, and the center point coordinates of the extended node corresponding to the current node includes:
[0014] Based on the center point of the extended node x Even or odd coordinates, relative to the center point coordinates of the current extended node ( Corrections will be made:
[0015]
[0016] if Then exchange ( )and( ),make .
[0017] Optionally, based on the battlefield environment model, starting from the starting node, the estimated cost from the current node to each extended node under the current node is calculated step by step using an evaluation function, thereby determining the path with the minimum estimated cost from the starting node to the ending node.
[0018] The estimated cost from the starting node to each of the extended nodes under the starting node is calculated using the evaluation function. The extended node with the smallest estimated cost is taken as the current node, and the estimated cost from the current node to each of the extended nodes under it is further calculated until the path with the smallest estimated cost from the starting node to the ending node is obtained.
[0019] Optionally, the estimated cost from the starting node to each extended node under the starting node is calculated using an evaluation function. The extended node with the smallest estimated cost is selected as the current node, and the estimated cost from the current node to each extended node under it is further calculated until the path with the smallest estimated cost from the starting node to the ending node is obtained, including:
[0020] Set up an open table and a close table. The open table is used to store nodes that need to be expanded, and the close table is used to store nodes that have been fully expanded.
[0021] Calculate all extended nodes of the starting node and store the calculated extended nodes in the open list;
[0022] The path cost of the extended nodes corresponding to the current node in the open table is calculated sequentially using the evaluation function. The node with the minimum path cost is then placed in the close table. The extended nodes of the node with the minimum path cost are then obtained and stored in the open table. The estimated cost of each newly added extended node in the open table is then calculated. This process is repeated to calculate the minimum cost path from the starting node to the ending node. Finally, the path with the minimum cost is obtained by backtracking upwards from the ending node to the parent node.
[0023] Optionally, the step of using an evaluation function to sequentially calculate the path cost of the expanded nodes corresponding to the current node in the open table, and placing the node with the minimum path cost into the close table, includes:
[0024] Suppose that node B is an extension node under the current node A. If node B is already in the open list, and the estimated cost of node B is... Then update the valuation of node B in the open table to... And update node B's parent node to node A, reorder the open list, if node B is already in the close list, and Then update the valuation of node B in the open table to... Update the parent node of node B to node A, remove node B from the close list, and reorder the open list; if node B, the result of the expansion of node A, is not in either the open or close list, add node B to the open list, calculate its estimated cost, and reorder the open list.
[0025] The calculation of the extended node B under the current node A includes:
[0026] Based on the hexagonal grid arrangement, in the coordinate system, for the center point coordinates (x, y) of the current node A, the center point coordinates (x, y+1) of the extended node B in the first direction, and the center point coordinates (x, y-1) of the extended node B in the fourth direction.
[0027] When y is odd, the coordinates of the center point of the extended node B in the second direction are (x+1, y+1), the coordinates of the center point of the extended node B in the third direction are (x+1, y), the coordinates of the center point of the extended node B in the fifth direction are (x-1, y), and the coordinates of the center point of the extended node B in the sixth direction are (x-1, y+1).
[0028] When y is even, the coordinates of the center point of the extended node B in the second direction are (x+1, y), the coordinates of the center point of the extended node B in the third direction are (x+1, y-1), the coordinates of the center point of the extended node B in the fifth direction are (x-1, y-1), and the coordinates of the center point of the extended node B in the sixth direction are (x-1, y).
[0029] Secondly, the present invention provides a wargaming path planning device based on a hexagonal grid. The device includes: a construction unit for discretizing the battlefield space based on a hexagonal grid to construct a battlefield environment model, wherein the battlefield environment model includes geographical elements of the battlefield space and enemy deployment; a processing unit for calculating, based on the battlefield environment model, the estimated cost from the current node to each extended node below the current node through an evaluation function, step by step, determining the path with the minimum estimated cost from the starting node to the ending node; and a decision-making unit for using the calculated path with the minimum estimated cost from the starting node to the ending node as the optimal wargaming path and making operational decisions based on the optimal wargaming path; wherein the evaluation function... , This is the influence factor on maneuver speed, used to evaluate the speed from the starting node to the extended node. The influence of environmental factors on the movement speed of chess pieces. Weighting is assigned to the influence of maneuver speed; This is the path direction influence factor, used to evaluate the influence from the starting node to the extension node. The influence of path direction, The path direction affects the weight; Deploy influence factors for the enemy to evaluate the process from the starting node to the extended node. The impact of enemy deployments, The impact weight of enemy deployments.
[0030] Thirdly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described hexagonal grid-based wargaming path planning methods.
[0031] The beneficial effects of this invention are as follows:
[0032] The wargaming simulation of this invention is based on the spatial discretization characteristics of a hexagonal grid. At the same time, the influence of the battlefield situation on the value of path nodes is added to the evaluation function, thereby improving the adaptability of the algorithm in the wargaming simulation system and the accuracy of path planning, and ultimately providing effective support for assisting combat decision-making.
[0033] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0034] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0035] Figure 1 This is a flowchart illustrating a wargaming path planning method based on a hexagonal grid, provided in an embodiment of the present invention.
[0036] Figure 2 This is a schematic diagram of the constructed hexagonal grid index provided in an embodiment of the present invention;
[0037] Figure 3 This is a flowchart illustrating a wargaming path planning method based on a hexagonal grid, provided in an embodiment of the present invention.
[0038] Figure 4 This is a schematic diagram of a wargaming path planning device based on a hexagonal grid, provided in an embodiment of the present invention. Detailed Implementation
[0039] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of the invention.
[0040] To address the limitations of traditional path planning algorithms in spatial index construction and evaluation function design that fail to meet the requirements of wargame path planning, this invention provides a hexagonal grid-based wargame path planning method. (See attached document.) Figure 1 The method described in this embodiment of the invention includes:
[0041] S101. Based on the hexagonal grid, the battlefield space is discretized to construct a battlefield environment model;
[0042] The battlefield environment model described in this embodiment of the invention includes geographical elements of the battlefield space and enemy deployment.
[0043] In other words, the embodiments of the present invention address the influence of terrain, topography, elevation, and the combat deployment of both sides on the selection of chess piece paths. By comprehensively considering various geographical factors such as point features and features along the border, as well as the influence of the enemy's deployment, a battlefield environment model is constructed, thereby enabling comprehensive, integrated, and reasonable planning of war game simulation paths.
[0044] In specific implementation, the embodiment of the present invention constructs a hexagonal grid on the battlefield space. The hexagonal grid is a coordinate system with the east-west direction as the X-axis, the north-south direction as the Y-axis, and the east and north directions as positive directions, with the origin coordinates being (0, 0). Then, the geographical elements of the battlefield space and the enemy deployment are described on the hexagonal grid to construct the battlefield environment model.
[0045] Specifically, this embodiment of the invention is based on the arrangement characteristics of a hexagonal grid. In the coordinate system, for any hexagonal grid (x, y), its coordinates in the first direction 1 are (x, y+1), its coordinates in the fourth direction are (x, y-1), and the coordinates in the other four directions are related to the parity of y. When y is odd, its coordinates in the second direction 2 are (x+1, y+1), in the third direction 3 are (x+1, y), in the fifth direction 5 are (x-1, y), and in the sixth direction 6 are (x-1, y+1); when y is even, its coordinates in the second direction 2 are (x+1, y), in the third direction 3 are (x+1, y-1), in the fifth direction 5 are (x-1, y-1), and in the sixth direction 6 are (x-1, y), and so on. Figure 2 As shown.
[0046] S102. Based on the battlefield environment model, starting from the starting node, calculate the estimated cost from the current node to each extended node under the current node through the evaluation function, and determine the path with the minimum estimated cost from the starting node to the ending node.
[0047] Specifically, in this embodiment of the invention, the estimated cost from the starting node to each of the extended nodes under the starting node is calculated by an evaluation function. The extended node with the smallest estimated cost is taken as the current node, and the estimated cost from the current node to each of the extended nodes under it is further calculated until the path with the smallest estimated cost from the starting node to the ending node is obtained.
[0048] In a specific implementation, this embodiment of the invention sets up two tables: an open table and a close table. The open table is used to store nodes to be expanded, and the close table is used to store nodes that have been fully expanded.
[0049] Calculate all extended nodes of the starting node and store the calculated extended nodes in the open list;
[0050] The path cost of the extended nodes corresponding to the current node in the open table is calculated sequentially using the evaluation function. The node with the minimum path cost is then placed in the close table. The extended nodes of the node with the minimum path cost are then obtained and stored in the open table. The estimated cost of each newly added extended node in the open table is then calculated. This process is repeated to calculate the minimum cost path from the starting node to the ending node. Finally, the path with the minimum cost is obtained by backtracking upwards from the ending node to the parent node.
[0051] The minimum cost path can be obtained accurately and easily through the above calculations.
[0052] The step of using an evaluation function to sequentially calculate the path cost of the expanded nodes corresponding to the current node in the open table, and placing the node with the minimum path cost into the close table, includes:
[0053] Suppose that node B is an extension node under the current node A. If node B is already in the open list, and the estimated cost of node B is... Then update the valuation of node B in the open table to... And update node B's parent node to node A, reorder the open list, if node B is already in the close list, and Then update the valuation of node B in the open table to... The parent node of node B is updated to node A, node B is removed from the close list, and the open list is reordered. If node B, the result of the expansion of node A, is not in either the open or close list, then node B is added to the open list, its estimated cost is calculated, and the open list is reordered.
[0054] The present invention can effectively ensure that the optimal path is the path with the minimum estimated cost through the above processing method.
[0055] It should be noted that, since the hexagonal grid coordinate index is affected by the parity of the y-axis, the distance between two coordinate grids cannot be simply measured by Euclidean distance. In this invention, the direction weight formed by the slope between two coordinate points and the slope deviation between the start and end points is used instead of the traditional path planning algorithm that uses Euclidean distance as the cost estimate. Specifically, in this embodiment of the invention, the calculation of the extended node B under the current node A includes: based on the arrangement characteristics of a hexagonal grid, in the coordinate system, for the center point coordinates (x, y) of the current node A, the center point coordinates (x, y+1) of the extended node B in the first direction, and the center point coordinates (x, y-1) of the extended node B in the fourth direction; when y is odd, the center point coordinates (x+1, y+1) of the extended node B in the second direction, the center point coordinates (x+1, y) of the extended node B in the third direction, the center point coordinates (x-1, y) of the extended node B in the fifth direction, and the center point coordinates (x-1, y+1) of the extended node B in the sixth direction; when y is even, the center point coordinates (x+1, y) of the extended node B in the second direction, the center point coordinates (x+1, y-1) of the extended node B in the third direction, the center point coordinates (x-1, y-1) of the extended node B in the fifth direction, and the center point coordinates (x-1, y) of the extended node B in the sixth direction.
[0056] The present invention can effectively ensure the accuracy of the final determined optimal path by using the above-described method for determining expansion nodes.
[0057] In specific implementation, the embodiments of the present invention utilize an evaluation function. The calculation will proceed from the starting node, level by level, to estimate the cost from the current node to each extended node under that current node.
[0058] This is the influence factor on maneuver speed, used to evaluate the speed from the starting node to the extended node. The influence of environmental factors on the movement speed of chess pieces; simply put, this invention addresses this by... To calculate the impact of the environment from the starting node to the extended node on the maneuver speed, The influence weight of maneuver speed; specifically, the maneuver speed influence factor in this embodiment of the invention. ,in, The influence of terrain on maneuver speed; The influence factor of ground features on maneuver speed; The influence factor of elevation on maneuver speed; The influence of weather on vehicle speed; The influence factor of visibility on maneuver speed The influence factor of the control zone on the maneuver speed is calculated by weighting factors such as topography, ground features (obstacles and number of paths), elevation, weather, visibility, and control zone in this embodiment of the invention.
[0059] For expansion nodes Its speed influence factor From the starting node to the extended node On the known minimum cost path of the parent node The sum of the motion speed influencing factors of each node, plus the expansion nodes. The influence factor of maneuver speed.
[0060] in, The influence factor of terrain on movement speed is calculated as follows: obtain the movement type and expansion node of the piece. After obtaining the terrain information of the hexagonal grid, the influencing factors are obtained by looking up the table. The specific influence of terrain on maneuver speed is shown in Table 1.
[0061] Table 1 shows the influence of terrain on maneuverability.
[0062]
[0063] The influence factor of terrain features on movement speed is calculated as follows: obtain the movement type and expansion nodes of the piece. After obtaining the information on the features (point features and line features) at the center and edges of the hexagonal grid, the influencing factors are obtained by referring to the table. The specific influence of features on the movement speed is shown in Table 2.
[0064] Table 2 shows the impact of terrain features on maneuver speed.
[0065]
[0066] The influence factor of elevation on maneuver speed is calculated as follows: for every 500 meters increase in elevation difference from the horizontal plane, the influence factor of elevation on maneuver speed increases by 0.1, up to a value of 1.
[0067] The weather-related factor affecting movement speed is calculated by obtaining the piece's movement type and expansion nodes. After obtaining the weather information for the hexagonal grid, the influencing factors are obtained by referring to the table. The specific impact of weather on maneuver speed is shown in Table 3.
[0068] Table 3 shows the impact of weather on vehicle speed.
[0069]
[0070] The visibility factor affects movement speed, and its calculation method is as follows: obtain the movement type and expansion node of the piece. After obtaining the visibility information of the hexagonal grid, the influencing factor is obtained by looking up the table. The specific impact of visibility on maneuver speed is shown in Table 4.
[0071] Table 4 shows the impact of visibility on maneuver speed.
[0072]
[0073] The influence factor of the control zone on the maneuver speed is calculated as follows: First, determine the extended nodes. Whether the hexagonal grid is in the enemy's controlled area or not, the influence factor for non-controlled areas is 0.1. If it is in the enemy's controlled area, the influence factor is obtained by looking up the table according to the enemy's unit type. The specific influence of the controlled area on the movement speed is shown in Table 5.
[0074] Table 5 shows the impact of the control zone on maneuver speed.
[0075] Enemy unit types Impact Factor infantry 0.3 Armored Corps 0.3 artillery 0.1 paratroopers 0.3 … …
[0076] This is the path direction influence factor, used to evaluate the impact of path direction. The path direction influence weight; specifically, the path direction influence factor described in this embodiment of the invention. From the starting node to the extended node Sum of directional weights Wherein, the direction weight It is the difference between the first slope and the second slope, where the first slope is the slope of the straight line formed between the starting node and the ending node, and the second slope is the slope of the straight line formed between the starting node and the i-th extended node, and n is the total number of all extended nodes from the starting node to the n-th extended node; wherein, in this embodiment of the invention, calculating the direction weight includes: setting the coordinates of the starting node as ( The coordinates of the end node are ( The coordinates of the extended node corresponding to the current node are ( ). ); Calculate the slope of the straight line formed between the starting node and the ending node. And calculate the slope of the straight line formed between the starting node and the extended node n. ; This is used to measure the estimated value of path direction. Additionally, because extended coordinates are not strictly coordinates, before calculating the slope of the straight line between the starting node and the extended nodes, it is necessary to check the input format conformity of the center point coordinates of the starting node, the ending node, and the extended node corresponding to the current node; that is, based on the center point of the extended node... x Even or odd coordinates, relative to the center point coordinates of the current extended node ( Corrections will be made:
[0077]
[0078] if Then exchange ( )and( ),make This invention further ensures the accuracy of the battlefield environment model by modifying the extended nodes, thereby ensuring the accuracy of the calculated minimum estimated cost path from the starting node to the ending node as the optimal wargaming simulation path, and ultimately effectively supports combat decision-making.
[0079] Deploy influence factors for the enemy to evaluate the process from the starting node to the extended node. The impact of enemy deployments.
[0080] Specifically, the enemy deployment influence factor in the embodiments of the present invention ,in, The influencing factor is the type of military unit, which includes one or more of the following: infantry, artillery, engineers, armored forces, and air defense forces. The factor influencing troop level includes army, division, regiment, battalion, company, platoon, or squad. The life value influencing factor is the current damage level of the enemy forces. The relative position influence factor refers to the distance between the current expansion node and the enemy's position node. , and All are weighting coefficients.
[0081] Specifically, in this embodiment of the invention, the enemy deployment influence factor is calculated based on the enemy troop type and enemy troop size to measure the enemy deployment influence of the hexagonal grid where the enemy's main combat unit is located or the hexagonal grid in the enemy's controlled area.
[0082] For expansion nodes Its enemy deployment influence factor From the starting node to the extended node On the known minimum cost path of the parent node The sum of the enemy deployment influence factors of each node, plus the expansion nodes. Enemy deployment influencing factors. When expanding nodes If enemy units are present in the corresponding hexagonal grid's own square, adjacent square, and second-to-last adjacent square, calculate the enemy deployment influence factor; otherwise, the enemy deployment influence factor... .
[0083] The troop type influence factor is calculated as follows: Obtain the enemy troop type and refer to the table to obtain the troop type influence factor. Due to reconnaissance detection, if the enemy is an unknown type unit, refer to Table 6 according to "Unknown Type".
[0084] Table 6 is a comparison table of enemy unit types and influence factors.
[0085] Enemy unit types Impact Factor infantry 0.4 Armored Corps 0.5 artillery 0.2 paratroopers 0.3 Unknown type 0.5 … …
[0086] The troop level influence factor is calculated as follows: obtain the enemy troop level, and then look up the troop level influence factor in the table. Due to reconnaissance detection, if the enemy is an unknown level unit, refer to Table 7 according to "Unknown Level".
[0087] Table 7 is a comparison table of enemy force base and impact.
[0088] Enemy unit level Impact Factor camp 0.7 even 0.5 class 0.2 Group 0.1 Unknown level 0.5 … …
[0089] The life value factor is the current damage level of enemy troops, and its calculation method is as follows: Take the percentage of damage currently suffered by the enemy unit. For example, if the enemy unit has suffered 10% damage, then... The value is 0.1.
[0090] The relative position influence factor is determined based on the relative position of the enemy forces and the expansion node n, as shown in Table 8.
[0091] Table 8 shows the comparison between relative location and influence factors.
[0092] relative position Impact Factor Benge 1 Adjacent cells 0.5 Next adjacent cell 0.3
[0093] If there are multiple enemy forces around the extended node n, the enemy deployment influence factor is ultimately the sum of the influence of multiple forces.
[0094] It should be noted that the calculation of the above-mentioned maneuver speed influence factor, path direction influence factor and enemy deployment influence factor is only an example of an embodiment of the present invention. In specific implementation, those skilled in the art can make arbitrary settings according to actual needs, and the present invention does not make specific limitations in this regard.
[0095] S103. The minimum estimated cost path from the starting node to the ending node is calculated as the optimal wargaming path, and operational decisions are made based on this optimal wargaming path.
[0096] In other words, by fully considering the spatial discretization characteristics of wargaming based on hexagonal grids, and by incorporating the impact of battlefield situation on the value of path nodes into the evaluation function, the embodiments of the present invention improve the adaptability of the algorithm in the wargaming system and the correctness of path planning, and ultimately effectively support auxiliary combat decision-making.
[0097] Specifically, the method described in this embodiment of the invention fully considers the spatial discretization characteristics based on hexagonal grids in wargaming, and designs a method for constructing hexagonal grid indexes and expanding the current node, thereby solving the problem that traditional path planning algorithms based on regular quadrilateral grids are difficult to apply on hexagonal grid maps. At the same time, this invention fully considers the impact of battlefield situation on the value of path nodes, and designs an evaluation function based on maneuver speed, path direction, and enemy deployment, thereby improving the adaptability of the algorithm in wargaming systems and the accuracy of path planning, and ultimately effectively supporting auxiliary combat decision-making.
[0098] The following will combine Figure 2 and Figure 3 The method described in the embodiments of the present invention will be explained and illustrated in detail through a specific example:
[0099] First, this embodiment of the invention constructs a hexagonal grid index. In computer wargames, this embodiment uses a hexagonal grid for battlefield spatial discretization and describes various geographical elements of the battlefield space onto the hexagonal grid, forming a battlefield environment model based on the hexagonal grid. In this embodiment, a hexagonal grid coded coordinate system is established with the horizontal axis as the X-axis, the vertical axis as the Y-axis, and the east and north directions as positive directions. See [link to relevant documentation]. Figure 2The origin of the coordinate system is (0, 0). Based on the arrangement of the hexagonal grid, for any hexagonal cell (x, y) in the coordinate system, its coordinates in the first direction 1 are (x, y+1), and its coordinates in the fourth direction 4 are (x, y-1). The coordinates in the other four directions are related to the parity of y. When y is odd, its coordinates in the second direction 2 are (x+1, y+1), in the third direction 3 are (x+1, y), in the fifth direction 5 are (x-1, y), and in the sixth direction 6 are (x-1, y+1). When y is even, its coordinates in the second direction 2 are (x+1, y), in the third direction 3 are (x+1, y-1), in the fifth direction 5 are (x-1, y-1), and in the sixth direction 6 are (x-1, y).
[0100] In wargaming simulations, the selection of piece paths is influenced by factors such as terrain, topography, elevation, and the operational deployments of both sides, making distance an indiscriminate evaluation function for coordinate points. Therefore, this invention proposes an algorithmic evaluation function that comprehensively considers factors such as movement speed, path direction, and enemy deployment.
[0101] in, This is the overall evaluation function, used to represent the distance from the starting node to the node to be expanded. The actual cost; , , These are the weighting coefficients of the corresponding sub-item valuation functions.
[0102] In the embodiments of the present invention This is the influence factor of maneuver speed, used to evaluate the speed from the starting node to the node to be expanded. The influence of environmental factors on the movement speed of chess pieces is such that the higher the value, the greater the adverse impact of terrain on the movement speed. The factors affecting movement speed include terrain, terrain features (obstacles and number of paths), elevation, weather, visibility, and the controlled area. ,in, The influence of terrain on maneuver speed; The influence factors of terrain features on maneuver speed (including the influence of point terrain features, line terrain features, and the number of obstacle paths on maneuver speed). The influence factor of elevation on maneuver speed; The influence of weather on vehicle speed; The influence factor of visibility on maneuver speed This is the influence factor of the control zone on maneuver speed.
[0103] In the embodiments of the present invention This is the path direction impact factor, used to evaluate the impact of path direction, measuring the distance from the starting node to the node to be expanded. The path length, due to the influence of the parity of the y-axis on the hexagonal grid coordinate index, cannot be simply measured by Euclidean distance between two coordinate grids. In this invention, the direction weight is formed by the slope between two coordinate points and the slope deviation between the start and end points; this is the path direction influence factor. From the starting node to the node to be expanded Sum of directional weights:
[0104] in, The calculation methods include:
[0105] First, obtain the starting point of the region ( ), End point coordinates ( The system performs input format conformity checks; specifically, because the adjacency relationships between hexagonal grid indices and rectangular coordinate system indices are different, in order to calculate the slope between two coordinate points, this invention uses the parity of the x-coordinate to determine the slope of the coordinates (…). ), ( ), ( Corrections will be made. ,like Then exchange ( )and( ),make ;
[0106] Then, calculate the slope of the straight line formed between the starting point and the ending point. ; Calculate the slope of the straight line formed by the starting point and the extended node i. ;
[0107] Finally, calculate ,Right now The absolute value of the difference between the two slopes is used to measure the path direction estimate. The larger the difference, the smaller the path direction estimate at that point.
[0108] In the embodiments of the present invention Deploy influence factors for the enemy to evaluate the process from the starting node to the node to be expanded. The impact of enemy deployments is determined by the type and size of enemy troops, measuring the influence factor of enemy deployments on the hexagonal grid where the enemy's main combat unit is located or the hexagonal grid in the enemy's controlled area. The larger the influence factor, the greater the adverse impact of enemy deployments on that hexagonal grid.
[0109] See Figure 3 The hexagonal grid-based wargame path planning method of this invention specifically includes:
[0110] S1. Obtain the starting point of the region ( ), End point coordinates ( The movement types of chess pieces include walking, wheeled, tracked, and flying, etc., in this embodiment of the invention.
[0111] S2. Determine if the input format conforms; if... Then exchange ( )and( ),make Otherwise, proceed directly to the next step;
[0112] S3. Calculate the path area range, ( ), ( ), ( ), ( The rectangular area formed by )
[0113] S4. Initialize the open table and the close table, wherein, in this embodiment of the invention, the open table is used to store nodes to be expanded, and the close table is used to store nodes that have been fully expanded;
[0114] S5. Using the valuation function Calculate the starting point ( The cost is calculated, and the starting point is added to the open table.
[0115] S6. Repeat the following steps for the expanded node:
[0116] S61 checks if the open list is empty. If the open list is empty, path planning fails and the algorithm ends. If the open list is not empty, it retrieves the node A with the lowest estimated cost from the open list. ) is set as the current node, and that node is moved to the close table;
[0117] S62 determines whether node A is the end point. If it is the endpoint, output the optimal path; if it is not the endpoint, determine the extension node A according to S63.
[0118] S63 When y is odd, expand node A ( Given six adjacent hexagonal nodes (x, y+1), (x, y-1), (x+1, y+1), (x+1, y), (x-1, y), and (x-1, y+1), calculate the estimated cost for each of the six nodes. When y is even, expand node A. The six adjacent hexagonal grid nodes are (x, y+1), (x, y-1), (x+1, y), (x+1, y-1), (x-1, y-1), and (x-1, y). Calculate the estimated cost of each of the six nodes.
[0119] S631 If the extended node B is already in the open list, it means that node B has been extended by other nodes, but is not on the current minimum cost path. Therefore, it is necessary to compare the current cost estimate of the extended node B. Valuation of the original extended node B ,like This indicates that the original value of the extended node B is lower, so no changes will be made to node B in the open table; if This indicates that the current valuation of node B is lower, and the valuation of node B in the open table needs to be updated to [the appropriate value]. Then update the parent node of node B to node A and reorder the open table;
[0120] S632 If the expanding node B is already in the close list, it means that node B has been expanded by other nodes, and on the current minimum cost path, it is necessary to compare the valuation of the currently expanding node B. Valuation of the original extended node B ,like This indicates that the original value of the extended node B is lower, so no changes will be made to node B in the open and close tables; if This indicates that the current valuation of node B is lower, and the valuation of node B in the open table needs to be updated to [the appropriate value]. Then update the parent node of node B to node A, remove node B from the close table, and reorder the open table;
[0121] S633 If the extended node B is neither in the open list nor the close list, it means that the extended node B is a new extended node. Add the extended node B to the open list, calculate its valuation, and reorder the open list.
[0122] S7. Starting from the target node, trace back up to the parent node of each node to obtain the corresponding minimum cost path, and retain the planned path.
[0123] Overall, the wargaming simulation in this embodiment of the invention is based on the spatial discretization characteristics of a hexagonal grid. At the same time, the influence of the battlefield situation on the value of path nodes is added to the evaluation function, thereby improving the adaptability of the algorithm in the wargaming simulation system and the accuracy of path planning, and ultimately providing effective support for assisting combat decision-making.
[0124] In addition, this invention also provides a wargame simulation path planning device based on a hexagonal grid, see [link to related document]. Figure 4 The device includes:
[0125] The building unit is used to discretize the battlefield space based on a hexagonal grid and construct a battlefield environment model.
[0126] The battlefield environment model described in this embodiment of the invention includes geographical elements of the battlefield space and enemy deployment.
[0127] In specific implementation, the construction unit of this embodiment constructs a hexagonal grid in the battlefield space. The hexagonal grid is a coordinate system with the east-west direction as the X-axis, the north-south direction as the Y-axis, and the east and north directions as positive directions. The origin coordinates are (0, 0). Then, the geographical elements and the enemy deployment are described on the hexagonal grid to construct the battlefield environment model.
[0128] In other words, the embodiments of the present invention address the issue that the selection of chess piece paths is affected by conditions such as terrain, topography, elevation, and the combat deployment of both sides. By comprehensively considering various geographical factors such as features along the border, as well as the influence of the enemy's deployment, a battlefield environment model is constructed, thereby enabling comprehensive, integrated, and reasonable planning of war game simulation paths.
[0129] The processing unit is used to calculate the estimated cost from the starting node to each extended node under the current node through the evaluation function according to the battlefield environment model, starting from the starting node, and determine the path with the minimum estimated cost from the starting node to the ending node.
[0130] In specific implementation, the processing unit in this embodiment of the invention calculates the values from the starting node to each extended node under the starting node using an evaluation function. The estimated cost is used to expand the node with the minimum estimated cost. As the current node, further calculate the values from the current node to each of its extended nodes. The estimated cost is calculated until the path with the minimum estimated cost from the starting node to the ending node is obtained.
[0131] Specifically, the processing unit in this embodiment of the invention is further configured to set up two tables: an open table and a close table. The open table is used to store nodes to be expanded, and the close table is used to store nodes that have been fully expanded.
[0132] Calculate all extended nodes of the starting node and store the calculated extended nodes in the open list;
[0133] The path cost of the extended nodes corresponding to the current node in the open table is calculated sequentially using the evaluation function. The node with the minimum path cost is then placed in the close table. The extended nodes of the node with the minimum path cost are then obtained and stored in the open table. The estimated cost of each newly added extended node in the open table is then calculated. This process is repeated to calculate the minimum cost path from the starting node to the ending node. Finally, the path with the minimum cost is obtained by backtracking upwards from the ending node to the parent node.
[0134] The processing unit of this embodiment can accurately and simply obtain the minimum cost path through the above calculation process.
[0135] The decision-making unit is used to take the calculated minimum estimated cost path from the starting node to the ending node as the optimal wargaming path and make combat decisions based on the optimal wargaming path.
[0136] The evaluation function described in this embodiment of the invention , This is the influence factor on maneuver speed, used to evaluate the speed from the starting node to the extended node. The influence of environmental factors on the movement speed of chess pieces. Weighting is assigned to the influence of maneuver speed; This is the path direction influence factor, used to evaluate the influence from the starting node to the extension node. The influence of path direction, The path direction affects the weight; Deploy influence factors for the enemy to evaluate the process from the starting node to the extended node. The impact of enemy deployments, The impact weight of enemy deployments.
[0137] In specific implementation, in the embodiments of the present invention, This is the influence factor on maneuver speed, used to evaluate the speed from the starting node to the extended node. The influence of environmental factors on the movement speed of chess pieces; simply put, this invention addresses this by... To calculate the impact of environmental factors from the starting node to the extended node on the maneuver speed. The influence weight of maneuver speed; specifically, the maneuver speed influence factor in this embodiment of the invention. ,in, The influence of terrain on maneuver speed; The influence factor of ground features on maneuver speed; The influence factor of elevation on maneuver speed; The influence of weather on vehicle speed; The influence factor of visibility on maneuver speed The influence factor of the control zone on the maneuver speed is: that is, in the embodiments of the present invention, the influence factor of the maneuver speed is calculated by weighting factors such as topography, ground features (obstacles and number of paths), elevation, weather, visibility, and control zone.
[0138] This is the path direction influence factor, used to evaluate the impact of path direction. The path direction influence weight; specifically, the path direction influence factor described in this embodiment of the invention. From the starting node to the extended node Sum of directional weights Wherein, the direction weight It is the difference between the first slope and the second slope, where the first slope is the slope of the straight line formed between the starting node and the ending node, and the second slope is the slope of the straight line formed between the starting node and the i-th extended node, and n is the total number of all extended nodes from the starting node to the n-th extended node; wherein, in this embodiment of the invention, calculating the direction weight includes: setting the coordinates of the starting node as ( The coordinates of the end node are ( The coordinates of the extended node corresponding to the current node are ( ). ); Calculate the slope of the straight line formed between the starting node and the ending node. And calculate the slope of the straight line formed between the starting node and the extended node n. ; This is used to measure the estimated value of path direction. Additionally, because extended coordinates are not strictly coordinates, before calculating the slope of the straight line between the starting node and the extended nodes, it is necessary to check the input format conformity of the center point coordinates of the starting node, the ending node, and the extended node corresponding to the current node; that is, based on the center point of the extended node... x Even or odd coordinates, relative to the center point coordinates of the current extended node ( Corrections will be made:
[0139]
[0140] if Then exchange ( )and( ),make This invention further ensures the accuracy of the battlefield environment model by modifying the extended nodes, thereby ensuring the accuracy of the calculated minimum estimated cost path from the starting node to the ending node as the optimal wargaming simulation path, and ultimately effectively supports combat decision-making.
[0141] Deploy influence factors for the enemy to evaluate the process from the starting node to the extended node. The impact of enemy deployments. Among them, ,in, The influencing factor is the type of military unit, which includes one or more of the following: infantry, artillery, engineers, armored forces, and air defense forces. The factor influencing troop level includes army, division, regiment, battalion, company, platoon, or squad. The life value influencing factor is the current damage level of the enemy forces. The relative position influence factor refers to the distance between the current expansion node and the enemy's position node. , and All are weighting coefficients.
[0142] It should be noted that the calculation of the above-mentioned maneuver speed influence factor, path direction influence factor and enemy deployment influence factor is only an example of an embodiment of the present invention. In specific implementation, those skilled in the art can make arbitrary settings according to actual needs, and the present invention does not make specific limitations in this regard.
[0143] In general, the embodiments of the present invention are This is the influence factor on maneuver speed, used to evaluate the speed from the starting node to the extended node. The influence of environmental factors on the movement speed of chess pieces; simply put, this invention addresses this by... To calculate the impact of terrain on maneuver speed from the starting node to the extended node, The influence weight of maneuver speed; specifically, the maneuver speed influence factor in this embodiment of the invention. ,in, The influence of terrain on maneuver speed; The influence factor of ground features on maneuver speed; The influence factor of elevation on maneuver speed; The influence of weather on vehicle speed; The influence factor of visibility on maneuver speed The influence factor of the control zone on the maneuver speed is calculated by weighting factors such as topography, ground features (obstacles and number of paths), elevation, weather, visibility, and control zone in this embodiment of the invention.
[0144] This is the path direction influence factor, used to evaluate the impact of path direction. The path direction influence weight; specifically, the path direction influence factor described in this embodiment of the invention. From the starting node to the extended node Sum of directional weights Wherein, the direction weight It is the difference between the first slope and the second slope, where the first slope is the slope of the straight line formed between the starting node and the ending node, and the second slope is the slope of the straight line formed between the starting node and the i-th extended node, and n is the total number of all extended nodes from the starting node to the n-th extended node; wherein, in this embodiment of the invention, calculating the direction weight includes: setting the coordinates of the starting node as ( The coordinates of the end node are ( The coordinates of the extended node corresponding to the current node are ( ). ); Calculate the slope of the straight line formed between the starting node and the ending node. And calculate the slope of the straight line formed between the starting node and the extended node n. ; This is used to measure the estimated value of path direction. Additionally, because extended coordinates are not strictly coordinates, before calculating the slope of the straight line between the starting node and the extended nodes, it is necessary to check the input format conformity of the center point coordinates of the starting node, the ending node, and the extended node corresponding to the current node; that is, based on the center point of the extended node... x Even or odd coordinates, relative to the center point coordinates of the current extended node ( Corrections will be made:
[0145]
[0146] if Then exchange ( )and( ),make This invention further ensures the accuracy of the battlefield environment model by modifying the extended nodes, thereby ensuring the accuracy of the calculated minimum estimated cost path from the starting node to the ending node as the optimal wargaming simulation path, and ultimately effectively supports combat decision-making.
[0147] Deploy influence factors for the enemy to evaluate the process from the starting node to the extended node. The impact of enemy deployments.
[0148] It should be noted that the calculation of the above-mentioned maneuver speed influence factor, path direction influence factor and enemy deployment influence factor is only an example of an embodiment of the present invention. In specific implementation, those skilled in the art can make arbitrary settings according to actual needs, and the present invention does not make specific limitations in this regard.
[0149] In general, the wargaming simulation of the device in this embodiment of the invention is based on the spatial discretization characteristics of a hexagonal grid. At the same time, the influence of the battlefield situation on the value of path nodes is added to the evaluation function, thereby improving the adaptability of the algorithm in the wargaming simulation system and the accuracy of path planning, and ultimately providing effective support for assisting combat decision-making.
[0150] The relevant content of the device embodiments of the present invention can be understood by referring to the method embodiments of the present invention, and will not be discussed in detail here.
[0151] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the hexagonal grid-based wargame path planning methods described in the embodiments of the present invention. For details, please refer to the embodiments of the present invention for further understanding; detailed explanations are not provided here.
[0152] Although preferred embodiments of the invention have been disclosed for illustrative purposes, those skilled in the art will recognize that various modifications, additions, and substitutions are possible, and therefore the scope of the invention should not be limited to the embodiments described above.
Claims
1. A wargame path planning method based on a hexagonal grid, characterized in that, The method includes: A battlefield environment model is constructed by discretizing the battlefield space based on a hexagonal grid, wherein the battlefield environment model includes the geographical elements of the battlefield space and the enemy's deployment. Based on the battlefield environment model, starting from the starting node, the estimated cost from the current node to each extended node under the current node is calculated step by step through the evaluation function, and the path with the minimum estimated cost from the starting node to the ending node is determined. The minimum estimated cost path from the starting node to the ending node is taken as the optimal wargaming path, and combat decisions are made based on this optimal wargaming path. Wherein, the evaluation function , This is the influence factor on maneuver speed, used to evaluate the speed from the starting node to the extended node. The influence of environmental factors on the movement speed of chess pieces. Weighting is assigned to the influence of maneuver speed; This is the path direction influence factor, used to evaluate the influence from the starting node to the extension node. The influence of path direction, The path direction affects the weight; Deploy influence factors for the enemy to evaluate the process from the starting node to the extended node. The impact of enemy deployments, The impact weight of enemy deployments; ,in, The influence of terrain on maneuver speed; The influence factor of ground features on maneuver speed; The influence factor of elevation on maneuver speed; The influence of weather on vehicle speed; The influence factor of visibility on maneuver speed The influence factor of the control zone on maneuver speed; Wherein, the direction weight It is the difference between the first slope and the second slope. The first slope is the slope of the straight line formed between the starting node and the ending node, and the second slope is the slope of the straight line formed between the starting node and the i-th extended node. n is the total number of all extended nodes from the starting node to the extended node n. ,in, The factor influencing troop type includes one or more of the following: infantry, artillery, engineers, armored forces, and air defense forces. The factor influencing troop level includes army, division, brigade, regiment, battalion, company, platoon, or squad. This is a factor influencing the life value, which refers to the current damage level of enemy forces. The relative position factor refers to the distance between the current expanding node and the enemy's position node. , and All are weighting coefficients.
2. The method according to claim 1, characterized in that, The battlefield environment model is constructed by discretizing the battlefield space based on a hexagonal grid, including: A hexagonal grid is constructed on the battlefield space. The hexagonal grid is a coordinate system with the east-west direction as the X-axis, the north-south direction as the Y-axis, and the east and north directions as positive directions. The origin coordinates are (0,0). The geographical elements of the battlefield space and the enemy's deployment are described on the hexagonal grid to construct the battlefield environment model.
3. The method according to claim 1, characterized in that, Calculate the direction weights, including: Set the starting node coordinates as ( The coordinates of the end node are ( The coordinates of the extended node corresponding to the current node are ( ); Calculate the slope of the straight line formed between the start node and the end node. And calculate the slope of the straight line formed between the starting node and the extended node n. ; This is used to measure the value of path direction.
4. The method according to claim 1, characterized in that, Before calculating the slope of the straight line formed between the starting node and the extended node, the method further includes: performing an input format conformity judgment on the center point coordinates of the starting node, the center point coordinates of the ending node, and the center point coordinates of the extended node corresponding to the current node; The input format conformity judgment for the center point coordinates of the starting node, the ending node, and the center point coordinates of the extended node corresponding to the current node includes: Based on the center point of the extended node x Even or odd coordinates, relative to the center point coordinates of the current extended node ( Corrections will be made: if Then exchange ( )and( ),make .
5. The method according to any one of claims 1-4, characterized in that, Based on the battlefield environment model, starting from the starting node, the estimated cost from the current node to each extended node under that current node is calculated step by step using an evaluation function, determining the path with the minimum estimated cost from the starting node to the ending node, including: The estimated cost from the starting node to each of the extended nodes under the starting node is calculated using the evaluation function. The extended node with the smallest estimated cost is taken as the current node, and the estimated cost from the current node to each of the extended nodes under it is further calculated until the path with the smallest estimated cost from the starting node to the ending node is obtained.
6. The method according to claim 5, characterized in that, The estimated cost from the starting node to each extended node under that starting node is calculated using an evaluation function. The extended node with the lowest estimated cost is selected as the current node, and the estimated cost from the current node to each extended node under it is further calculated until the path with the lowest estimated cost from the starting node to the ending node is obtained. This includes: Set up an open table and a close table. The open table is used to store nodes that need to be expanded, and the close table is used to store nodes that have been fully expanded. Calculate all extended nodes of the starting node and store the calculated extended nodes in the open list; The path cost of the extended nodes corresponding to the current node in the open table is calculated sequentially using the evaluation function. The node with the minimum path cost is then placed in the close table. The extended nodes of the node with the minimum path cost are then obtained and stored in the open table. The estimated cost of each newly added extended node in the open table is then calculated. This process is repeated to calculate the minimum cost path from the starting node to the ending node. Finally, the path with the minimum cost is obtained by backtracking upwards from the ending node to the parent node.
7. The method according to claim 6, characterized in that, The step of using an evaluation function to sequentially calculate the path cost of the expanded nodes corresponding to the current node in the open table, and placing the node with the minimum path cost into the close table, includes: Suppose that node B is an extension node under the current node A. If node B is already in the open list, and the estimated cost of node B is... Then update the valuation of node B in the open table to... And update node B's parent node to node A, reorder the open list, if node B is already in the close list, and Then update the valuation of node B in the open table to... Update the parent node of node B to node A, remove node B from the close list, and reorder the open list; if node B, the result of the expansion of node A, is not in either the open or close list, add node B to the open list, calculate its estimated cost, and reorder the open list. The calculation of the extended node B under the current node A includes: Based on the hexagonal grid arrangement, in the coordinate system, for the center point coordinates (x, y) of the current node A, the center point coordinates (x, y+1) of the extended node B in the first direction, and the center point coordinates (x, y-1) of the extended node B in the fourth direction. When y is odd, the coordinates of the center point of the extended node B in the second direction are (x+1, y+1), the coordinates of the center point of the extended node B in the third direction are (x+1, y), the coordinates of the center point of the extended node B in the fifth direction are (x-1, y), and the coordinates of the center point of the extended node B in the sixth direction are (x-1, y+1). When y is even, the coordinates of the center point of the extended node B in the second direction are (x+1, y), the coordinates of the center point of the extended node B in the third direction are (x+1, y-1), the coordinates of the center point of the extended node B in the fifth direction are (x-1, y-1), and the coordinates of the center point of the extended node B in the sixth direction are (x-1, y).
8. A wargaming path planning device based on a hexagonal grid, characterized in that, The device includes: A construction unit is used to perform battlefield space discretization processing based on a hexagonal grid to construct a battlefield environment model, wherein the battlefield environment model includes geographical elements of the battlefield space and enemy deployment. The processing unit is used to calculate the estimated cost from the starting node to each extended node under the current node through the evaluation function according to the battlefield environment model, starting from the starting node, and determine the path with the minimum estimated cost from the starting node to the ending node. The decision-making unit is used to take the calculated minimum estimated cost path from the starting node to the ending node as the optimal wargaming path and make combat decisions based on the optimal wargaming path. Wherein, the evaluation function , This is the influence factor on maneuver speed, used to evaluate the speed from the starting node to the extended node. The influence of environmental factors on the movement speed of chess pieces. Weighting is assigned to the influence of maneuver speed; This is the path direction influence factor, used to evaluate the influence from the starting node to the extension node. The influence of path direction, The path direction affects the weight; Deploy influence factors for the enemy to evaluate the process from the starting node to the extended node. The impact of enemy deployments, The impact weight of enemy deployments; ,in, The influence of terrain on maneuver speed; The influence factor of ground features on maneuver speed; The influence factor of elevation on maneuver speed; The influence of weather on vehicle speed; The influence factor of visibility on maneuver speed The influence factor of the control zone on maneuver speed; Wherein, the direction weight It is the difference between the first slope and the second slope. The first slope is the slope of the straight line formed between the starting node and the ending node, and the second slope is the slope of the straight line formed between the starting node and the i-th extended node. n is the total number of all extended nodes from the starting node to the extended node n. ,in, The factor influencing troop type includes one or more of the following: infantry, artillery, engineers, armored forces, and air defense forces. The factor influencing troop level includes army, division, brigade, regiment, battalion, company, platoon, or squad. This is a factor influencing the life value, which refers to the current damage level of enemy forces. The relative position factor refers to the distance between the current expanding node and the enemy's position node. , and All are weighting coefficients.
9. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the hexagonal grid-based wargaming path planning method according to any one of claims 1-7.