lucasart wrote:1/ In a PVS algorithm, you only do that at PV nodes, right ?
I do it or every node type, as at the splitting node search will take care of updating or not parent PV.
lucasart wrote:2/ the "if (depth == 0) pline->cmoves = 0", which says that the PV of the current ply is empty when we stand pat (in a real program would be when we call the qsearch() instead of evaluate()). Should I do that at every possible exit point of the search (other than beta cutoff). For example: razoring, eval pruning, null move pruning (I don't do them at PV nodes, but let's imagine I did), SEE pruning, move count pruning ?
I do EVERY time im going to have an EXACT score:
1) before calling qsearch
2) after a draw by repetition or TT hash hit with EXACT score
3) when alpha is improved (code is executed AFTER beta cutoff check)
lucasart wrote:
3/ what about TT pruning at a PV node ? If I clear the PV of the current ply, it means that a TT pruning in the PV results in a truncated PV. That could mean there's no ponder move (pv[1]=null). A bit annoying. Seems inevitable though, unless one has a different hash table for PV nodes that stores PV or something (?)
I think this is an open question...
lucasart wrote:4/ IID ? I don't want to pollute the PV extraction mechanism when within an IID search (ie. if any ancestor of the current node, even grand grand grand father etc. was an IID search, we shouldn't back up the PV). Is there a ruse to get around this problem?
I don't see any problem with that, as you never leave that node during IID, so you actually cannot update its parent. Simply calling (IID) search with the local PV as you usually do in normal search and then using the PV[0] as best move should do the trick...
lucasart wrote:5/ qsearch? Is it common wisdom to terminate the PV at the end of the search(), or do some programs also include the qsearch()? It seems interesting to continue the PV in the qsearch, as there can be some interesting sequences of captures/checks that are worth displaying (at least, you can follow the PV till the end, and know on which position you stood pat, and you can see where the score is coming from).
I tried to get it working, and maybe it is, but for the "problems" I had I actually disabled it.