|
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.gametree.MoveEvaluation
public class MoveEvaluation
Used to represent the Comparable score for a given Move.
The score for a move is not stored with the move since we believe that responsibility is not its responsibility.
Note that the minimum() and maximum() values are true negations of each
other, which is essential for NegMaxEvaluation
and AlphaBetaEvaluation
.
Field Summary | |
---|---|
IGameMove |
move
The Move. |
int |
score
The score. |
Constructor Summary | |
---|---|
MoveEvaluation()
Constructs empty Move Evaluation with null move and -infinity score. |
|
MoveEvaluation(IGameMove m,
int score)
Constructs the evaluation object. |
|
MoveEvaluation(int score)
Constructs the evaluation object representing straight board evaluation. |
Method Summary | |
---|---|
static int |
maximum()
Return the maximum score, so a move's score can be compared. |
static int |
minimum()
Return the minimum score, so a move's score can be compared. |
java.lang.String |
toString()
Reasonable toString method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int score
public final IGameMove move
Constructor Detail |
---|
public MoveEvaluation()
public MoveEvaluation(int score)
Used within AlphaBeta when no more moves are available.
public MoveEvaluation(IGameMove m, int score)
m
- The move to makescore
- The associated score of the resulting game state.Method Detail |
---|
public static final int minimum()
public static final int maximum()
public java.lang.String toString()
toString
in class java.lang.Object
|
Algorithm Development Kit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |