hgm wrote: ↑Thu Jun 24, 2021 8:52 am
And, just like scores, PVs propagate to towards the root. According to the rule that a node's PV is the PV of its best child, prefixed by the best move (which leads to that child).
The PV at the root should always match the reported score, right? If I play each move of the PV starting from the root then I will get a leaf node that evaluates to the same score that propagated to the root, correct?
With a triangular PV table I was always able to maintain such a complete PV. But now I'm trying to implement a Transposition table and I have the problem that when I have a table hit I get a "score" but I don't save the PV in my TT table (and don't think I should) so the PV always ends when I find a position in the table.
How do you fix that and report a correct and complete PV to the GUI? I don't see how the "pv.append" code both of you posted would help with these incomplete PVs whenever you have a table hit. Even if you store one move in the TT you don't have a complete PV but just the first step.
Marcel suggested that "if you want to send a PV to the GUI, you would need to get the PV-move in the position, play it, get the PV-move in THAT position, play it.... until you get no more move."
Is that really the solution? Does it always work? (One of the entries in that path could have been overwritten andlost)