Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Inactive Publication Date: 2015-01-07
CHONGQING UNIV OF POSTS & TELECOMM
View PDF1 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The traditional A-star algorithm needs to maintain the OPEN and CLOSE tables frequently, and needs to sort the nodes in the OPEN table every time, while the average time complexity of the A-star algorithm using bubble sorting is O(n^2), and the execution efficiency Quite slow, especially when the map is larger, and repeatedly searching such a large list can seriously slow down the whole process
This obviously cannot meet the high real-time requirements of the game.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A star path finding method and system based on binary heap node sorting
  • A star path finding method and system based on binary heap node sorting

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0049] figure 1 The flow chart of the A-star pathfinding method based on binary heap node sorting provided by the embodiment of the present invention is shown in the figure: the A-star pathfinding method based on binary heap node sorting provided by the present invention includes the following steps:

[0050] S1: Initialize the OPEN table, the CLOSE table and the target point A, put the starting node S into the OPEN table, and empty the CLOSE table;

[0051] S2: Determine whether the OPEN list is empty, if not, take a node n from the header of the OPEN list; if yes, end the algorithm process;

[0052] S3: Determine whether node n is the target solution A, if yes, then output node n; if not, go to step S4; the target solution is the target point A to be found at last, that is, find a path from the starting point to reach Target;

[0053] S4: Expand all the successor nodes of node n to form directly associated sub-nodes, determine whether the sub-nodes are in the CLOSE table,...

Embodiment 2

[0086] The difference between this embodiment and embodiment 1 is only:

[0087] This embodiment describes in detail the A-star pathfinding method based on binary heap node sorting. 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 (for storing the next node to be traversed), a CLOSE table (for storing the path that has 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 head of the table, if it is empty, the algorithm fails;

[0090] 3. Determine that node n is the target solution, if so, find a solution (continue to search, 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 the successor nodes of node n, that is, th...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an A star path finding method and system based on binary heap node sorting. The A star path finding method includes: conducting initialization; judging whether a node n in an OPEN graph is a target solution A, if not, unfolding all follow-up nodes of the node n to form directly correlated sub nodes, putting the judged node n in a CLOSE graph, calculating the appraisal value of each follow-up node of the node n, conducting heat sorting on the OPEN graph according to the appraisal value, putting the node with the smallest appraisal value at the graph head of the OPEN graph, and repeating the steps until all the nodes are sorted. The A star path finding method introduces heat sorting in the normal A star algorithm so that the execution efficiency of the A star algorithm is greatly improved. The A star path finding method overcomes the defects of the traditional A star algorithm of frequently maintaining the OPEN graph and the CLOSE graph, causing long calculating time as the nodes in the OPEN graph have to be sorted each time, and being incapable of meeting high game timeliness requirements.

Description

technical field [0001] The present invention relates to the technical field of games, in particular to a method and system for finding a path for star A based on binary heap node sorting. Background technique [0002] Games are called the ninth art in the industry, and successful games will be highly praised by players all over the world. With the application of mobile Internet technology and the rapid development of services such as 3G and 4G value-added services with China Mobile Network, mobile games have shown their edge. In game software, artificial intelligence is an important and complex module, and pathfinding algorithm is one of the most basic problems in the application of artificial intelligence in video games. Objects move in a way that specifies a destination, which requires the program to be able to find an optimal path from the starting point to the target point. This path should be the shortest path that bypasses obstacles and reaches the destination. The c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F19/00
Inventor 熊仕勇林金朝周敏潘豪田航李沁翰唐浩张喜平聂婧谭世雨李杨
Owner CHONGQING UNIV OF POSTS & TELECOMM
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products