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. mongodb分组函数的使用(spring-data-mongodb)

    这两天要做mongodb日志的模块,下面记录一下. 一. 首先要导入一批数据,使用springboot来完成. 配置mongodb的复制集:在application.yml文件中配置uri来完成 格式 ...

  2. 【OC底层】一个OC对象占用多少内存?

    查看一个NSObject对象占用多少内存 1.引入头文件: #import <objc/runtime.h> #import <malloc/malloc.h> 2.代码如下: ...

  3. SVN搭建(linux 7)

    第一步:通过yum命令安装svnserve,命令如下: >yum -y install subversion 此命令会全自动安装svn服务器相关服务和依赖,安装完成会自动停止命令运行 若需查看s ...

  4. Windows Redis 取消保护模式C#进行访问

    运行redis服务程序和客户端程序设置即可. config set protected-mode “no”

  5. nginx 开启phpinfo

    在nginx配置文件中加 location / { //如果是资源文件,则不走phpinfo模式 if (!-e $request_filename){ ewrite ^/(.*)$ /index.p ...

  6. CTF-安恒19年二月月赛部分writeup

    CTF-安恒19年二月月赛部分writeup MISC1-来玩个游戏吧 题目: 第一关,一眼可以看出是盲文,之前做过类似题目 拿到在线网站解一下 ??41402abc4b2a76b9719d91101 ...

  7. 使用VS2015 编译 64位的boost库

    别人写的编译参考: 目标:使用VS2015 编译 64位的boost库. 一直以来都是在Win32环境下Build和使用boost,但现在基本上每天都在64位Win7下工作,所以很有必要把这几天的经验 ...

  8. skyline画折现bug代码

    <!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>加 ...

  9. Js中处理数据的常用内置方法

    以下方法均不会修改操作数本身,只是将操作数处理后的数据返回 1.丢弃小数部分,保留整数部分 parseInt(x);//丢弃x中的小数部分,保留x中的整数部分 2.Math对象常用的方法 ceil(x ...

  10. ZooKeeper典型使用场景一览

    场景类别 典型场景描述(ZK特性,使用方法) 应用中的具体使用 数据发布与订阅 发布与订阅即所谓的配置管理,顾名思义就是将数据发布到zk节点上,供订阅者动态获取数据,实现配置信息的集中式管理和动态更新 ...