I've been playing around with move ordering in my chess engine and tried to apply piece-square positional score evaluation table (knight scores worked best, probably due to being centralizing mostly) to score history moves. Now bearing in mind the fact that history scores are stored as:
Code: Select all
history_moves[board[get_move_source(move)]][get_move_target(move)] += depth; // on alpha increase
History score move ordering
Code: Select all
info score cp 30 depth 1 nodes 41 pv d2d4
info score cp 0 depth 2 nodes 140 pv d2d4 b8c6
info score cp 30 depth 3 nodes 1181 pv d2d4 b8c6 e2e4
info score cp 0 depth 4 nodes 4164 pv d2d4 b8c6 e2e4 g8f6
info score cp 30 depth 5 nodes 34685 pv d2d4 b8c6 b1c3 g8f6 e2e4
info score cp 0 depth 6 nodes 165881 pv d2d4 g8f6 b1c3 b8c6 e2e4 d7d5
info score cp 20 depth 7 nodes 1294690 pv d2d4 g8f6 b1c3 b8c6 g1f3 d7d5 c1f4
Code: Select all
info score cp 30 depth 1 nodes 41 pv d2d4
info score cp 0 depth 2 nodes 146 pv d2d4 d7d5
info score cp 30 depth 3 nodes 1162 pv d2d4 d7d5 b1c3
info score cp 0 depth 4 nodes 4568 pv d2d4 d7d5 b1c3 g8f6
info score cp 30 depth 5 nodes 33399 pv d2d4 d7d5 b1c3 g8f6 g1f3
info score cp 0 depth 6 nodes 179353 pv d2d4 d7d5 b1c3 g8f6 g1f3 b8c6
info score cp 20 depth 7 nodes 1263793 pv d2d4 d7d5 b1c3 g8f6 g1f3 b8c6 c1f4
I'm a bit confused with actually worse results on depths 2 and 4
So my question are:
1. Does this technique make sense?
2. Any pitfalls potentially slowing down the search?
3. Did anyone try it before?