001 package aima.search.informed; 002 003 import aima.search.framework.EvaluationFunction; 004 import aima.search.framework.Node; 005 import aima.search.framework.Problem; 006 007 /** 008 * @author Ciaran O'Reilly 009 * 010 */ 011 public class GreedyBestFirstEvaluationFunction implements EvaluationFunction { 012 013 public GreedyBestFirstEvaluationFunction() { 014 } 015 016 public Double getValue(Problem p, Node n) { 017 // f(n) = h(n) 018 return new Double(p.getHeuristicFunction().getHeuristicValue( 019 n.getState())); 020 } 021 }