[Algorithm] A* Search Algorithm Basic
A* is a best-first search, meaning that it solves problems by searching amoung all possible paths to the solution(goal) for the one that incurs the smallest cost(least distance, shortest time, etc.), and among these paths it first considers the one that appears most quickly to the solution.
At each iteration of its main loop, A* need to determine which of its partial paths to expand one or more longer paths. A* selects the path that minimizes
f(n) = g(n) + h(n)
where n is the last node on the path, g(n) is the cost of the path from the start node to n, and h(n) is heuristic that estimates the cheapest cost of path from n to the goal. The heuristic is problem-specific.
a sample of A* search

A* is admissable and considers fewer nodes than any other admissable search algorithm with the same heuristic. This is because A* use an "optimistic" estimate of the cost of a path through every node that it considers -- optimistic in that the true cost of path through that node to goal will be at least as great as the estimate.
Dijkstra's algorithm is a special case of A* where h(x)=0 for all x.
BFS(Breadth-First Search) is a special case of Dijkstra's algorithm where all edge weights equal to 1.
What set A* apart from greedy best-first search algorithm is that it take the cost/distance already traveled, g(n), into account.
Reference:
A* search algorithm, wikipedia
Dijkstra's algorithm, wikipedia
Breadth-first search, wikipedia
[Algorithm] A* Search Algorithm Basic的更多相关文章
- TSearch & TFileSearch Version 2.2 -Boyer-Moore-Horspool search algorithm
unit Searches; (*-----------------------------------------------------------------------------* | Co ...
- [Algorithm] Write a Depth First Search Algorithm for Graphs in JavaScript
Depth first search is a graph search algorithm that starts at one node and uses recursion to travel ...
- [Algorithm] Breadth First JavaScript Search Algorithm for Graphs
Breadth first search is a graph search algorithm that starts at one node and visits neighboring node ...
- 笔试算法题(48):简介 - A*搜索算法(A Star Search Algorithm)
A*搜索算法(A Star Search Algorithm) A*算法主要用于在二维平面上寻找两个点之间的最短路径.在从起始点到目标点的过程中有很多个状态空间,DFS和BFS没有任何启发策略所以穷举 ...
- [Algorithms] Binary Search Algorithm using TypeScript
(binary search trees) which form the basis of modern databases and immutable data structures. Binary ...
- 【437】Binary search algorithm,二分搜索算法
Complexity: O(log(n)) Ref: Binary search algorithm or 二分搜索算法 Ref: C 版本 while 循环 C Language scripts b ...
- js binary search algorithm
js binary search algorithm js 二分查找算法 二分查找, 前置条件 存储在数组中 有序排列 理想条件: 数组是递增排列,数组中的元素互不相同; 重排 & 去重 顺序 ...
- 【Java】-NO.13.Algorithm.1.Java Algorithm.1.001-【Java 常用算法手册 】-
1.0.0 Summary Tittle:[Java]-NO.13.Algorithm.1.Java Algorithm.1.001-[Java 常用算法手册 ]- Style:Java Series ...
- Prim's Algorithm & Kruskal's algorithm
1. Problem These two algorithm are all used to find a minimum spanning tree for a weighted undirecte ...
随机推荐
- volatile关键字到底做了什么?
话不多说,直接贴代码 class Singleton { private static volatile Singleton instance; private Singleton(){} //双重判 ...
- PyCharm2018激活码
亲测可用: 来自:https://blog.csdn.net/u014044812/article/details/78727496
- kvo本质探寻
一.概述 1.本文章内容,须参照本人的另一篇博客文章“class和object_getClass方法区别”加以理解: 2.基本使用: //给实例对象instance添加观察者,监听该实例对象的某个属性 ...
- Mac 模拟慢速网络
作为开发者,为了提升用户体验,有时需要模拟不同环境的网络.Mac环境下模拟慢速网络可以使用苹果官方提供的工具:Network Link Conditioner. 1.点击苹果开发者网站提供的下载页面, ...
- python正则中如何匹配汉字以及encode(‘utf-8’)和decode(‘utf-8’)的互转
正则表达式: [\u2E80-\u9FFF]+$ 匹配所有东亚区的语言 [\u4E00-\u9FFF]+$ 匹配简体和繁体 [\u4E00-\u9FA5]+$ 匹配简体 <input ty ...
- Linux下设置共享目录
Linux系统的文件或目录的共享功能是非常强大,而且是非常灵活的,其对权限的控制可以做到非常的细致,当然如果你是通过命令行方式进行设置的 话,那么对于刚接触linux系统的用户来说将是一件十分头痛的事 ...
- 记录一下自己用jQuery写的轮播图
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 在vscode中使用webpack中安装的echarts文件失败,dom获取class名,图表不显示
所有的东西都是新学的,所以遇到了很多问题: (1)首先,在电脑上已经安装了node的情况下, 在npm中安装echarts:npm install echarts --save mac系统在最前面加上 ...
- vs code 修改文件的缩进
百度这个问题的都是强迫症患者. 前人代码是2个空格缩进,我习惯3个, step1:打开 文件 —> 首选项 —> 设置,进入用户设置 step2:设置缩进量,(加两句代码) step3 ...
- 关于Xshell无法连接本地虚拟机的问题
近期想搭建一个测试用的集群,但是! 刚开始搭第一台虚拟机就出现问题了,Xshell无法连接到虚拟机! 然后我更改了/etc/sysconfig/network-scripts/ifcfg-ens33 ...