Your confirmation of my observation over there is an indication you are correct, also various submissions seem to confirm it. I will post the results tomorrow. What a pity.rjgibert wrote:This isn't a good way to compare move ordering efficiency between programs. The more selective searchers will prune away substantial parts of the tree, that less selective searchers will still consider. This will bias the results. You admit as much on your results page.Rebel wrote:Don't take the subject line too serious, it's meant as fun mainly but perhaps there is some learning effect also. So let's compare your move ordering with others and how efficient it is.
Some time ago Don courageously stated Komodo has the best move ordering of all, so Don, here is your chance to proof it
I made a little script for just 10 positions as an opening move for further discussion, on the result page suggested 2 better proposals. But for a start check it out first.
http://www.top-5000.nl/motest.htm
http://www.top-5000.nl/moresu.htm
Move ordering contest
Moderators: hgm, Rebel, chrisw
-
- Posts: 6997
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Move ordering contest
-
- Posts: 6997
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Move ordering contest
I think you are right on both accounts.Don wrote:I think a better measure might be to give the second move half credit, the 3rd move 1/4 credit, and so on. A BIG part of the move ordering in Komodo is how the moves that are NOT either the history move or a capture or killer. This would impact that, but I don't think it would show the full power.
-
- Posts: 690
- Joined: Mon Apr 19, 2010 7:07 pm
- Location: Sweden
- Full name: Peter Osterlund
Re: Move ordering contest
Here is a trick question related to the sample code on the above page. What does this program do?Rebel wrote:http://www.top-5000.nl/motest.htm
Code: Select all
#include <stdio.h>
int main() {
float f, sum = 0;
for (f = 0; f < 20000000; f++)
sum += f;
printf("sum = %f\n", sum);
return 0;
}
-
- Posts: 27814
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Move ordering contest
Loop forever?
As to the move ordering problem: It is not the probability of the first-move cut, but the average number of moves that is related to tree size. (80% first move and the remaining 20% second move would be better than 90% first move and the remaining 10% equally distributed between move 2-30: 1.2 moves vs 2.5 move). So it would be better to increase count1 by the number of searched moves in a cut-node, and count2 by the total nnumber of moves in that node, and print count1*100/count2 afterwards.
In the face of reductions, even that is meaningless: even if the null move would have only 60% chance on a cutoff, and the best capture would have 90% chance, it is better to try the null move first if the reduction would make its search 10 times cheaper: 0.6*0.1 + 0.4*0.9*1.1 = 0.42, while 0.9*1 + 0.1*0.6*1.1 = 0.966, more than 2 times as large.
As to the move ordering problem: It is not the probability of the first-move cut, but the average number of moves that is related to tree size. (80% first move and the remaining 20% second move would be better than 90% first move and the remaining 10% equally distributed between move 2-30: 1.2 moves vs 2.5 move). So it would be better to increase count1 by the number of searched moves in a cut-node, and count2 by the total nnumber of moves in that node, and print count1*100/count2 afterwards.
In the face of reductions, even that is meaningless: even if the null move would have only 60% chance on a cutoff, and the best capture would have 90% chance, it is better to try the null move first if the reduction would make its search 10 times cheaper: 0.6*0.1 + 0.4*0.9*1.1 = 0.42, while 0.9*1 + 0.1*0.6*1.1 = 0.966, more than 2 times as large.
Last edited by hgm on Sun May 26, 2013 10:38 pm, edited 1 time in total.
-
- Posts: 690
- Joined: Mon Apr 19, 2010 7:07 pm
- Location: Sweden
- Full name: Peter Osterlund
Re: Move ordering contest
Exactly, at least if IEEE 754 float math is used, which is the case with many compilers on standard PC hardware.hgm wrote:Loop forever?
For the same reason, the sample code will give wrong results if there are more than 2^24 beta cutoffs within the 30s search time period. My program got at most 15e6 cutoffs for the 10 test positions, but a faster program could easily get wrong results.
-
- Posts: 317
- Joined: Mon Jun 26, 2006 9:44 am
Re: Move ordering contest
So far, out of 8 submissions, the best one seems to be Cheese 1.5 beta at 92.04% averaged and the worst is Komodo CCT at 86.22% averaged despite something like a 700 point rating advantage. A fair comparison between programs seems problematic.Rebel wrote:Your confirmation of my observation over there is an indication you are correct, also various submissions seem to confirm it. I will post the results tomorrow. What a pity.rjgibert wrote:This isn't a good way to compare move ordering efficiency between programs. The more selective searchers will prune away substantial parts of the tree, that less selective searchers will still consider. This will bias the results. You admit as much on your results page.Rebel wrote:Don't take the subject line too serious, it's meant as fun mainly but perhaps there is some learning effect also. So let's compare your move ordering with others and how efficient it is.
Some time ago Don courageously stated Komodo has the best move ordering of all, so Don, here is your chance to proof it
I made a little script for just 10 positions as an opening move for further discussion, on the result page suggested 2 better proposals. But for a start check it out first.
http://www.top-5000.nl/motest.htm
http://www.top-5000.nl/moresu.htm
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: Move ordering contest
I said that wrong but I think you get the point. I meant after the hash move, captures and killers we have all the rest of the moves, and that is critical to Komodo. Most programs do the hash, captures and killers more or less the same and correctly but many don't do well with the other moves and that is a really big deal.Rebel wrote:I think you are right on both accounts.Don wrote:I think a better measure might be to give the second move half credit, the 3rd move 1/4 credit, and so on. A BIG part of the move ordering in Komodo is how the moves that are NOT either the history move or a capture or killer. This would impact that, but I don't think it would show the full power.
But I think there is a reasonable way to "instrument" move ordering. I suggested the half credit for each successive move but perhaps HG's idea is better. It comes down to the nodes where you actually get cutoffs - measuring the average number of moves you had to play to get there or perhaps or some weighted average of those. If I understand HG he would measure it based on how many choices you had? I'm going to reread his suggestion.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
-
- Posts: 6997
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Move ordering contest
First results are up.rjgibert wrote:So far, out of 8 submissions, the best one seems to be Cheese 1.5 beta at 92.04% averaged and the worst is Komodo CCT at 86.22% averaged despite something like a 700 point rating advantage. A fair comparison between programs seems problematic.Rebel wrote:Your confirmation of my observation over there is an indication you are correct, also various submissions seem to confirm it. I will post the results tomorrow. What a pity.rjgibert wrote:This isn't a good way to compare move ordering efficiency between programs. The more selective searchers will prune away substantial parts of the tree, that less selective searchers will still consider. This will bias the results. You admit as much on your results page.Rebel wrote:Don't take the subject line too serious, it's meant as fun mainly but perhaps there is some learning effect also. So let's compare your move ordering with others and how efficient it is.
Some time ago Don courageously stated Komodo has the best move ordering of all, so Don, here is your chance to proof it
I made a little script for just 10 positions as an opening move for further discussion, on the result page suggested 2 better proposals. But for a start check it out first.
http://www.top-5000.nl/motest.htm
http://www.top-5000.nl/moresu.htm
Perhaps there is a relationship between the higher the ELO the lower your move ordering percentage, now that would be real funny.
Took an old version (1.1) from 2005 long before I heard of LMR and other stuff what is common today. I use LMR nowadays but not aggressively and there is a drop of 1.3% (most likely) because of that, not counting some progress that has been during the years on move ordering, meaning that the real drop is somewhat higher. There obviously is a relationship, more reductions / pruning the move ordering percentage shrinks. Just look at Komodo.
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: Move ordering contest
I will propose a really simple alternative. Suppose we simply average the move number of the cutoff? Komodo don't know how many legal moves there are in a position because we don't generate them unless we have to, so HG's idea is not very workable. I could still do it the HG way but I would have to generate and count which would slow down the program a lot and be a little messy.Rebel wrote:I think you are right on both accounts.Don wrote:I think a better measure might be to give the second move half credit, the 3rd move 1/4 credit, and so on. A BIG part of the move ordering in Komodo is how the moves that are NOT either the history move or a capture or killer. This would impact that, but I don't think it would show the full power.
So I propose we try just averaging the number of moves we had to play to get a cutoff - if no cutoff we don't average anything.
Anyone game?
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: Move ordering contest
My results are invalid as I did not clear the data between runs. So the final number is actually the average of all the samples.Rebel wrote:First results are up.rjgibert wrote:So far, out of 8 submissions, the best one seems to be Cheese 1.5 beta at 92.04% averaged and the worst is Komodo CCT at 86.22% averaged despite something like a 700 point rating advantage. A fair comparison between programs seems problematic.Rebel wrote:Your confirmation of my observation over there is an indication you are correct, also various submissions seem to confirm it. I will post the results tomorrow. What a pity.rjgibert wrote:This isn't a good way to compare move ordering efficiency between programs. The more selective searchers will prune away substantial parts of the tree, that less selective searchers will still consider. This will bias the results. You admit as much on your results page.Rebel wrote:Don't take the subject line too serious, it's meant as fun mainly but perhaps there is some learning effect also. So let's compare your move ordering with others and how efficient it is.
Some time ago Don courageously stated Komodo has the best move ordering of all, so Don, here is your chance to proof it
I made a little script for just 10 positions as an opening move for further discussion, on the result page suggested 2 better proposals. But for a start check it out first.
http://www.top-5000.nl/motest.htm
http://www.top-5000.nl/moresu.htm
Perhaps there is a relationship between the higher the ELO the lower your move ordering percentage, now that would be real funny.
Took an old version (1.1) from 2005 long before I heard of LMR and other stuff what is common today. I use LMR nowadays but not aggressively and there is a drop of 1.3% (most likely) because of that, not counting some progress that has been during the years on move ordering, meaning that the real drop is somewhat higher. There obviously is a relationship, more reductions / pruning the move ordering percentage shrinks. Just look at Komodo.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.