Introduction

A* is a heuristic path searching graph algorithm. This means that given a weighed graph, it outputs the shortest path between two given nodes.

The algorithm is guaranteed to terminate for finite graphs with non-negative edge weights. Additionally, if you manage to ensure certain properties when designing your heuristic it will also always return an almost-optimal solution in a pretty efficient manner.

heuristic is a method which is constructed to guide us to the optimal solution most of the time, which means we trade in some accuracy for a lot of speed (if the heuristic is well constructed).

In this article, we’ll go over:

  • Some characteristics that we aim to have in our heuristic search algorithms in general.
  • Show a logical progression from a greedy search to A*.
  • Go through the aforementioned conditions which enable A* to solve our problem optimally and efficiently.

Table of Contents:

#java #ai #artificial intelligence #graphs in java - a* algorithm #algorithm #graphs in java

Graphs in Java - A* Algorithm
1.25 GEEK