I'm watching the Youtube-Tutorial of the BBC chess engine and on one episode, he talks about history moves and in my C++ code, which is structured differently, it actually takes much longer to calculate with history moves. In fact, beginning at depth 8, it's like an infinite loop.
Here is what the BBC engine has developed:
Code: Select all
static inline int negamax(int alpha, int beta, int depth)
{
// code generation and evaluation...
// found a better move
if (score > alpha)
{
// store history moves
history_moves[get_move_piece(move_list->moves[count])][get_move_target(move_list->moves[count])] += depth;
}
}
My history move code can be found here.
And here is the test I use (PreventPotentialMateIn5ForWhitePart1).
Has anyone an idea why history moves doesn't work for me? I'm grateful for any help!
Btw.: I'm using Google Test. So you need this in order to be able to execute the test.
Cheers,
Steffo