syzygy wrote: You treat them differently: TB loss returns immediately, TB win is ignored.
<cut>
That does not seem to make a lot of sense.
Yes, I treat them differently, and not only when entering in TB, but always
The reason for this is to avoid odd sacrifices and TB scores to be exposed to user. If I don't overwrite search value in case of a winning position I assume the above two "features" of TB behavior will not be exposed.
On the other hand it is not like I don't' use TB anymore because:
- I still don't search in draw and losing sub-trees so keeping original TB efficiency
- I spend much less time than usual in winning sub-trees (it is a compromise, I don't' return immediately like in pure TB case, so some efficiency is lost, but because search is greatly reduced, I look for this to be harmless).
You may say that in win position, returning a score form a reduced depth search, instead of a TB win could be very bad. I don't' think so. I don't' throw away TB info, but I implicitly use the very critical knowledge that searching those sub-tree will never fail low even in very deep searches. That's why I search swallow: I already know a priori it will not fail low. This is a very important information. Reason why engines search very deep the PV is not to find a better PV, but to prove the current PV does not fail low. We already know it after a TB probing, so we
implicitly use this to do a swallow search and
save resources.
Code: Select all
So my proposal:
- a TB loss/win returns immediately with losing/winning TB score if that score can logically be used for an alpha or beta cutoff (so when you don't need to know the exact distance-to-mate to know that you can take the cutoff: it would be silly to search on).
- if alpha, beta are such that you want to know the distance-to-mate (either winning or losing), then continue the search, but make sure that if no mate score is found, then the value returned still reflects that the position is a known (TB) win or loss.
Can you please explain how in this approach you avoid TB artifacts: sacrifices, TB scores, etc.?
My aim is to keep the TB ELO advantage but do not show to the user we are using TB. User looking at the engine should not realize if we are using TB or not. I don't claim my aim is what everybody expects / likes, I just say that this patch is wrote for this reason, not for others.