aima.core.search.framework.problem.DefaultGoalTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aima-core Show documentation
Show all versions of aima-core Show documentation
AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.
The newest version!
package aima.core.search.framework.problem;
/**
* Checks whether a given state equals an explicitly specified goal state.
*
* @author Ruediger Lunde
*/
public class DefaultGoalTest implements GoalTest {
private Object goalState;
public DefaultGoalTest(Object goalState) {
this.goalState = goalState;
}
public boolean isGoalState(Object state) {
return goalState.equals(state);
}
}