public interface SolutionChecker extends GoalTest
GoalTest interface so that it is possible
to check the solution once a goal has been identified to determine if it is
acceptable. This allows you to continue searching for alternative solutions
without having to restart the search.
However, care needs to be taken when doing this as it does not always make
sense to continue with a search once an initial goal is found, for example if
using a heuristic targeted at a single goal.
Modifier and Type | Method and Description |
---|---|
boolean |
isAcceptableSolution(java.util.List<Action> actions,
java.lang.Object goal)
This method is only called if GoalTest.isGoalState() returns true.
|
isGoalState
boolean isAcceptableSolution(java.util.List<Action> actions, java.lang.Object goal)
actions
- the list of actions to get to the goal state.goal
- the goal the list of actions will reach.