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

What is difference between BFS and Dijkstra's algorithms when looking for shortest path?, stackoverflow

[Algorithm] A* Search Algorithm Basic的更多相关文章

  1. TSearch & TFileSearch Version 2.2 -Boyer-Moore-Horspool search algorithm

    unit Searches; (*-----------------------------------------------------------------------------* | Co ...

  2. [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 ...

  3. [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 ...

  4. 笔试算法题(48):简介 - A*搜索算法(A Star Search Algorithm)

    A*搜索算法(A Star Search Algorithm) A*算法主要用于在二维平面上寻找两个点之间的最短路径.在从起始点到目标点的过程中有很多个状态空间,DFS和BFS没有任何启发策略所以穷举 ...

  5. [Algorithms] Binary Search Algorithm using TypeScript

    (binary search trees) which form the basis of modern databases and immutable data structures. Binary ...

  6. 【437】Binary search algorithm,二分搜索算法

    Complexity: O(log(n)) Ref: Binary search algorithm or 二分搜索算法 Ref: C 版本 while 循环 C Language scripts b ...

  7. js binary search algorithm

    js binary search algorithm js 二分查找算法 二分查找, 前置条件 存储在数组中 有序排列 理想条件: 数组是递增排列,数组中的元素互不相同; 重排 & 去重 顺序 ...

  8. 【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 ...

  9. Prim's Algorithm & Kruskal's algorithm

    1. Problem These two algorithm are all used to find a minimum spanning tree for a weighted undirecte ...

随机推荐

  1. 19-3-13Python中的函数

    def:关键字.定义.声明一个函数. def make():定义函数'make' *注:定义后的函数不调用是不执行的 函数的调用: 函数名+()==函数的调用 def addnum(): a = in ...

  2. JS变量、作用域、内存

    写到这个题目<JS变量.作用域,内存>,我就不由自主想起了黄金三嫖客.可能是名字有点像,嗯,一定是这样子的! JS接触下来,应该是要比Java简单不少的,所以,要学好啊.立个flag半年后 ...

  3. Redis之Redis事务

    Redis事务的概念: Redis 事务的本质是一组命令的集合.事务支持一次执行多个命令,一个事务中所有命令都会被序列化.在事务执行过程,会按照顺序串行化执行队列中的命令,其他客户端提交的命令请求不会 ...

  4. php 二位数组排序

    $member_ship_level 是一个二维数组 $res = array_column($member_ship_level,'integral'); array_multisort($res, ...

  5. ruby安装devkit

    双击下载文件,指定解压路径,路径中不能有空格.如C:\DevKit,这个路径就是<DEVKIT_INSTALL_DIR>. > cd <DEVKIT_INSTALL_DIR&g ...

  6. ACM1009:FatMouse' Trade

    Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding th ...

  7. 一个博客萌新的C语言之旅(持续更新中....)

    先更新上一次留下的的C语言练习答案,如下: #include <stdio.h> double mj(double r) { return 3.14*r*r; } int main() { ...

  8. android studio 插件开发(自动生成框架代码插件)

    android studio 插件开发 起因 去年公司开始上新项目,正好android在架构这方面的讨论也开始多了起来,于是mvp架构模型就进入我们技术选择方案里面,mvp有很多好处,但是有一个非常麻 ...

  9. 4.28-python学习笔记(转义符&input函数)

    参考书目:<Learn Python The Hard Way> ##练习10 print("i am 6'2\"tall.")#将双引号转义 print(' ...

  10. 将python自动转换为.exe文件

    使用py2exe包进行转换.py2exe怎么装的可以网上另查.时间久了,记不太清了...... 这个程序可以把自己进行转换.但是没法运行....其实只要是需要修改自身的程序打包后都没法运行. # -* ...