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. 01 Oracle分区索引

    Oracle分区索引   索引与表类似,也可以分区: 分区索引分为两类: Locally partitioned index(局部分区索引) Globally partitioned index(全局 ...

  2. node引入bootstrap npm报错

    今天node引入bootstrap npm报错 但是页面正常显示   最后发现bootstrap.min.js.map没有放在文件里  虽然不用页面中引入    另外也发现了怎么看这种错误了

  3. HCNA(一)网络传输介质

    一 .同轴线缆 介绍:同轴线缆是一种早期的网络传输介质,同轴电缆的得名与它的结构相关,由内导体.外导体.绝缘介质和防护套四部分组成.同样支持10Mbps传输速率.现在已经基本被淘汰,不在应用于企业网络 ...

  4. 使用docker-compose运行微服务项目#eureka+config+auth+gateway+module

    微服务架构中我们使用了必须的四个组件,eureka config gateway auth 其中config依赖eureka,auth依赖前两者,gateway又依赖auth 这样就确定了四个组件的启 ...

  5. PCB布线设计(1)

    在PCB设计的时候,初学的时候对布线设计一无所知,那个时候老师布置  AT91SAM7X-开发板 作为学习例板  ,最终采用自动布线的结果如下 也并非全为自动布线,自动布线对于这种元器件稍多的很难全部 ...

  6. SpringBoot入门案例——创建maven Module方式

    最近看到一个大牛写的spring boot案例,链接贴这 https://github.com/ityouknow/spring-boot-examples.git 这里通过在maven里创建多个mo ...

  7. BAPI_MATERIAL_SAVEDATA

    品目マスタ登録変更BAPI 概要 品目マスタを登録または変更するBAPIです.品目マスタのビューの拡張も行うことができます. BAPIでは品目マスタ登録画面(MM01)のような入力チェックがかからない ...

  8. java入门---运算符&逻辑运算符&短路逻辑运算符&赋值运算符&条件运算符&instanceof 运算符

        这篇文章接着上次的来,主要看逻辑运算符&短路逻辑运算符&赋值运算符&条件运算符&instanceof 运算符这五种运算符.     首先来看逻辑运算符.下表列出 ...

  9. thinkphp查询:

    $Role=D('role'); //查询数据表 $role_data = $Role->order('role_id')->group('role_name')->select() ...

  10. oracle基础命令

    oracle使用步骤: 一.oracle安装 两个文件解压到同一文件夹,doc为说明/使用文档 二.oracle启动: 1.启动oracle:启动监听和自定义库 2.启动cmd->sqlplus ...