private double getValue(Problem p, Node n)
 {
     // assumption greater heuristic value =>
     // HIGHER on hill; 0 == goal state;
     // SA deals with gardient DESCENT
     return(-1 * hf.h(n.getState()));
 }
 public double f(Node n)
 {
     // f(n) = g(n) + h(n)
     return(gf.g(n) + hf.h(n.getState()));
 }
Beispiel #3
0
 public double f(Node n)
 {
     // f(n) = h(n)
     return(hf.h(n.getState()));
 }
Beispiel #4
0
 private double getValue(Node n)
 {
     // assumption greater heuristic value =>
     // HIGHER on hill; 0 == goal state;
     return(-1 * hf.h(n.getState()));
 }