What I am doing now is something like this -
Code: Select all
killers[MAX_PLIES][2][2]; //[ply][first/second][src/dst]
negamax(a, b) {
...
for (all moves) {
...
if (eval >= beta && move is not a capture or promotion) {
//add killer
if (move == first killer) { nothing needs to be done }
else if (move == second killer) { swap first and second; }
else { second_killer = first_killer; first_killer = this move; }
}
}
...
}
1. hash move
2. all captures and promotions (cannot separate winning and losing captures because I am using MVV/LVA)
3. primary killer
4. secondary killer
5. other moves by history heuristics (slight speedup)
and for depth <= 0
1. hash move
2. winning and equal captures ordered by SEE and queen promotions
I am getting an average depth of ~10.35, and killers don't help at all.
Is there something wrong?
Many thanks