ChienKangLu / A-star-Algorithm-for-Shortest-Path

A star search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Astar-Algorithm

A* algorithm is a type of state space search which can be used for solving problem. It will find a path with minimum cost to the goal state.

Problem Solving

  • Problem -> Goal
  • Soving -> Search
  • State -> Step
  • Successors -> The state generated from current state
  • State space -> A space contains all possible state

Data Structure

  • Openlist: priority queue
  • Closelist: list
  • Search tree

Feature

  • It can find the global optimal solution if the heuristic is admissible
  • The search is guided by heuristic cost
  • If heuristic value is set as 0, it will become best first search

Task

  • Shortest path

Implementation

  • Java

Example

City graph



Graph matrix



City heuristic



Heuristic matrix



Search tree



About

A star search


Languages

Language:Java 100.0%