2

I have just upgraded my code for computing completely optimally for both players a chess endgame as given here: https://pastebin.com/jQ090L01 but it gives to me 2 plies to checkmate White instead of correct 4 plies according to StockFish.

Can someone give me a hint how to fix this and where is the source of the problem? The code is correct in the sense that it detects correctly the game_tree[1]['result']: -1 for black win, 1 for white's and 0 for a draw. But it gives wrong plies to mate.ChatGPT4 hasn't helped.

1
  • If you haven't already, it might also do to try Stack Overflow. Commented Mar 26 at 14:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.