Gian-Carlo Pascutto wrote:How is it not relevant? The PV is relevant to the entire search, unless you know for sure the current iterations is your last (and even then, you want the PV, so you need to store it ANYWAY).xsadar wrote: Sure the PV is the single most important variation, but the transposition table was not designed to store entire variations. It was designed to store scores and bestmoves of individual positions that the search may encounter in the near future. And being able to retrieve an entire variation (including the PV) has nothing to do with move ordering, UNLESS we're about to search a position near the root of that variation. Of course at the beginning of a search it is useful to have the entire PV in the hash table, because that's the variation we want to search first, but after that, it's not as relevant.
Actually that is not true. The PV is only relevant while you are searching the PV for the next iteration. It is meaningless for the rest of that iteration. And, in fact, it become irrelevant quicker than that. For example, if you depth N PV is 20 moves long, when you start the next iteration this PV becomes irrelevant after searching exactly 20 nodes, as now you have tried all the PV moves and you are done with them for this iteration.
Perhaps, but also perhaps there is benefit in not treating EXACT entries in a special way since they lock up certain entries in the table for a long time. In a set associative cache, if it behaved this way performance would go in the tank, because you _rarely_ use those entries. In fact, you only use them at the beginning of the iteration for the first N nodes (where N is the length of the PV) but you then make it impossible to replace those by anything else for the remainder of that iteration. Even if the PV changes and most of those moves are no longer on the actual PV, they will stick around.If you do this, you're just using two tables to do what could be accomplished by one.And it's trivial (both in CPU time and programming time) to feed the PV back into the TT immediately preceding a new search.
My elementary teachers taught me that _any_ sentence with the word "always" or "never" was always false (never mind the contradiction that causes. ) But in this case, a 20 ply search, over a tree of (say) 100M nodes, will only use those PV entries in about 20 nodes of the search.But it's not - as explained above the PV is always relevant - so again you're just proving my case for me.Also, saying that a design is buggy simply because it doesn't have the same set of advantages and disadvantages that you prefer is ridiculous. I could just as easily say that your design is buggy because it throws away data more relevant to the remaining search in favor of keeping PV data, which may be less relevant to the remaining search.