public class KillerTable extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KillerTable.KTEntry
A killer heuristic table entry for storing two killer moves compressed into two integers.
|
Constructor and Description |
---|
KillerTable(int size)
Creates a killer table of the given size.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int ply,
Move m)
Inserts a move into the killer table ensuring distinctness within plies.
|
KillerTable.KTEntry |
retrieve(int ply)
Retrieves an entry containing the two (or less) killer moves from the killer table entry for the given ply.
|
public KillerTable(int size)
size
- The length of the table. Should be the maximum allowed search depth.public void add(int ply, Move m) throws ArrayIndexOutOfBoundsException
ply
- The ply from which the move caused the cut-off.m
- The move that caused the cut-off.ArrayIndexOutOfBoundsException
- Does not check whether the ply is within the table's bounds.public KillerTable.KTEntry retrieve(int ply) throws ArrayIndexOutOfBoundsException
ply
- The ply for which the killer moves are sought.ArrayIndexOutOfBoundsException
- Does not check whether the ply is within the table's bounds.Copyright © 2020. All rights reserved.