Move ordering at different (Knuth) node types
Posted: 21 Feb 2006, 17:06
Afternoon,
I've been experimenting lately with various move ordering schemes to reduce the size of the search tree. I've mainly been tracking two components,
1) the percentage of fail-highs at CUT nodes for the 1st, 2nd and 3rd moves
2) the percentage of times the 1st-10th moves at a PV node is the best move in the position.
As Gian-Carlo pointed out recently (1) isn't such a great indicator of tree size (it averages around 90-93% for the first move), but (2) is much more interesting, it averages around 50-65%, also for the first move. To really understand this, I break my search up into the following phases:
1. Hash move
2. Killer mates
3. Winning/Even captures
4. Killers (non-mate)
5. Queen promotions
6. Castling moves (kingside/queenside)
7. Winning even mundanes
8. Losing captures
9. Losing mundanes
10. Non-queen promotions
I verify of course, that I don't search any move more than once. The interesting thing about this is that if I track the percentage of each phase where the 1st, 2nd, 3rd etc. move caused a cutoff or was the best move--the move ordering is significantly different for CUT nodes versus PV nodes (I don't check ALL nodes, since they shouldn't produce a cutoff and order is unimportant).
Has anyone else seen a similar phenomenon? It may be advantageous to order the moves differently depending on the type of node we are searching. It's interesting, although the number of PV nodes is small compared to the number of CUT/ALL nodes, their overall effect on the size of the tree is enormous. Spending extra time ordering these nodes could potentially produce a huge benefit.
regards,
--tom
I've been experimenting lately with various move ordering schemes to reduce the size of the search tree. I've mainly been tracking two components,
1) the percentage of fail-highs at CUT nodes for the 1st, 2nd and 3rd moves
2) the percentage of times the 1st-10th moves at a PV node is the best move in the position.
As Gian-Carlo pointed out recently (1) isn't such a great indicator of tree size (it averages around 90-93% for the first move), but (2) is much more interesting, it averages around 50-65%, also for the first move. To really understand this, I break my search up into the following phases:
1. Hash move
2. Killer mates
3. Winning/Even captures
4. Killers (non-mate)
5. Queen promotions
6. Castling moves (kingside/queenside)
7. Winning even mundanes
8. Losing captures
9. Losing mundanes
10. Non-queen promotions
I verify of course, that I don't search any move more than once. The interesting thing about this is that if I track the percentage of each phase where the 1st, 2nd, 3rd etc. move caused a cutoff or was the best move--the move ordering is significantly different for CUT nodes versus PV nodes (I don't check ALL nodes, since they shouldn't produce a cutoff and order is unimportant).
Has anyone else seen a similar phenomenon? It may be advantageous to order the moves differently depending on the type of node we are searching. It's interesting, although the number of PV nodes is small compared to the number of CUT/ALL nodes, their overall effect on the size of the tree is enormous. Spending extra time ordering these nodes could potentially produce a huge benefit.
regards,
--tom