Move ordering test (2)

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Move ordering test (2)

Post by bob »

hgm wrote:Well, this was inherent with adopting a defenition of move-ordering quality that does not correlate (or perhaps even anti-correlates) with search efficiency...
For the record, your point is not "the end of the story". One does NOT want to fail high on move 11, because you have reduced it, and now you get to re-search it again with the normal alpha/beta bounds and depth. That hurts, not helps.

Seems to me that ANY fail high beyond the first move is bad. And gets progressively worse as you step through the move list. I therefore don't follow your example of failing high on move 6 vs move 11. Move 11 is worse since it has to be searched twice.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Move ordering test (2)

Post by bob »

hgm wrote:Counting the square of the move number seems exactly the opposite of what is needed, as late moves are often reduced, and thus hardly count. If per node on average only the first 6 moves are not reduced, having all cutoffs on the 6th move is much worse than having half at the 1st, and half at the 11th ((1+6.5)/2 = 3.75, if we count a reduced move for 0.1). With the square counting you would get sqrt((1 + 121)/2) = sqrt(61) ~ 8.

Anyway, Fairy-Max scores ~2.5 - ~3.5. I guess its main problem is that Pawn double pushes (and castlings) cannot become hash move, as it scores especially bad when there are many 2nd-rank Pawns. That it doesn't have killers of course also doesn't help. This is not counting earlier IID iterations, which score of course much worse (but take very little time compared to the last one).
Remember, we ONLY count if we get a fail high. If you fail high on a reduced move, you get to re-search at the original depth to see if it still fails high. That is worse, not better, than failing high at move 6 vs move 11. Move 11 has more overhead due to the re-search.
User avatar
hgm
Posts: 27802
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Move ordering test (2)

Post by hgm »

But move 7-10 were nearly free.

So my calculation was indeed not entirely correct: cutting on move 11 would need a full-depth search on 1-6 and 11, and reduced searches on 7-11. That is 7 times full depth and 5 times reduced, or 7.5 total (under the stated assumption). On average (1+7.5)/2 = 4.25 rather than 3.75.

Still smaller than 6, though.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: Move ordering test (2)

Post by elcabesa »

you original formula seems to me the average value at which beta cutoff appens, am I wrong?
why you don't add variance too :) this will give you a better idea of the distribution of the beta cut-off
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Move ordering test (2)

Post by bob »

hgm wrote:But move 7-10 were nearly free.

So my calculation was indeed not entirely correct: cutting on move 11 would need a full-depth search on 1-6 and 11, and reduced searches on 7-11. That is 7 times full depth and 5 times reduced, or 7.5 total (under the stated assumption). On average (1+7.5)/2 = 4.25 rather than 3.75.

Still smaller than 6, though.
Probably too late for me, rather than your writing something unclear, but I don't see the issue here.

if you fail high only on move 6, you are going to average searching 6 moves normally, no issues. If you sometimes fail high on 11, that's a full-search also. So are you assuming that the program always fails high on move 6, never anything less? That seems like a poor assumption. From my numbers, at least 90% of the time the fail high happens on move 1 if it happens at all, so we are only talking about that remaining 10% of the time.

Basic assumptions.

(1) you have to search move 1 with no fail high. then you continue searching until you do get a fail high, whether it is at 6 or 11 is only relevant to efficiency.

(2) if you have to get to 11, and assuming you don't reduce the first 6 and do reduce the second 6, there is little difference between 7 through 11 and just going directly to 11 since the first 5 would be reduced. But 11 still hurts since it will be a full search.

(3) The additional danger is that you fail to fail high on move 11 because it was reduced and you couldn't see the tactics needed to flag it as better...
User avatar
hgm
Posts: 27802
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Move ordering test (2)

Post by hgm »

The point is that it does not matter that much whether you fail high on move 7 or move 30, because the extra moves you search (8 - 30) were all reduced (an you only re-search one of those, be it 7 or 30). In your proposed formula you would give more weight to moves that fail very late, while in fact the impact on performance is less.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Move ordering test (2)

Post by bob »

hgm wrote:The point is that it does not matter that much whether you fail high on move 7 or move 30, because the extra moves you search (8 - 30) were all reduced (an you only re-search one of those, be it 7 or 30). In your proposed formula you would give more weight to moves that fail very late, while in fact the impact on performance is less.
OK, I will agree with that... Of course, it depends on how you reduce. I don't currently reduce based on the move's position, which changes this even further...