|
Algorithm Development Kit 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectalgs.model.problems.eightpuzzle.WeakEvaluator
public class WeakEvaluator
Weak evaluation function, as drawn from Nilsson, p. 56.
| Constructor Summary | |
|---|---|
WeakEvaluator()
|
|
| Method Summary | |
|---|---|
int |
eval(INode state)
Eval = g(n) + W(n), where g(n) is length of the path from initial to node n, and W(n) counts number of misplaced tiles in the state description |
void |
score(INode state)
Evaluate the given state and update its score using our scoring function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WeakEvaluator()
| Method Detail |
|---|
public void score(INode state)
IScore
score in interface IScorestate - The board state whose score value is to be updated.IScore.score(INode)public int eval(INode state)
eval in interface IScorestate - state being evaluatedIScore.score(INode)
|
Algorithm Development Kit 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||