Adding the critical "in perft results" to the above sentence. programs that dislike pins because of mobility evaluations will do something early in the tree to get rid of the absolute pin deeper in the tree...hgm wrote:Wow! That is way more than I expected. I pinned both Queens so that I would not have to worry about the side with the pinned piece having the final ply, or not. But I guess that in this case they force each other to maintain the pin. Of course most moves would maintain the pin anyway, as the are with other pieces than the pinner.Jacob wrote:Code: Select all
rnb1kbnr/ppppqppp/8/8/8/8/PPPPQPPP/RNB1KBNR w KQkq - (Opening, both queens pinned) 1. 24 8 33.33% 2. 547 191 34.92% 3. 13629 4416 32.40% 4. 336781 104837 31.13% 5. 9109498 2495648 27.40% 6. 246238592 61779149 25.09%
Anyway, the example shows that the number of illegal moves need not always be small, and can be as high as 25%.
One important lesson is that pins behave different from checks. The latter must be resolved. But the very nature of a pin is that it is very difficult to resolve. Another lesson is that after 6 ply, the position in general still looks like the root, as each side could only move 3 of its 16 pieces. So if the root contains no pin, the leaves are unlikely to contain a pin. If the root does contain a pin, the pin will most likely still exist in the leaves.
I am a bit surprised about the end-game example. I cannot imagine many pins there. The illegal moves are probably mostly the King wandering into check. My perft would suffer from that too, btw, I have not devised a trick yet to suppress generation of illegal King moves.
It does