This endgame can be a dead draw, with the same problem as KBPKN.
The code is a bit ugly... But I can't think of a nicer way to detect the one passed pawn scenario. In the case where there are no passed pawns, or both passed pawns, all bets are off for the drawiness of the position.
I'm running ELO tests right now, but I assume no ELO change. Bench is the same.
I'll flatten to the single commit if the ELO tests pan out. Or if you can think of a nicer way to write it :).
Add draw detection for KBPPKNP endgames
Merge remote-tracking branch 'upstream/master' into endgame
That's a good call. Once the position reaches KBPPKNP though, it's already pretty drawish. I added this in as I was watching a game where Stockfish had the advantage, and exchanged into this dead drawn endgame. Impressively, Houdini does recognize the position as a draw.
As for regular elo testing, at least it's not worse :).
Comp #1: 2059 - 1979 - 3962 (+3)
Comp #2: 1994 - 1993 - 4013 (0)
Agreed, that adding 60 lines of code for a small return is not great. I'll think on how to shorten it down. Although, stripping all the asserts would help a fair bit, that's a bit counter-productive :).