Thanks for your insights. I know PV collection is not the same as PVS. I was just wondering if doing a PVS is still necessary if you have a transposition table. As in: you search the hash move first, then the PV move... but what if the hash move IS the PV move? Then you search a move twice.maksimKorzh wrote: ↑Thu Oct 29, 2020 2:17 am Hi Marcel, even though you've got perfect answers already, still I want to share my experience - just like you I was thinking that principal variation search (PVS) is something to collect principal variation (PV) but... it's not... For some reason what is known as PVS (Principal Variation Search) is a technique intended to optimize the search performance via narrowing alpha-beta window, see this link for details: https://web.archive.org/web/20071030220 ... ng/pvs.htm
What you ask is: "why to collect PV if we already have it in transposition table" - it's completely different question. If you have transposition table you can extract PV from there, but principal variation search is not intended to collect principal variation despite it's name, it's just a name for a search performance optimization technique.
Btw for clarity and didactic purposes despite having TT still I'm using a separate (modular) PV collection technique known as triangular PV - I've grabbed the implementation from TSCP)
I'm thinking on how to implement PV collection in my engine. I don't like the triangular array method because MAX_DEPTH is 255 in my engine (and I may set it to the max size of a 4 bit int some day). I don't want to create a 256 x 256 * 8 bytes = 512 KB array on the stack just for PV collection. But vectors in the move loop are way too slow, as I need to create a new one at each iteration... Maybe I'll just create a stack of vectors outside the A/B-function and refer to it, just as I did with my move list when I did my first implementation.