001    package aima.search.nqueens;
002    
003    import aima.search.framework.HeuristicFunction;
004    
005    /**
006     * @author Ravi Mohan
007     * 
008     */
009    
010    public class QueensToBePlacedHeuristic implements HeuristicFunction {
011            public double getHeuristicValue(Object state) {
012                    NQueensBoard board = (NQueensBoard) state;
013                    return board.size - board.getNumberOfQueensOnBoard();
014            }
015    
016    }