All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aima.core.environment.eightpuzzle.EightPuzzleGoalTest Maven / Gradle / Ivy

Go to download

AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.

The newest version!
package aima.core.environment.eightpuzzle;

import aima.core.search.framework.problem.GoalTest;

/**
 * @author Ravi Mohan
 * 
 */
public class EightPuzzleGoalTest implements GoalTest {
	EightPuzzleBoard goal = new EightPuzzleBoard(new int[] { 0, 1, 2, 3, 4, 5,
			6, 7, 8 });

	public boolean isGoalState(Object state) {
		EightPuzzleBoard board = (EightPuzzleBoard) state;
		return board.equals(goal);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy