Package rushhour
Class AbstractSolution
java.lang.Object
rushhour.AbstractSolution
public abstract class AbstractSolution extends Object
Wrapper for the heuristic homework solution.
-
Field Summary
Fields Modifier and Type Field Description static String
ANSI_BLUE_BACKGROUND
static String
ANSI_CYAN_BACKGROUND
static String
ANSI_GREEN_BACKGROUND
static String
ANSI_PURPLE_BACKGROUND
static String
ANSI_RED_BACKGROUND
static String
ANSI_RESET
static String
ANSI_WHITE_BACKGROUND
static String
ANSI_YELLOW_BACKGROUND
-
Constructor Summary
Constructors Constructor Description AbstractSolution(MovesFinder... moves)
The constructor takes the implementations of A* with various heuristics as arguments. -
Method Summary
-
Field Details
-
ANSI_RESET
- See Also:
- Constant Field Values
-
ANSI_RED_BACKGROUND
- See Also:
- Constant Field Values
-
ANSI_GREEN_BACKGROUND
- See Also:
- Constant Field Values
-
ANSI_YELLOW_BACKGROUND
- See Also:
- Constant Field Values
-
ANSI_BLUE_BACKGROUND
- See Also:
- Constant Field Values
-
ANSI_PURPLE_BACKGROUND
- See Also:
- Constant Field Values
-
ANSI_CYAN_BACKGROUND
- See Also:
- Constant Field Values
-
ANSI_WHITE_BACKGROUND
- See Also:
- Constant Field Values
-
-
Constructor Details
-
AbstractSolution
The constructor takes the implementations of A* with various heuristics as arguments.
-
-
Method Details
-
run
public void run()A sample runner for the solution: runs all of the solvers (plus BFS) on all of the sample boards, and shows the results as a table. You might find it useful to extend your version of this method to help you with the effective branching factor calculations. -
nodesFrom
public double nodesFrom(long trueDepth, double ebf)
-