Traditional Culture Encyclopedia - Traditional culture - The shortest path of heuristic algorithm
The shortest path of heuristic algorithm
The so-called shortest path problem has many meanings. Heuristic method here refers to the function h(n) defined on a node of the search tree, which is used to evaluate the cheapest path from this node to the target node. Heuristic algorithms are usually used for well-informed search algorithms, such as the best priority greedy algorithm and A*. The optimal priority greedy algorithm will choose the node with the lowest cost as the heuristic function; A* will choose the node with the lowest cost for g(n)+h(n), which is the real cost of the path from the starting node to the current node. If h(n) is acceptable, that is to say, the cost of h(n) does not exceed the cost of reaching the goal, then A* will definitely find the optimal solution.
The classic problem that can feel the benefits of heuristic algorithm most is n-puzzle. This problem uses this algorithm when calculating the sum of the wrong puzzle graphics, the Manhattan distance of any two puzzles and how far it is from the destination. Note that the above two conditions must be within the acceptable range.
- Previous article:Toyota marriage drop, what is behind the cat?
- Next article:Business startup letter sample three
- Related articles
- Li Ziqi was trolled for appearing keyed in the video, do you think these are important? The point is that she is very filial piety
- Is Chengdu Guti Intellectual Property Company Reliable?
- What is Kalaha mentioned by the northeast population?
- How to pronounce mother-of-pearl
- Guiguzi, a classic of Chinese studies: the fourth translation of Arriving at the Opera House
- What are the customs of Deyang people?
- How to tie bangs to look good? 2 bangs braiding tutorial
- What should I draw on the west wall of the living room?
- How fragrant is the 4K HD screen and the national style color matching? Evaluation of HP Star Series Limited Star Pet Powder Book
- In "Journey to the West", what titles did the four masters and disciples of Tang Monk receive after obtaining the scriptures?