Daniel Anulliero wrote:hi all
Ok thanks I understand now;-)
I will try something like that because I often have a qs explosion

Bye all!
Skipping losing captures in QS is definitely an improvement but I am not so sure about the "large factor" mentioned by Kevin.
A common reason for a QS explosion is bad move ordering, instead. If you correctly follow the MVV/LVA rule then you should not suffer from QS explosions. Try captures of the most-valued victim first, and among different moves with the same victim value, try those with the least-valued aggressor first. I.e., try QxQ prior to NxR prio to RxR prior to PxB etc., even though NxR and PxB are "winning" captures (but QxQ and RxR usually help to cut down the remaining tree faster). Non-capturing promotions could be put to the end of the move list since it is not clear whether the promotion piece will be lost immediately; if it is lost then the promotion move often loses a pawn. Also promotions do not help to cut down the remaining tree, they even tend to blow it up. Many programs only try promotions to a queen during QS.
If move ordering works well then you can add the skipping of losing captures and see how much of an improvement you get. But be careful: you need to be sufficiently sure that QxP, for instance, does not simply win a hanging pawn. Many programmers use SEE to support this decision.
Regarding your other question:
And also I think we need to test the incheck moves for that trick right?
In QS you will usually detect being in check, and generate all legal check evasions in that case instead of generating only captures. This is mainly to avoid missing that you are checkmated. But being in check obviously requires that the opponent makes a checking move. To prevent QS explosion you will avoid to generate all quiet checking moves so that during QS the only "in check" situations (except for the QS root node which can be reached through a quiet checking move at the parent node which belongs to full-width search) may arise after a capture or promotion that also gives check. The only exception which is made in many engines is the first ply of QS. Considering also quiet checking moves in the first QS ply is usually a strength improvement since it helps to see some more tactics. But it is not absolutely necessary, and now to your question, it is also not necessary for the "skip losing captures" improvement.
Sven