public final class

Hipster

extends Object
java.lang.Object
   ↳ es.usc.citius.hipster.algorithm.Hipster

Class Overview

Util class to create algorithms easily. Each method expects a SearchProblem with the components of the algorithm and returns an iterable algorithm that can be used to search a goal or iterate over the state space. A SearchProblem can be easily defined with the ProblemBuilder class.

See Also

Summary

Public Methods
static <A, S, C extends Comparable<C>> ADStarForward<A, S, C, ADStarNodeImpl<A, S, C>> createADStar(SearchComponents<A, S, C> components)
Instantiates a Anytime Dynamic A* algorithm given the search components.
static <A, S, C extends Comparable<C>, N extends HeuristicNode<A, S, C, N>> AStar<A, S, C, N> createAStar(SearchProblem<A, S, N> components)
Instantiates a A* algorithm given a problem definition.
static <A, S, N extends HeuristicNode<A, S, Double, N>> AnnealingSearch<A, S, N> createAnnealingSearch(SearchProblem<A, S, N> components, Double alpha, Double minTemp, AnnealingSearch.AcceptanceProbability acceptanceProbability, SuccessorFinder<A, S, N> successorFinder)
Instantiates an AnnealingSearch algorithm given a problem definition.
static <A, S, C extends Comparable<C>, N extends CostNode<A, S, C, N>> BellmanFord<A, S, C, N> createBellmanFord(SearchProblem<A, S, N> components)
Instantiates a Bellman Ford algorithm for a problem definition.
static <A, S, N extends Node<A, S, N>> BreadthFirstSearch<A, S, N> createBreadthFirstSearch(SearchProblem<A, S, N> components)
Instantiates Breadth First Search algorithm for a problem definition.
static <A, S, N extends Node<A, S, N>> DepthFirstSearch<A, S, N> createDepthFirstSearch(SearchProblem<A, S, N> components)
Instantiates Depth First Search algorithm for a problem definition.
static <A, S, N extends Node<A, S, N>> DepthLimitedSearch<A, S, N> createDepthLimitedSearch(SearchProblem<A, S, N> components, int depth)
Instantiates Depth Limited Search algorithm for a problem definition.
static <A, S, C extends Comparable<C>, N extends HeuristicNode<A, S, C, N>> AStar<A, S, C, N> createDijkstra(SearchProblem<A, S, N> components)
Instantiates a Dijkstra algorithm (A* algorithm with no heuristic function) given a problem definition.
static <A, S, C extends Comparable<C>, N extends HeuristicNode<A, S, C, N>> HillClimbing<A, S, C, N> createHillClimbing(SearchProblem<A, S, N> components, boolean enforced)
Instantiates a Hill Climbing algorithm given a problem definition.
static <A, S, C extends Comparable<C>, N extends HeuristicNode<A, S, C, N>> IDAStar<A, S, C, N> createIDAStar(SearchProblem<A, S, N> components)
Instantiates a IDA* algorithm given a problem definition.
static <A, S, C extends Comparable<C>, N extends HeuristicNode<A, S, C, N>> MultiobjectiveLS<A, S, C, N> createMultiobjectiveLS(SearchProblem<A, S, N> components)
Instantiates a Multi-objective Label Setting algorithm given a problem definition.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static ADStarForward<A, S, C, ADStarNodeImpl<A, S, C>> createADStar (SearchComponents<A, S, C> components)

Instantiates a Anytime Dynamic A* algorithm given the search components. Search components can be obtained easily for graph-based problems using es.usc.citius.hipster.util.graph.GraphSearchProblem.

Parameters
components search components to be used by the algorithm
Returns

public static AStar<A, S, C, N> createAStar (SearchProblem<A, S, N> components)

Instantiates a A* algorithm given a problem definition.

Parameters
components search problem definition with the components of the algorithm
Returns
  • instance of AStar for the problem definition

public static AnnealingSearch<A, S, N> createAnnealingSearch (SearchProblem<A, S, N> components, Double alpha, Double minTemp, AnnealingSearch.AcceptanceProbability acceptanceProbability, SuccessorFinder<A, S, N> successorFinder)

Instantiates an AnnealingSearch algorithm given a problem definition.

Parameters
components search problem definition with the components of the algorithm
alpha coefficient of the geometric cooling schedule
Returns

public static BellmanFord<A, S, C, N> createBellmanFord (SearchProblem<A, S, N> components)

Instantiates a Bellman Ford algorithm for a problem definition.

Parameters
components search problem definition with the components of the algorithm
Returns

public static BreadthFirstSearch<A, S, N> createBreadthFirstSearch (SearchProblem<A, S, N> components)

Instantiates Breadth First Search algorithm for a problem definition.

Parameters
components search problem definition with the components of the algorithm
Returns

public static DepthFirstSearch<A, S, N> createDepthFirstSearch (SearchProblem<A, S, N> components)

Instantiates Depth First Search algorithm for a problem definition.

Parameters
components search problem definition with the components of the algorithm
Returns

public static DepthLimitedSearch<A, S, N> createDepthLimitedSearch (SearchProblem<A, S, N> components, int depth)

Instantiates Depth Limited Search algorithm for a problem definition.

Parameters
components search problem definition with the components of the algorithm
Returns

public static AStar<A, S, C, N> createDijkstra (SearchProblem<A, S, N> components)

Instantiates a Dijkstra algorithm (A* algorithm with no heuristic function) given a problem definition.

Parameters
components search problem definition with the components of the algorithm
Returns
  • instance of AStar for the problem definition, using no heuristic.

public static HillClimbing<A, S, C, N> createHillClimbing (SearchProblem<A, S, N> components, boolean enforced)

Instantiates a Hill Climbing algorithm given a problem definition.

Parameters
components search problem definition with the components of the algorithm
enforced flag to use Enforced Hill Climbing instead of classic Hill Climbing algorithm
Returns

public static IDAStar<A, S, C, N> createIDAStar (SearchProblem<A, S, N> components)

Instantiates a IDA* algorithm given a problem definition.

Parameters
components search problem definition with the components of the algorithm
Returns
  • instance of IDAStar for the problem definition

public static MultiobjectiveLS<A, S, C, N> createMultiobjectiveLS (SearchProblem<A, S, N> components)

Instantiates a Multi-objective Label Setting algorithm given a problem definition.

Parameters
components search problem definition with the components of the algorithm
Returns