Class HistoryTable
java.lang.Object
ubc.team09.search.HistoryTable
A history table is used to track which moves have produced cutoffs in the
past and increments their score accordingly. When searching the game tree,
the history table can be used to order child states. Since this approach
only involves table lookups, it's much faster than just about any other
ordering method, and the quality of the ordering has been shown to be far
more effective than ordering by evaluation scores.
See Also
See Also
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Comparator<State> A comparator for states that orders them in descending order based on their history scores. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidincreaseScore(int move, int depth) Used to indicate that a move is sufficient; i.e., it's score should be increased.intscore(int move) Gets the history score of a move.
-
Field Details
-
descending
A comparator for states that orders them in descending order based on their history scores.
-
-
Constructor Details
-
HistoryTable
public HistoryTable()Creates a new, empty history table.
-
-
Method Details
-
score
public int score(int move) -
increaseScore
public void increaseScore(int move, int depth) Used to indicate that a move is sufficient; i.e., it's score should be increased. This should be used whenever a move produces a cutoff.- Parameters:
depth- The depth at which the cutoff was found. Greater depths (i.e., those closer to the root) prune more branches, and are thus given higher history scores.
-