A star path finding method and system based on binary heap node sorting
A binary heap and heap sorting technology, which is applied in the A-star pathfinding method and system field based on binary heap node sorting, can solve problems such as slowdown, slow efficiency, and inability to meet the real-time requirements of the game, so as to improve execution efficiency Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Example Embodiment
[0048] Example 1
[0049] figure 1 The flowchart of the method for finding A-star paths based on binary heap node sorting provided by the embodiment of the present invention is as shown in the figure: The method for finding A-star paths based on binary heap node sorting provided by the present invention includes the following steps:
[0050] S1: Initialize the OPEN table, CLOSE table and target point A, put the starting node S into the OPEN table, and empty the CLOSE table;
[0051] S2: Determine whether the OPEN table is empty, if not, take a node n from the header of the OPEN table; if so, end the algorithm process;
[0052] S3: Determine whether the node n is the target solution A, if so, output the node n; if not, go to step S4; the target solution is the target point A to be finally found, that is, find a path from the starting point to reach Target;
[0053] S4: Expand all subsequent nodes of node n to form directly associated child nodes, and determine whether the c...
Example Embodiment
[0085] Example 2
[0086] The difference between this embodiment and Embodiment 1 is only:
[0087] This embodiment describes the A-star pathfinding method based on binary heap node sorting in detail. The method provided in this embodiment is to introduce a binary heap into the A-star algorithm to sort nodes, thereby improving the efficiency of the algorithm. The specific process is as follows:
[0088] 1. Initialize an OPEN table (used to store the next node to be traversed), a CLOSE table (used to store the paths that have been found), put the starting node S into the OPEN table, and empty the CLOSE table;
[0089] 2. If the OPEN table is not empty, take a node n from the table header. If it is empty, the algorithm fails;
[0090] 3. Judging that node n is the target solution, if so, find a solution (continue searching, or terminate the algorithm); if not, go to step 4;
[0091] 4. Step 4 is divided into the following steps
[0092] 4.1. Expand all subsequent nodes of nod...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap