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. 安装Win7时删除系统保留的100M隐藏分区

    原创文章,作者:lenbs,如若转载,请注明出处:https://www.smbinn.com/delwindows7100m.html 安装windows7新建磁盘分区时系统会自动创建100M的保留 ...

  2. Linux 不杀进程的情况下,如何释放磁盘资源

    最近项目组人员反馈一个问题:即磁盘空间满了,但是并没看到有什么文件占用空间: [root@xxxx home]# df -h Filesystem Size Used Avail Use% Mount ...

  3. Windows Oracle连接ORA-12541:TNS:无监听程序

    上面两篇是安装和连接,这里写一下碰到的问题,安装后使用SQL Developer连接出现ORA-12541:TNS:无监听程序.网上搜了一下是安装的Oracle中自带的JDK是32位,而程序中使用的S ...

  4. PHP 变量分页标签页面源代码技术分享

    最近在研究PHP的常规变量的分页源代码.  现在发布一个给大家看一下. defined('IN_DUOAO') or exit('No permission resources.');$smarty ...

  5. ETL项目1:大数据采集,清洗,处理:使用MapReduce进行离线数据分析完整项目

    ETL项目1:大数据采集,清洗,处理:使用MapReduce进行离线数据分析完整项目 思路分析: 1.1 log日志生成 用curl模拟请求,nginx反向代理80端口来生成日志. #! /bin/b ...

  6. Mac下Anaconda的安装和使用

    前提 在刚接触python的时候我想大多数人都会面临一个问题,我到底是选择2还是3,因为现在网上好多的资料和视频项目中都还是用的2,我们跟着学习的时候肯定也是首先从2开始学的,但是我们心里肯定也担心学 ...

  7. homebrew 使用心得

    ''' 安装anaconda 安装命令: brew search anaconda brew cask install anaconda 添加环境变量: vi ~/.bash_profile expo ...

  8. 【非原创】Game23

    #include<stdio.h>int main(){ int n,m,x=0,flag=0; scanf("%d%d",&n,&m); x=m/n; ...

  9. A1070

    给出总价和需求量,求最大收益. 思路:求单价最高的,排序. #include<cstdio> #include<algorithm> using namespace std; ...

  10. package html to native application

    npm install nw -g npm . https://github.com/nwjs/nw.js/ https://github.com/nwjs/nw.js/wiki/How-to-run ...