hgm wrote:You could also remove e.p. capture. That also won't bring you measurable Elo. And of course under-promotion. But maybe you got rid of that already.
I know you're joking, but I will answer seriously, because this is a thought provoking comment.
1/ En passant:
"removing en passant" would not lead to any code simplification. Quite the contrary. What happens is that you have to parse and play the moves from the UCI position commnad. So if your opponent plays en passant moves, you have to keep the code to play ep moves. Also, you need to generate them, because you need to search ep moves at the root node, or else the engine crashes when ep is the only legal move. That also means you have to keep the code to undo en passant moves. Conclusion: zero code removed, all you do is add code that arbitrarily excludes en passant at all non root nodes.
Being a complexity adding patch, rather than a simplification patch, it has to demonstrate an elo gain. IOW empirical evidence has to show a measurable gain from pruning ep captures at all non root nodes. I have not tested this, but I doubt the result would be positive.
2/ Promotion:
You seem to be misguided by the intuition that pruning under promotion gains elo (or at least doesn't lose any), because it reduces the branching factor while incurring no bad moves. This would indeed be logical. But the reality it different! I have tested this several times, and the conclusion is always the same:
(i) pruning under promotions in the search() is
measurably regressive.
(ii)* pruning under promotions in the qsearch() is, as expected, a measurabel (albeit small) gain.
(i) is indeed a very surprising result, and I was shocked, so I redid the experiment only to find the same conclusion. I do not claim to understand why. But facts are what they are, whether we understand them or not does not rule them in or out of existence.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.