CN110975291A - Path extraction method and system - Google Patents

Path extraction method and system Download PDF

Info

Publication number
CN110975291A
CN110975291A CN201911139052.6A CN201911139052A CN110975291A CN 110975291 A CN110975291 A CN 110975291A CN 201911139052 A CN201911139052 A CN 201911139052A CN 110975291 A CN110975291 A CN 110975291A
Authority
CN
China
Prior art keywords
path
node
point
starting
end point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911139052.6A
Other languages
Chinese (zh)
Other versions
CN110975291B (en
Inventor
彭勇
王鹏
尹全军
秦龙
胡越
焦鹏
鞠儒生
谢旭
许凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN201911139052.6A priority Critical patent/CN110975291B/en
Publication of CN110975291A publication Critical patent/CN110975291A/en
Application granted granted Critical
Publication of CN110975291B publication Critical patent/CN110975291B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3407Route searching; Route guidance specially adapted for specific applications
    • G01C21/343Calculating itineraries, i.e. routes leading from a starting point to a series of categorical destinations using a global route restraint, round trips, touristic trips
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3446Details of route searching algorithms, e.g. Dijkstra, A*, arc-flags, using precalculated routes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a path extraction method and a system, wherein the method comprises the following steps: preprocessing the positions of grid points of collapse jumping points in the uniform grid map; acquiring a starting point position and an end point position; when an optimal composite main sequence path needs to be searched between a starting point and an end point, a starting child node is generated in the connection process; reading the optimal direction and distance from each starting sub-node to the end point based on a compressed mode database in the path extraction process, fusing the same parts among different paths, and obtaining a unique path from the starting point to the end point through each starting sub-node; and comparing the path distances from the starting point to the end point through all the starting child nodes to obtain the optimal path between the starting point and the end point and storing the optimal path. The method and the device are used for solving the problem that in the prior art, the searching speed is limited under the condition that information is compressed and lost in the preprocessing process, and the path planning speed is greatly improved.

Description

Path extraction method and system
Technical Field
The invention relates to the technical field of artificial intelligence path planning, in particular to a method and a system for extracting paths of a compression mode database.
Background
In the field of artificial intelligence, robotics and computer game intelligence are seen as a comprehensive field of modeling human perception, planning, decision-making and action abilities in complex environments. In recent years, various types of robots are widely used in production and life, and the attention of the academic and industrial communities to the intelligence of computer games is gradually increased, and typical examples include StarCraft game AI developed by deep gid team and Dota game AI developed by OpenAI company. As a basis of various aspects of technologies of robots and game Non-Player Characters (NPC), shortest Path Planning technology based on uniform Grid maps (uniform grids) has made remarkable progress in the last decade as a GPPC (Grid-based Path Planning composites) competition takes place and an industry boundary opens a typical map test set. As a basic service, in the technical fields of classical heuristic search problem solving technology and map space topological structure extraction in artificial intelligence, limited computing resources in many scenes need to simultaneously respond to path planning requests of a large number of intelligent agents, so that the quick response capability of the planning technology is most concerned.
One of the most well-known algorithms is known as Jump Point Search (JPS, Jump Point Search), and was proposed mainly by doctor Daniel Harabor, university of Monnash, Australia (Harabor D, Gratien A. Online GraphPraring for Pathofinding on Grid Maps [ C ]// National Conference on engineering Intelligent interest.2011: 1114-1119. Harabor D, Gratien A. improving Jump Point Search [ C ]// International Conference on Automated searching and scheduling.2014.). When the agent moves on the grid map, the JPS determines the diagonal direction movement priority path as a main partial order (direct-first conditional ordering) in symmetrical paths with the same starting point and end point and the same length, and eliminates all other paths which do not meet the principle out of a search space. It is theorized that there is at least one shortest path between any two locations that can be traveled that satisfies the rule. As shown in FIG. 1, child nodes (shown in gray) that are culled by the partial ordering rule may typically be reached by the parent node of the current node from a shorter path or a path of the same length but with an earlier occurrence of a diagonal shift. In general, such pruning recursive use may leave only 1 or 0 child nodes of a node, which not only reduces the branching factor of the node being expanded, but also reduces the branching factor of the child nodes.
In addition, when the JPS applies the a-star algorithm, intermediate nodes are not added to the Open table, and unless a node in fig. 1(c) is encountered, which needs to expand the forwarding direction to other branches, such a node is added to the Open table to be expanded. Intermediate nodes will all be skipped and so the particular node in fig. 1(c) is referred to as a "hop".
The JPS algorithm only needs on-line processing and does not relate to map preprocessing, and compared with a simple A-algorithm, the speed is improved by one order of magnitude. But one major disadvantage is that extensive row-by-row and column-by-column scanning and judgment of intermediate nodes is required when expanding the nodes. Based on this, JPS + calculates and stores, in the offline phase, for each passable direction of each passable node, the distance to the first jump point or obstacle reachable through that direction. This pre-stored information further increases the search speed. Furthermore, JPS + (P) adopts a transit pruning (intermediate pruning) technology during searching, diagonal jump points are regarded as transition nodes, and an Open table is not added for processing, so that the operation times of the Open table are reduced to a certain extent compared with JPS +.
The performance of the JPS is further greatly improved by combining with the technology of Compressed Pattern Databases (CPD). The CPD technique is a preprocessing-based path planning technique using space to replace time, and it finds an outgoing edge (outgoing edge) that can reach all other connected nodes with the shortest path for the current node by initiating Dijkstra search with each passable node as a source in an offline stage. If the matrix M represents the preprocessed data, M [ i, j ] represents the first edge from node i on the shortest path from the ith node to the jth node. To compress the storage space of this matrix, the SRC (Single-Row Compression) algorithm performs data Compression by using RLE (Run-Length Encoding) method for each Row (corresponding to each source node), which generally can obtain a Compression ratio of 300-. When the path planning is performed on line, the SRC retrieves the optimal movement of each current node from the starting point to the CPD to reach a given target point, so as to iteratively obtain a complete shortest path. Each of which requires a binary search in the corresponding line of compressed data. SRC is one of the fastest algorithms for GPPC-2014 race because it does not require online searching by the a-x algorithm at all.
The JPS and SRC combined create a pointing (Two-Oracle Path PlannING) algorithm, which is based on the principle that only Two-way lookup of CPD on key nodes (e.g. start point, skip point) results in the Optimal direction, and simultaneously accesses the distance table of JPS to obtain the number of steps that the corresponding direction can be repeatedly executed, thereby avoiding redundant Two-way query on intermediate nodes (Salvetti M, Botea A, Gerevini A, et al. Two-Oracle Optimal Path PlannING on Grid Maps [ C ]// International Conference on Automated PlannING and scheduling.2018(Sturtevant2012): 227-). Since the access to the JPS distance table is constant, the Topping algorithm improves the path planning efficiency by several times compared to the SRC. It should be noted that, unlike SRC, Dijkstra search in the preprocessing stage uses a diagonalfirst partial order consistent with JPS, so as to ensure the maximum benefit of the combination of the two, i.e. to minimize the number of CPD queries. The pruning technology based on offline pre-calculation improves the performance improvement of about one order of magnitude and several times for JPS + and SRC algorithms respectively, so that microsecond-level search speed can be obtained under a classical test set. However, this significant improvement comes at the cost of having to invest a significant amount of CPU time and memory space in the preprocessing stage.
If the cost needs to be reduced, only the jumping point position needs to be preprocessed. The processing will cause the loss of the preprocessing information of the algorithm to a certain extent, and mainly lies in that if the starting point is a common node rather than a jumping point, the algorithm cannot directly search the first-step moving direction on the optimal path from the starting point to the end point, so that an iterative search mode cannot be adopted. However, the search simply according to the JPS mode will significantly affect the search speed of the Topping algorithm.
Disclosure of Invention
The invention provides a path extraction method and system based on compression mode database pruning, which are used for overcoming the defects that the search speed is limited and the like under the condition that information is compressed and lost in the preprocessing process in the prior art, and realize local exploration by fusing and sharing the same path in the process of expanding and exploring a starting point, thereby omitting repeated exploration and extraction of the same path and further realizing the great improvement of the search speed compared with the prior art.
In order to achieve the above object, the present invention provides a path extraction method based on a compressed mode database, comprising:
preprocessing the positions of grid points of collapse jumping points in the uniform grid map to generate a compression mode database;
acquiring a starting point position and an end point position;
when an optimal composite main sequence path needs to be searched between a starting point and an end point, a starting child node is generated in the connection process;
reading the optimal direction and distance from each starting sub-node to the end point based on a compressed mode database in the path extraction process, and extracting a unique path from the starting point to the end point through each starting sub-node;
and fusing overlapping parts in paths from the starting point to the end point through all the starting child nodes, avoiding repeated extraction, and finally obtaining and storing the optimal path between the starting point and the end point through comparison among different paths.
In order to achieve the above object, the present invention further provides a path extraction system based on a compressed mode database, including a memory and a processor, where the memory stores a path extraction program based on a mode database, and the processor executes the steps of the path extraction method based on the mode database when running the path extraction program based on the mode database.
The invention provides a path extraction method and a system based on a compressed mode database, wherein a mapping + PEx (path extraction) algorithm fully utilizes a mode database stored in a preprocessing stage at a jumping point position, firstly finds a child node of a starting point in a connection process, and can prune the child node of the starting point (when the starting child node is generated) to improve the path extraction efficiency and reduce the number of nodes to be explored. On the basis, path extraction is carried out on each child node of the starting point according to a capping mode, and a path reaching the target point can be obtained. In the process, the same parts (also called subpath) among different paths are fused, so that the search cost is reduced, and a unique shortest path can be obtained. And finally, comparing the lengths of the paths from the starting point to the end point through different starting child nodes, and selecting the shortest path as the optimal path. The invention solves the problem of slow searching speed in the prior art from the perspective of fully utilizing sparse preprocessed data, and improves the path planning speed.
Drawings
FIG. 1(a) is a schematic diagram of pruning during diagonal movement under a non-jumping point scenario in the prior art JPS;
FIG. 1(b) is a schematic diagram of pruning during axial movement under a non-jumping point scenario in the conventional JPS technique;
FIG. 1(c) is a schematic diagram of pruning at a jumping-point position in the prior art JPS technique;
fig. 2(a) is a schematic diagram of an axial jump point in a path planning method according to an embodiment of the present invention;
fig. 2(b) is a schematic diagram of a diagonal jumping point in the path planning method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a classification of a main sequence path according to an embodiment;
FIG. 4 is a flow chart of a main algorithm for path planning by CBD according to an embodiment I;
FIG. 5 is a main flow of the first embodiment, wherein the Topping + PEx performs path extraction;
FIG. 6 is a flowchart illustrating detection of the same path according to one embodiment;
FIG. 7 is a diagram illustrating an example of pruning when a connection process generates a start child node according to an embodiment;
FIG. 8 is a diagram illustrating an example of a path extraction process in a scenario according to an embodiment;
fig. 9 is an exemplary diagram of a path extraction process in another scenario in the first embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the technical solutions in the embodiments of the present invention may be combined with each other, but it must be based on the realization of those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should not be considered to exist, and is not within the protection scope of the present invention.
Example one
As shown in fig. 1, an embodiment of the present invention provides a method for extracting a path based on a compressed mode database, including:
s1, preprocessing the positions of grid points of the collapse jumping points in the uniform grid map to generate a compression mode database;
the jumping points comprise axial jumping points and diagonal jumping points, and are defined as follows:
the axial jump point is: the passable points of the barriers in the diagonal direction in the uniform grid map; can move at least in the horizontal direction and the vertical direction; an axial jump point (straight jump point) can be regarded as a triplet
Figure BDA0002280388780000051
Which contains one grid position n and two axial directions of movement. They satisfy: (1)
Figure BDA0002280388780000052
and
Figure BDA0002280388780000053
are two moves that can be moved in a row; (2)
Figure BDA0002280388780000054
(3)
Figure BDA0002280388780000055
is not accessible.
Intuitively, the grid position n in definition 1 is the corner of the obstacle, and the direction
Figure BDA0002280388780000056
The parent direction, called the hop point, is the direction of the search. Taking fig. 2(a) as an example, the position and direction are respectively represented by a solid circle and an arrow, all the axial jumping points and the corresponding parent directions are marked in the figure, and it can be seen that more than two axial jumping points are generally attached to n meeting the condition. In addition, will
Figure BDA0002280388780000061
And
Figure BDA0002280388780000062
referred to as the main sequence extension direction of the hop.
A diagonal jump point (diagonaljump point) can be represented as a two-tuple
Figure BDA0002280388780000063
Comprising a grid position n and a diagonal direction
Figure BDA0002280388780000064
Position n is derived from
Figure BDA0002280388780000065
The direction of movement reaches and can pass
Figure BDA0002280388780000066
Or
Figure BDA0002280388780000067
To arrive at a certain position
Figure BDA0002280388780000068
Or
Figure BDA0002280388780000069
Is an axial jump point in the paternal direction, or reaches a target point.
Fig. 2(b) shows the position relationship between the diagonal jumping point and the axial jumping point. The open circles and gray arrows represent the positions and directions, respectively, and it should be noted that the same axial jump point can be reached by a plurality of diagonal jump points at the same time, and even the same position can reach the positions of different diagonal jump points of a certain axial jump point at the same time, such as (D1/D2/D3, SW/SE).
The meaning of grid points of collapsed hops here refers to: at the same grid point location there are at least parent nodes from two directions: any two of upper, lower, left, right, upper right, lower right, upper left and lower left, wherein the jumping point can be an axial jumping point, a diagonal jumping point, or both an axial jumping point and a diagonal jumping point; if the same grid point collapses and jumps in multiple directions, the position is searched and calculated once, and repeated calculation is not carried out;
as described above, the positions of the axial jump points can be quickly identified all by one scan of all the grid points simply from their relative positional relationship with the obstacle. However, we do not need to identify all diagonal hops and perform bounding box calculations on them. Here, two types of diagonal skip points are distinguished.
An active diagonal jump point
Figure BDA00022803887800000610
(active diagonaljump point) is a point with an axial jump point
Figure BDA00022803887800000611
As its parent node, wherein
Figure BDA00022803887800000612
Is the extension direction of the diagonal main sequence of the axial jump point, n can have s to pass through without obstacle
Figure BDA00022803887800000613
The movement arrives. The remaining locations that do not satisfy this condition are passive diagonal skip points. For example, (F5, SE) in fig. 2(b) is an active diagonal hop because it has (D3, E, S) as parent node, and can reach another axial hop (I5, E, N) by moving eastward. And (E5, SE) is a passive diagonal jump point.
All paths that comply with the diagonalfirst rule can be categorized into two categories, as shown in FIG. 3. The first category, which we call Simple Canonical Paths, do not involve a search direction conversion at a jumping point position, where the conversion is from its parent direction to one of the main sequence extension directions at some axial jumping point, as shown in the figure<s1,t1>As shown, the path searching can be judged by one-time depth-first searching. The second type is called composite Canonical Path(s), which can be represented as<s,(ds),s1,(d1)x1,s2,(d2)x2,s3,…,sn,(dt),t>As in the figure<s2,t2>As shown. Such paths can be divided into three parts: (1) the initial part is as follows: from the starting point s to the first axial jump point s1Possibly including a passive diagonal jump ds(ii) a (2) The middle part:jumping from the first axial direction s1To the last axial jump point snWith x between two adjacentiActive diagonal skip points; (3) ending part: from snTo the end point t, a passive jump point may be included.
It should be noted that some grid points are attached with both axial jumping points and diagonal jumping points;
the method for acquiring the axial skip point and the diagonal skip point can be implemented by a program according to the above definition, and the specific method is not limited. In an embodiment of the present invention, for example: obtaining an axial jumping point by identifying an inflection point of an obstacle, namely obtaining the axial jumping point by identifying a position relation with the obstacle; the diagonal jumping points can be obtained by identifying the position relation with the axial jumping points;
the preprocessing search algorithm can be preprocessing by a compressed mode database search algorithm;
s2 obtaining the starting point and the end point;
in one embodiment of the invention, the grid point position where the intelligent robot is located or the grid point position where the movable object is located in the intelligent game forms a starting point, and the specified grid point position input by the operator or the player forms an end point.
S3, when an optimal composite main sequence path needs to be found between the starting point and the end point, a starting child node is generated in the connection process; the meaning of the starting child node refers to an axial jumping point which is in accordance with a diagonal priority principle from a starting point; more than one axial node may exist simultaneously in the process of generating the starting child node to meet the requirement of the starting child node, and the axial child nodes can be used as the starting child nodes; in order to reduce unnecessary path planning and improve the path planning speed, pruning is performed when the starting child node is generated:
matching according to the data stored in the compression mode database and the main sequence expansion direction of the initial child node to screen the initial child node, and generating the initial child node only on a local path which is possibly to reach the destination position; pruning is performed for paths that are unlikely to reach the end position.
S4, based on the compressed mode database, reading the optimal direction and distance from each initial sub-node to the end point in the path extraction process, and fusing the same parts among different paths to obtain the only path from the start point to the end point through each initial sub-node;
the different paths here refer to: multiple paths exist from different starting child nodes to the end point; for example, the optimal path is explored from different starting child nodes, if a certain child node encounters a node, the path after the encountered node (the path from the encountering child node to the end point) is the same, the path is recorded only in the path from the first exploration to the starting child node of the encountering child node, and the subsequent exploration is not repeated for the paths from other starting child nodes to the end point at the encountering child node; by means of fusion and sharing of the same path, exploration space and time are reduced, and path planning speed is improved.
S5, the path distances from the starting point to the end point through all the starting sub-nodes are compared, and the optimal path between the starting point and the end point is obtained and stored.
Which path is the optimal path can be obtained by distance comparison. The distance can be calculated by using coordinate difference or jump distance table.
Preferably, the step of preprocessing with the grid position of the collapse skip point in the uniform grid map by S1 includes:
s01, performing structural analysis on the uniform grid map, and identifying all axial jump points according to the position relationship between the passable points and the obstacle points; calculating a jump distance table for all passable directions of all passable nodes on the uniform grid map, and recording the distance between the node and a next jump point in the direction or the distance between the node and an obstacle;
s02, identifying all diagonal jumping points according to the axial jumping points in the diagonal direction by using a jumping distance table;
s03, carrying out Dijkstra search facing to the whole map by taking the collapse position of each jumping point as a source node, and acquiring the optimal initial edge of the source node for all reachable nodes; and storing the optimal starting edges of all reachable nodes to generate a compressed mode database. The optimal starting edge here means an optimal direction from a starting point to a certain end point, and for any end point position, the optimal direction may be unique, and two or three equivalent directions may exist.
The collapsed position refers to a grid point to which at least two directional axial jumps and/or diagonal jumps are attached. The starting edge here means a starting direction, and eight directions in the eight-neighborhood grid are selected as the starting direction.
Preferably, the step of S3 generating the start child node in the connection process includes:
s30 prunes the path that cannot reach the end point by reading the compressed mode database when the start child node is generated during the connection.
The step of S30 pruning paths that cannot reach the end point by reading the compressed mode database when the starting child node is generated during the connection process includes:
s301, obtaining all axial jumping point sub-nodes of the starting point according with the diagonal priority principle according to the jumping distance table;
s302, deleting the legal axial skip point sub-node when the intersection exists between all main sequence expansion directions of the axial skip point sub-node and the optimal direction of the node stored in the compression mode database;
and S303, traversing all the axial jumping point sub-nodes to obtain all the pruned initial sub-nodes.
Although sparse preprocessing means that it is difficult to prune from the starting point using the compressed mode database, thereby reducing the number of child nodes of the starting point, when all legal child nodes are found, they are axial jump points, and can use the existing mode database information to prune. The Algorithm flow is shown in Algorithm 1 of FIG. 4.
The algorithm inputs are a starting point s, an end point T and a jump distance table T, and symbols
Figure BDA0002280388780000091
Indicating node n is in the direction
Figure BDA0002280388780000092
The distance value of (a). The algorithm traverses all eight directions and,all possible child nodes are quickly obtained by distance values (lines 3, 13), where the diagonal direction requires an iterative process (line 9). For those nodes that do not prune through the pattern database of the starting point, pruning can be performed to some extent through the own pattern database and the main sequence extension direction (lines 4-6, 14-16). If the set of all the main sequence directions of the node is not intersected with the optimal direction set searched by the CPD, the node can be safely removed from a search space without being added into a list to be searched; instead, the node should be considered. Through the pruning process, only 1-2 subnodes can be reserved, the search burden is greatly reduced, and the method is closer to the information-complete pointing.
Preferably, in the step of reading the optimal direction and distance from each start child node to the end point based on the compressed mode database in the search process, and fusing the same parts among different paths to obtain a unique path from the start point to the end point via each start child node, the step of S4 is as follows:
s41 when there is an intersection between all main sequence expansion directions of the starting child node and the optimal direction of the node stored in the compressed mode database;
s42 reading the distance to the next child node in the optimal direction from the hop distance table of the node;
s43 when the current child node is not explored; updating the next node and returning to the previous step S42 until the terminal point is reached;
s44, extracting a unique path from the starting point to the end point through the starting child node;
s45 repeats the path exploration for all the initial child nodes, and extracts a unique path from the initial point to the final point via each initial child node.
Referring to Algorithm 2 of FIG. 5, the main flow of the path extraction by applying + PEx is shown. A few child node sets of a starting point obtained by an algorithm 1 and a sparse mode database obtained by preprocessing are used as input, and a data structure of a node is initialized: including setting all nodes' parent and child nodes to null, and setting a boolean flag bit to indicate that the node has not been explored (line 1). Then a global boolean flag bit is set to identify whether a path has been found. The algorithm traverses all the starting child nodes, any branch can reach the target point, and the flag pathFound is set to true (lines 13-14). In each branch extraction, the optimal direction for the current node to reach the target is retrieved from the CPD (line 6), and if not empty, the child node is generated according to the Topping pattern (lines 7-9). To prevent the same subpath from being repeatedly explored, wasting algorithm runtime, it needs to be checked (line 10).
Preferably, the step of S42 reading the distance traveled to the next child node in the optimal direction from the jump distance table further includes;
s421 when the current child node is explored, comparing the current path to the current child node with the explored path;
s422a, when the searched path is better than the current path to the current child node, stopping the branch direction search; and recording the path from the starting point to the current node.
Preferably, the S421, when the current child node is explored, further includes, after the step of comparing the current path to the current node with the explored path:
s422b, when the current arriving current child node is better than the explored path, modifying the precursor relationship and recording the distance between the current node and the starting point;
the predecessor relationship refers to modifying the parent node reaching the current child node in the explored path into the parent node reaching the current child node, or adding the parent node reaching the current child node in the explored path to the parent node reaching the current child node in the explored path, namely modifying the predecessor relationship of the current child node;
s423 and transmitting the information to the following nodes;
s424a when the path to the next node is not explored, the current branch direction returns to S42 and continues to fetch until the end point is reached.
S424b ends the process when the subsequent node is the end point or directly reaches the end point.
Referring to fig. 6, the detection process is given in Algorithm3, and is used to determine whether the fetching of the current branch should proceed in case a subsequent path has already been explored in other branches or will be explored at a smaller path cost. This information is recorded in the identification variable, suplathmeet. If the current child node c has not been explored by other branches, the algorithm updates it to the next node and returns (lines 1-5). Conversely, if the current path to the node is not better than the explored path, the current branch may be taken off (lines 7-10). If the current path is more optimal, the relevant predecessor relationships and f-values need to be rewritten (lines 12-13, record the distance from the current child node to the starting point). The algorithm will also propagate this information to subsequent nodes (lines 26-27) until the following three cases occur: (1) if the path from a certain node to the next node is not explored yet, the current branch is required to return to continue extraction (lines 19-20); (2) if a node is subsequently explored by another branch with a path of less cost, propagation should be stopped and the fetch of the current branch should be stopped (lines 22-25); (3) the target point is reached (line 28). In short, after the completion of the operation of Algorithm3, if the subpathMeet is true, Algorithm 2 should stop the path extraction of the current branch; otherwise it should continue.
Fig. 7 shows an example of pruning of the connection process implemented by the present invention. The starting and ending points are F2 and J1, respectively. By extracting the valid distance values (shown in bold), all the non-pruned child nodes B0, F5, and H5 are quickly found. Their respective main sequence spreading directions and the optimal directions stored in the CPD are indicated by short arrows in grey and black, respectively. It can be seen that only the main order expansion direction of H5 to the right coincides with the optimal direction, so both B0 and F5 are culled, and only one node, i.e., H5, is added to the Open table.
Fig. 8 shows an example of a path extraction process in a scenario where none of the current child nodes has been explored (no identical partial sub-path exists in the path), where the start point and the end point are a0 and a5, respectively. Through the join process, a unique starting child node B0 is generated. When the branch is extracted, the best direction from B0 to the target point is read to the bottom right, and then the distance table is read to know that the motion in the direction can be executed in 2 steps to reach the diagonal jump point D2. At this time, the optimal direction for reading from D2 to reach the target point is downward, and the number of steps is 3 steps. By analogy, only one path can be extracted.
Fig. 9 shows an example of a next path extraction process in a scenario where paths from two different starting child nodes meet at a child node (the same portion exists in the path, i.e., the child path from the meeting child node to the destination), where the two paths respectively correspond to two starting child nodes s1And s1'. If first to s1' when a representative branch is extracted, s is searched1When branching will be at s2Where it is found that the node has been explored. Comparison finding, s1Branch arrival s2Is less costly, so s is reduced2From s1Update to s1And propagates the cost back to the endpoint. No more unexplored nodes are found in the middle.
As mentioned above, the number of two types of jumping point collapse positions in a general grid map is much smaller than the total number of all passable nodes. The invention will thus provide a significant saving in the required pre-processing time and space. Com, the general test set taken from https:// movingai.com, the basic information of which is shown in table 1. Which contains both typical game maps and artificially synthesized rooms and labyrinths. Each map also contains a number of path planning test questions.
The results of the experiment are shown in table 2. Wherein SRC and tipping are original algorithms, and tipping + PEx is the invention. We add in addition the warping of pointing + WSSP and pointing +, the first one does not use initiator node pruning, and uses a-search for routing rather than path extraction; the second employs initial child node pruning but still does not employ path extraction. The experimental results showing this variation clearly show the effect of the two techniques of the present invention on the improvement of the search speed, respectively. The result shows that under the condition that the preprocessing information is relatively sparse, the search speed of the Topping + PEx algorithm is improved by a plurality of times compared with SRC through the starting point child node pruning and partial expansion technology provided by the invention, is quite close to the Topping and is basically in an order of magnitude. Meanwhile, by comparing with two variants of pointing + WSSP and pointing +, the adoption of the starting sub-node pruning and path extraction modes can obviously help to improve the path search efficiency. The former helps reduce the number of branches to be explored, and the latter reduces operations that frequently reorder the Open table.
TABLE 1 map used in the experiment
Figure BDA0002280388780000121
Table 2 comparison of path search results. The index is the average search time in microseconds.
StarCraft DAO BG Warcraft Rooms Mazes
SRC 42.0 16.5 15.8 22.4 37.3 52.1
Topping 16.2 5.8 5.0 6.0 15.5 44.9
Topping+WSSP 25.5 10.7 5.1 7.7 15.2 73.1
Topping+ 19.5 9.2 4.5 6.6 14.9 72.9
Topping+PEx 18.0 6.7 3.9 6.6 12.0 49.6
Example two
On the basis of the first embodiment, an embodiment of the present invention provides a pattern database-based path extraction system, which includes a memory and a processor, where the memory stores a pattern database-based path extraction program, and the processor executes the steps of any of the above-described method embodiments when executing the pattern database-based path extraction program.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for extracting a path, comprising:
preprocessing the positions of grid points of collapse jumping points in the uniform grid map to generate a compression mode database;
acquiring a starting point position and an end point position;
when an optimal composite main sequence path needs to be searched between a starting point and an end point, a starting child node is generated in the connection process;
reading the optimal direction and distance from each starting sub-node to the end point based on a compressed mode database in the path extraction process, fusing the same parts among different paths, and obtaining a unique path from the starting point to the end point through each starting sub-node;
and comparing the path distances from the starting point to the end point through all the starting child nodes to obtain the optimal path between the starting point and the end point and storing the optimal path.
2. The path extraction method of claim 1, wherein the step of preprocessing with the grid positions of the collapse skip points in the uniform grid map comprises:
carrying out structural analysis on the uniform grid map, and identifying all axial jumping points according to the position relation between the passable nodes and the obstacle points;
calculating a jump distance table for all passable directions of all passable nodes on the uniform grid map, and recording the distance between the node and a next jump point in the direction or the distance between the node and an obstacle;
identifying all diagonal jumping points by using a jumping distance table in the diagonal direction according to the axial jumping points;
carrying out Dijkstra search facing to the whole map by taking the collapse position of each jumping point as a source node, and acquiring the optimal starting edge, namely the optimal direction, of the source node to all reachable nodes; and storing the optimal directions of all reachable nodes to generate a compressed mode database.
3. The path extraction method according to claim 2, wherein the step of generating the start child node in the connection process comprises:
when the starting child node is generated in the connection process, paths which cannot reach the end point are pruned by reading the compression mode database.
4. The path extracting method according to claim 3, wherein the step of pruning paths that cannot reach the end point by reading the compressed mode database when the start child node is generated during the connection process comprises:
obtaining all axial jumping point sub-nodes of the starting point according with the diagonal priority principle according to the jumping distance table;
deleting the legal axial skip point sub-node when the intersection exists between all main sequence expansion directions of the axial skip point sub-node and the optimal direction of the node stored in the compression mode database;
and traversing all the axial jumping point sub-nodes to obtain a starting sub-node.
5. The method according to any one of claims 2 to 4, wherein in the step of reading the optimal direction and distance from each start child node to the end point based on the compressed mode database during the search process, and fusing the same parts among different paths to obtain a unique path from the start point to the end point via each start child node:
when the intersection exists between all main sequence expansion directions of the starting child node and the optimal direction of the node stored in the compression mode database;
reading the moving distance of the next sub-node in the optimal direction from the jump distance table of the node;
when the current child node is not explored; updating the next node and returning to the previous step until the end point is reached;
extracting and obtaining a unique path from a starting point to an end point through the starting child node;
and repeating the path exploration of all the starting child nodes, and extracting a unique path from the starting point to the end point through each starting child node.
6. The path extraction method according to claim 5, wherein the step of reading the distance traveled to the next hop in the branch direction from the hop distance table further comprises;
when the current child node is explored, comparing the current path reaching the child node with the explored path;
stopping the branch direction exploration when the explored path is better than the current path reaching the current child node; and recording the path from the starting point to the current node.
7. The method of claim 6, wherein the step of comparing the current path to the current node with the explored path when the current child node was explored further comprises:
when the current arrival of the child node is better than the explored path, modifying the precursor relationship and recording the distance between the current node and the starting point;
and transmitting the information to subsequent nodes;
and when the path of the subsequent node is not explored, the current branch direction returns to the step of reading the moving distance of the next child node in the optimal direction from the jump distance table of the node, and continues to extract until the end point is reached.
8. The path extraction method of claim 7, wherein said step of propagating said information to subsequent nodes further comprises:
and when the subsequent node is the terminal point, finishing the extraction of the current branch.
9. A path extraction system comprising a memory and a processor, the memory storing a pattern database based path extraction program, the processor executing the steps of the method of any one of claims 1 to 8 when running the pattern database based path extraction program.
CN201911139052.6A 2019-11-20 2019-11-20 Path extraction method and system Active CN110975291B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911139052.6A CN110975291B (en) 2019-11-20 2019-11-20 Path extraction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911139052.6A CN110975291B (en) 2019-11-20 2019-11-20 Path extraction method and system

Publications (2)

Publication Number Publication Date
CN110975291A true CN110975291A (en) 2020-04-10
CN110975291B CN110975291B (en) 2023-11-10

Family

ID=70085099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911139052.6A Active CN110975291B (en) 2019-11-20 2019-11-20 Path extraction method and system

Country Status (1)

Country Link
CN (1) CN110975291B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113848897A (en) * 2021-09-17 2021-12-28 宁波大学 Method, system and related product for path planning for unmanned surface vessels
WO2022021336A1 (en) * 2020-07-31 2022-02-03 深圳信息职业技术学院 Target tracking method and apparatus, terminal device, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493329A (en) * 2008-01-23 2009-07-29 华东师范大学 Multiple target point path planning method and device
US20130147637A1 (en) * 2009-07-07 2013-06-13 Steven Nielsen Methods, apparatus and systems for generating searchable electronic records of underground facility marking operations and assessing aspects of same
US20140050368A1 (en) * 2006-05-02 2014-02-20 Geoeye Solutions, Inc. Semi-automatic extraction of linear features from image data including path width attribution
CN105630984A (en) * 2015-12-25 2016-06-01 中国民航信息网络股份有限公司 Freight rate searching system
CN105955280A (en) * 2016-07-19 2016-09-21 Tcl集团股份有限公司 Mobile robot path planning and obstacle avoidance method and system
CN106651987A (en) * 2016-10-10 2017-05-10 腾讯科技(深圳)有限公司 Path planning method and device
CN109115226A (en) * 2018-09-01 2019-01-01 哈尔滨工程大学 The paths planning method of multirobot conflict avoidance based on jump point search
CN110006430A (en) * 2019-03-26 2019-07-12 智慧航海(青岛)科技有限公司 A kind of optimization method of Path Planning

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140050368A1 (en) * 2006-05-02 2014-02-20 Geoeye Solutions, Inc. Semi-automatic extraction of linear features from image data including path width attribution
CN101493329A (en) * 2008-01-23 2009-07-29 华东师范大学 Multiple target point path planning method and device
US20130147637A1 (en) * 2009-07-07 2013-06-13 Steven Nielsen Methods, apparatus and systems for generating searchable electronic records of underground facility marking operations and assessing aspects of same
CN105630984A (en) * 2015-12-25 2016-06-01 中国民航信息网络股份有限公司 Freight rate searching system
CN105955280A (en) * 2016-07-19 2016-09-21 Tcl集团股份有限公司 Mobile robot path planning and obstacle avoidance method and system
CN106651987A (en) * 2016-10-10 2017-05-10 腾讯科技(深圳)有限公司 Path planning method and device
CN109115226A (en) * 2018-09-01 2019-01-01 哈尔滨工程大学 The paths planning method of multirobot conflict avoidance based on jump point search
CN110006430A (en) * 2019-03-26 2019-07-12 智慧航海(青岛)科技有限公司 A kind of optimization method of Path Planning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YUE HU 等: ""Improving the Combination of JPS and Geometric Containers"", vol. 29, pages 209 - 213 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022021336A1 (en) * 2020-07-31 2022-02-03 深圳信息职业技术学院 Target tracking method and apparatus, terminal device, and storage medium
US11803995B2 (en) 2020-07-31 2023-10-31 Shenzhen Institute Of Information Technology Target tracking method and apparatus, terminal device, and storage medium
CN113848897A (en) * 2021-09-17 2021-12-28 宁波大学 Method, system and related product for path planning for unmanned surface vessels
CN113848897B (en) * 2021-09-17 2023-12-12 宁波大学 Method, system and related products for path planning for unmanned surface vessels

Also Published As

Publication number Publication date
CN110975291B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
CN110967015B (en) Path planning method and system
CN110975290B (en) Path planning method and system based on pattern database
CN112325897B (en) Path planning method based on heuristic deep reinforcement learning
US20170219353A1 (en) Method and system for determining a path of an object for moving from a starting state to an end state set avoiding one or more obstacles
US20030223373A1 (en) Dual Dijkstra search for planning multipe paths
CN112229419B (en) Dynamic path planning navigation method and system
JP6711949B2 (en) Method and system for avoiding one or more obstacles and determining the path of an object moving from a starting state to a final state set
CN111104471B (en) Mode database information compression method and system based on jumping point path search
CN113485369A (en) Indoor mobile robot path planning and path optimization method for improving A-x algorithm
CN110975291A (en) Path extraction method and system
Sigurdson et al. Automatic algorithm selection in multi-agent pathfinding
Przybylski et al. D* Extra Lite: A dynamic A* with search–tree cutting and frontier–gap repairing
Martin et al. Offline and online evolutionary bi-directional RRT algorithms for efficient re-planning in dynamic environments
CN113009916A (en) Path planning method, chip and robot based on global map exploration
CN115129064A (en) Path planning method based on fusion of improved firefly algorithm and dynamic window method
Sarmiento et al. An efficient strategy for rapidly finding an object in a polygonal world
CN111829526B (en) Distance map reconstruction and jumping point path planning method based on anti-collision radius
Wang et al. A partitioning-based approach for robot path planning problems
CN116560360A (en) Method and system for planning real-time dynamic path of medical care robot facing complex dynamic scene
CN114577217B (en) Route planning method, device, equipment and storage medium based on Von Lonouh graph
CN110222055A (en) The single-wheel core value maintaining method of multiple edge update under a kind of Dynamic Graph
Qin et al. Dynamic Detection of Topological Information from Grid‐Based Generalized Voronoi Diagrams
CN111912411A (en) Robot navigation positioning method, system and storage medium
Majumder et al. Pathfinding and navigation
Huang et al. Dynamic task sequencing of manipulator by Monte Carlo tree search

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant