aima.search.nqueens
Class NQueensFitnessFunction

java.lang.Object
  extended by aima.search.nqueens.NQueensFitnessFunction
All Implemented Interfaces:
GoalTest, FitnessFunction

public class NQueensFitnessFunction
extends java.lang.Object
implements FitnessFunction, GoalTest


Constructor Summary
NQueensFitnessFunction()
           
 
Method Summary
 java.lang.String generateRandomIndividual(int boardSize)
           
 NQueensBoard getBoardForIndividual(java.lang.String individual)
           
 java.util.Set<java.lang.Character> getFiniteAlphabetForBoardOfSize(int size)
           
 java.lang.Double getValue(java.lang.String individual)
           
 boolean isGoalState(java.lang.Object state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NQueensFitnessFunction

public NQueensFitnessFunction()
Method Detail

getValue

public java.lang.Double getValue(java.lang.String individual)
Specified by:
getValue in interface FitnessFunction

isGoalState

public boolean isGoalState(java.lang.Object state)
Specified by:
isGoalState in interface GoalTest

getBoardForIndividual

public NQueensBoard getBoardForIndividual(java.lang.String individual)

generateRandomIndividual

public java.lang.String generateRandomIndividual(int boardSize)

getFiniteAlphabetForBoardOfSize

public java.util.Set<java.lang.Character> getFiniteAlphabetForBoardOfSize(int size)