public class


extends Object
   ↳ es.usc.citius.hipster.examples.RomanianProblemExample

Class Overview

Example of graph search using the Romania problem described here.

This example consists in a search problem based on a HipsterGraph. Main characteristics of this example are:

  • Uses GraphSearchProblem, a subclass of SearchProblem specially designed to facilitate working with graph search problems.
  • The nodes of the graph are different cities in Romania.
  • Edges of the graph (connectivity between cities) are defined in the link above.
  • Graph nodes and edges are defined in RomanianProblem
  • Finds the shortest path between the cities Arad and Bucharest.
  • Cost function takes the cost of moving between cities from the arcs of the graph.
Although a heuristic is not used in this example (so A* behaves as Dijkstra's algorithm), it is defined in heuristicFunction(). This heuristic stores the Euclidean Distance between each city and Bucharest.


Public Constructors
Public Methods
static void main(String[] args)
Inherited Methods
From class java.lang.Object

Public Constructors

public RomanianProblemExample ()

Public Methods

public static void main (String[] args)