package aima.core.environment.nqueens;

import aima.core.search.framework.evalfunc.HeuristicFunction;

/**
 * Estimates the distance to goal by the number of attacking pairs of queens on
 * the board.
 * 
 * @author R. Lunde
 */
public class AttackingPairsHeuristic implements HeuristicFunction {

	public int h(Object state) {
		NQueensBoard board = (NQueensBoard) state;
		return board.getNumberOfAttackingPairs();
	}
}

@@ -303,11 +303,14 @@
 lic 
-int
+double
  h(O

Update AttackingPairsHeuristic.java