Skip to content

Instantly share code, notes, and snippets.

@pablormier
Last active August 29, 2015 14:00
Show Gist options
  • Save pablormier/11402595 to your computer and use it in GitHub Desktop.
Save pablormier/11402595 to your computer and use it in GitHub Desktop.
// Builder example with Hipster
Hipster.SearchProblem p =
ProblemBuilder.create()
.initialState(initialState)
.defineProblemWithExplicitActions()
.useActionFunction(af)
.useTransitionFunction(atf)
.useCostFunction(cf)
.useHeuristicFunction(hf)
.build();
// Control A* algorithm in an iterative fashion
for(Node n : Hipster.createAStar(p)){
if (n.state().equals(...) { ... }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment