It helps both ways. The hash table will store positions already visited giving a speedup (saving both evaluations and search). Also, a hash table hit that is already a pv node will give good move ordering and also prevent the need to perform the plies-K search for that node.Fguy64 wrote:Thanks, that seems to at least lend some credence to what I was saying. I would like to clarify one point though. When you say that Hash tables help in many more thousands of positions, are you still talking about the move ordering aspect of ID and PV, or are you talking about transpositionjwes wrote:Searching the pv first does certainly help and probably not as much in tactical problems as in general positions, but it is only 10 or 20 positions while hash tables help in tens or hundreds of thousands of positions.Fguy64 wrote:Well, I am collecting the principal variation from each iteration in a two dimensional array of moves, using the "triangular approach". And searching that PV first at the next iteration. Is that not what you are referring to?jwes wrote:You need some sort of memory of best moves, e.g. a hash table, before ID starts speeding up your search. The idea is that moves that cause cutoffs at one iteration should be tried first on the next iteration. To do this, you need to store the best move for many of the positions you search.Fguy64 wrote:It's just a test of my alphaBeta. I have no HashTable Yet, I just want to make sure my ID is working as it should under the most basic of circumstances. I have qSearch in my program, I understand its benefits, it's just not a part of this test
It is my understanding that the benefit if ID and searching PV first comes from the hypothesis that a strong move in a n-ply search is probably a strong move in an n+1 ply search. But the rub is that when I am testing using tactical problems such as most of the WAC positions. Then PV is likely to change drastically later in the search, because of the tactical twist at the end of the combination. It is the "sting at the end of the scorpion's tail" effect which tends to negate a lot of the benefit of using ID. And i'd go further and suggest that whether use of a hash table has little effect on this particular aspect, that of the "point" of a combination appearing late in the search. PArticularly when the search is done at a fixed depth which is known to be just deep enough to "solve" the position.
OK I'm getting long winded here. Just trying to find out if my logic is valid
Consider a search where you are doing 12 plies deep.
In the previous search, you already did 11 plies, so a lot of the work for ID (and / or IID) will already have been accomplished. Because you already searched the position deeply, your hash table is populated with "what worked best last time" which should be a very good guide for "what will work best this time".