Luis Babboni wrote:Actually Soberango, after ended the full width search at depth p, calls the move generator again but take as valid just the captures and promotions moves at depth p+1, then the same at depth p+2 and so on till there is no more captures or promotions. This si what I understand is quiscence search.
Now I understand that to do check extensions, I need to add to those captures and promotions that the move generator take as valid at depth p+1, checks, i.e. moves that put the opponent side on move king under check. I´m right till here?
What you describe here is usually called "checks in QS". It adds quiet (non-capturing, non-promoting) checks to the set of moves being searched in QS, if none of the captures or promotions caused a cutoff. You can do that but you should limit this to the first N plies from the QS root (and most people use N=1 so they only add "quiet checks" at horizon nodes). Otherwise it will most probably cause a search explosion.
Luis Babboni wrote:But for depth p+2, the moves generator must take as valid not just captures, promotions and moves that put the opponent side on move king in check.... it neeeds to see if the king of the side to move is in check and in this case just take as valid only moves that made this king evade the check the other side made. I´m right?
Yes, of course. Additionally considering quiet checks would not make sense without searching all legal replies to check.
But you want to do "check extension" and that is different from "checks in QS". It simply means that you search one ply deeper (in full-width search) if the moving side is in check. One obvious benefit is that you never drop into QS when the moving side is currently in check so that you no longer miss a mate-in-N (or mated-in-N) in iteration N (unless you have a special mate detection method that is applied at horizon nodes, which is unlikely). The more general advantage is that it slightly improves the tactical awareness of the engine by analyzing some "forced" lines (those where giving check is involved) somewhat deeper.
A simple implementation would test for being in check right before testing the "remaining depth == 0" condition that would delegate to QS, and would increment the remaining depth by 1 if the king of the moving side is in check.
Luis Babboni wrote:Note: till now, even in full width search as in QS, Soberango never see if one move put the opponent side in check. Just, in the following depth, try all possible moves the moves generator made and discard those that let the side to move king in check. Could be correct do it this way or it must check it?
You do not get check extensions for free. The price you pay is to test for being in check at each full-width node. This will usually cause a slowdown but you get back a strength improvement so don't worry too much about it.
Check extensions are also possible in QS. Here you perform a full-width search to depth 1 instead of a regular QS if a move puts the enemy king into check.