i see you quoted my unedited post. i tested it again and i can assure that it plays random moves if i remove "+ ply"lithander wrote: ↑Tue Sep 07, 2021 10:39 pmYou mean you implemented check extensions because your eval would otherwise not catch a mated position?tcusr wrote: ↑Tue Sep 07, 2021 10:29 pm i guess the important thing is that i addedbefore checking if depth is equal to zeroCode: Select all
if (board.in_check()) ++ depth;
But by searching one ply deeper your search should have caught it, right? If it doesn't you probably still have a bug somewhere and the check extensions are just covering it up.
If your engine has problem to find trivial mates like "k7/8/K7/8/8/8/8/2R5 w - - 0 1" you can just debug it by hand. Connect a debugger, step through the code. It's only a handful of moves and c1c8 should come back as a mate and if it doesn't you'll know exactly what's going on.
yes, if depth > 1 it is able to find mate. am i supposed to check for checkmate in my evaluation function? i didn't know itBut by searching one ply deeper your search should have caught it, right? If it doesn't you probably still have a bug somewhere and the check extensions are just covering it up.
i only added the check extensions because it wasn't able to find mate if the depth is 1 (since i pass depth - 1 (0) it calls eval<C>(board) without going to the "if (no_moves)" at the end of negamax)

