Package rushhour
Interface Runners
- All Known Implementing Classes:
BreadthFirstFinder
,MovesFinder
public interface Runners
Provides methods for running sample boards to classes implementing
Rushhour solution search via the standard graph search hierarchy.
-
Method Summary
Modifier and Type Method Description long
getLastAddedToFrontier()
Capture the total number of nodes added to the frontier after a call tosearch(rushhour.model.BoardState)
.long
getLastExpandedFromFrontier()
Capture the total number of nodes expanded from the frontier after a call tosearch(rushhour.model.BoardState)
.default void
runSampleBoards()
Runssearch(rushhour.model.BoardState)
on all of the boards registered in theBoards.BOARDS
sample list.default ArrayList<Move>
runSearch(BoardState board)
Expands one @{link BoardState}, and returns the sequence of moves in the solution.BoardNode
search(BoardState b)
This method for finding a path from start to stop state much be present.
-
Method Details
-
search
This method for finding a path from start to stop state much be present.- Throws:
SearchFailureException
-
getLastAddedToFrontier
long getLastAddedToFrontier()Capture the total number of nodes added to the frontier after a call tosearch(rushhour.model.BoardState)
. -
getLastExpandedFromFrontier
long getLastExpandedFromFrontier()Capture the total number of nodes expanded from the frontier after a call tosearch(rushhour.model.BoardState)
. -
runSearch
Expands one @{link BoardState}, and returns the sequence of moves in the solution. -
runSampleBoards
default void runSampleBoards()Runssearch(rushhour.model.BoardState)
on all of the boards registered in theBoards.BOARDS
sample list. This method is useful to call from the main method of a fully-conrete A* or BFS searcher for Rushhour.
-