mathmoi wrote:You still search them before the non-captures?
No, he does not:
bob wrote:I use exactly the same idea as above, except that I do not "toss" the SEE < 0 captures, I just defer them until after the good captures, killers, etc.
EDIT: Ah, I understand what you mean. No, I think the principle is to search the SEE<0 captures after everything else.
Kempelen wrote:
And what about normal search? do you something similar or does you "SEEing" all captures and sort them before start the search at move 1?
I use exactly the same idea as above, except that I do not "toss" the SEE < 0 captures, I just defer them until after the good captures, killers, etc.
You still search them before the non-captures?
Sort of. Killers are non-captures and get searched first. But since the captures appear in the move list first, the losers will be the first thing searched after the hash move, good captures and killers are finished.
bob wrote:Sort of. Killers are non-captures and get searched first. But since the captures appear in the move list first, the losers will be the first thing searched after the hash move, good captures and killers are finished.
Why not search them after the non-captures? Wouldn't that work better?
bob wrote:Sort of. Killers are non-captures and get searched first. But since the captures appear in the move list first, the losers will be the first thing searched after the hash move, good captures and killers are finished.
Why not search them after the non-captures? Wouldn't that work better?
No idea, but generally if Crafty fails high, it fails high on the first move searched about 92% of the time. By the time we get to "the rest of the moves" ordering is irrelevant. Searching them "after" would require stepping over them first, which would cost a small amount of time...
Only done in normal search however, which is way less than 1/2 of the tree space searched, thanks to the q-search.
2. Sort the moves in simple MVV/LVA order (easy idea is sort_value = captured_piece<<4 + capturing piece)
3. Start searching. As I prepare to search a capture, I ask the following question: "Is the capturing piece less valuable than the captured piece, which is a material winner?" If so, I search it. If the answer is no, I use classic SEE to compute an expected material loss or gain, and if this value is >= 0, I search the move, otherwise I discard it and move to the next one.
The reason for the order of the above steps is to save time. The idea is this. You are going to search in MVV/LVA order as that has been proven to be slightly faster overall than searching in pure SEE order. And since SEE is expensive, you only want to do it when necessary. PxN doesn't need a SEE score, it is not going to lose material according to SEE (which doesn't include pins, overloads, etc). So we only apply SEE when we are not so sure, such as in cases like QxR which might win a rook, or it might lose the queen for the rook, so we want more information before deciding to search that move or not.
Hope that helps.
And what about normal search? do you something similar or does you "SEEing" all captures and sort them before start the search at move 1?
I use exactly the same idea as above, except that I do not "toss" the SEE < 0 captures, I just defer them until after the good captures, killers, etc.
After testing this, for normal search, with 1500 games I have seen this work worse than my last implementation. The reason is that if I rank all captures wih MVV/LVA, and when searching if a captures is SEE<0 the send it to end of move list, then in this situation I am discarting a capture been a killer sorted(killer are usually sorted up of bad captures).
In my understanding, you are loosing tactical opportunities because possible bad-captures been killers are only probed after other killers and history has been done. Do you solve this in any way??
2. Sort the moves in simple MVV/LVA order (easy idea is sort_value = captured_piece<<4 + capturing piece)
3. Start searching. As I prepare to search a capture, I ask the following question: "Is the capturing piece less valuable than the captured piece, which is a material winner?" If so, I search it. If the answer is no, I use classic SEE to compute an expected material loss or gain, and if this value is >= 0, I search the move, otherwise I discard it and move to the next one.
The reason for the order of the above steps is to save time. The idea is this. You are going to search in MVV/LVA order as that has been proven to be slightly faster overall than searching in pure SEE order. And since SEE is expensive, you only want to do it when necessary. PxN doesn't need a SEE score, it is not going to lose material according to SEE (which doesn't include pins, overloads, etc). So we only apply SEE when we are not so sure, such as in cases like QxR which might win a rook, or it might lose the queen for the rook, so we want more information before deciding to search that move or not.
Hope that helps.
And what about normal search? do you something similar or does you "SEEing" all captures and sort them before start the search at move 1?
I use exactly the same idea as above, except that I do not "toss" the SEE < 0 captures, I just defer them until after the good captures, killers, etc.
After testing this, for normal search, with 1500 games I have seen this work worse than my last implementation. The reason is that if I rank all captures wih MVV/LVA, and when searching if a captures is SEE<0 the send it to end of move list, then in this situation I am discarting a capture been a killer sorted(killer are usually sorted up of bad captures).
In my understanding, you are loosing tactical opportunities because possible bad-captures been killers are only probed after other killers and history has been done. Do you solve this in any way??
thanks.
Many people do never store captures as killer moves. This could already solve it for you. But if you want to allow losing captures as killers then why not just ask whether it is also a killer before sending a SEE<0 move to the bottom?
2. Sort the moves in simple MVV/LVA order (easy idea is sort_value = captured_piece<<4 + capturing piece)
3. Start searching. As I prepare to search a capture, I ask the following question: "Is the capturing piece less valuable than the captured piece, which is a material winner?" If so, I search it. If the answer is no, I use classic SEE to compute an expected material loss or gain, and if this value is >= 0, I search the move, otherwise I discard it and move to the next one.
The reason for the order of the above steps is to save time. The idea is this. You are going to search in MVV/LVA order as that has been proven to be slightly faster overall than searching in pure SEE order. And since SEE is expensive, you only want to do it when necessary. PxN doesn't need a SEE score, it is not going to lose material according to SEE (which doesn't include pins, overloads, etc). So we only apply SEE when we are not so sure, such as in cases like QxR which might win a rook, or it might lose the queen for the rook, so we want more information before deciding to search that move or not.
Hope that helps.
And what about normal search? do you something similar or does you "SEEing" all captures and sort them before start the search at move 1?
I use exactly the same idea as above, except that I do not "toss" the SEE < 0 captures, I just defer them until after the good captures, killers, etc.
After testing this, for normal search, with 1500 games I have seen this work worse than my last implementation. The reason is that if I rank all captures wih MVV/LVA, and when searching if a captures is SEE<0 the send it to end of move list, then in this situation I am discarting a capture been a killer sorted(killer are usually sorted up of bad captures).
In my understanding, you are loosing tactical opportunities because possible bad-captures been killers are only probed after other killers and history has been done. Do you solve this in any way??
thanks.
Many people do never store captures as killer moves. This could already solve it for you. But if you want to allow losing captures as killers then why not just ask whether it is also a killer before sending a SEE<0 move to the bottom?
Sven
Quite simple. Five minutes after sending the post I was thinking on do it that way... thanks.
2. Sort the moves in simple MVV/LVA order (easy idea is sort_value = captured_piece<<4 + capturing piece)
3. Start searching. As I prepare to search a capture, I ask the following question: "Is the capturing piece less valuable than the captured piece, which is a material winner?" If so, I search it. If the answer is no, I use classic SEE to compute an expected material loss or gain, and if this value is >= 0, I search the move, otherwise I discard it and move to the next one.
The reason for the order of the above steps is to save time. The idea is this. You are going to search in MVV/LVA order as that has been proven to be slightly faster overall than searching in pure SEE order. And since SEE is expensive, you only want to do it when necessary. PxN doesn't need a SEE score, it is not going to lose material according to SEE (which doesn't include pins, overloads, etc). So we only apply SEE when we are not so sure, such as in cases like QxR which might win a rook, or it might lose the queen for the rook, so we want more information before deciding to search that move or not.
Hope that helps.
And what about normal search? do you something similar or does you "SEEing" all captures and sort them before start the search at move 1?
I use exactly the same idea as above, except that I do not "toss" the SEE < 0 captures, I just defer them until after the good captures, killers, etc.
After testing this, for normal search, with 1500 games I have seen this work worse than my last implementation. The reason is that if I rank all captures wih MVV/LVA, and when searching if a captures is SEE<0 the send it to end of move list, then in this situation I am discarting a capture been a killer sorted(killer are usually sorted up of bad captures).
In my understanding, you are loosing tactical opportunities because possible bad-captures been killers are only probed after other killers and history has been done. Do you solve this in any way??
thanks.
The idea is that removing the largest piece first (MVV) reduces the size of the tree significantly compared to removing the piece with the largest material gain. So we are talking about a small efficiency issue. The difference between using normal SEE ordering and MVV/LVA ordering is very small. But, in the q-search, where you can toss out captures with SEE < 0, the gain can be more than 2x, which is where SEE is really useful.
I´ve searched your position with a plain PVS algorithm (no null-move, no transposition table, no futility pruning, no LMR). I used SEE for delaying losing captures in alfabeta search and skiping them in quiesce.
The move ordering was MVV/LVA, killer, promotions, history.
I get these results:
P. Villanueva wrote:I´m also trying SEE and having no good results.
I´ve searched your position with a plain PVS algorithm (no null-move, no transposition table, no futility pruning, no LMR). I used SEE for delaying losing captures in alfabeta search and skiping them in quiesce.
The move ordering was MVV/LVA, killer, promotions, history.
I get these results:
I got a noticeable reduction in nodes for each depth, but the terrible drop in terms of NPS avoid any profit.
I would compare with and without SEE using a fixed depth search, not fixed time as you did. Otherwise you can't tell which version uses less time for the same number of iterations, which would be crucial in my opinion to judge whether SEE helps in your case (for that single position - see below) by returning the same result faster, and therefore being able to search somewhat deeper.
Second point is that doing a comparison based on only one test position is usually not sufficient to draw any conclusion from it. You should use a larger test set at least, but even better in my opinion would be to play a statistically significant number of games.
Also it is difficult for the reader to judge about your results since it is unknown at which point in time your program prints a new PV line:
a) immediately if a new root move improves the old PV, or
b) only at the end of each iteration.
I would assume you do a), which implies that the times that were needed for completing a whole iteration are not visible directly.