Mar-31-2024, 06:14 PM
I'm trying to create a code for **perfectly optimal chess endgame**.
By that I mean that the loosing player tries to delay the checkmate as long as possible while the winning tries to checkmate the opponent as soon as possible.
This code for chess endgame is my currently best [one](https://pastebin.com/zkcbgANy)
However,for initial fen = "8/8/8/4k3/2K4R/8/8/8 w - - 0 1" it doesn't give the optimal result like this one: https://lichess.org/analysis/8/8/8/4k3/2...olor=white
Rather, it gives 27 plies [like this](https://pastebin.com/hZ6AaBZe) while lichess.com link above gives 1000-977==23 plies. Finding the bug will be highly appreciated.
By that I mean that the loosing player tries to delay the checkmate as long as possible while the winning tries to checkmate the opponent as soon as possible.
This code for chess endgame is my currently best [one](https://pastebin.com/zkcbgANy)
However,for initial fen = "8/8/8/4k3/2K4R/8/8/8 w - - 0 1" it doesn't give the optimal result like this one: https://lichess.org/analysis/8/8/8/4k3/2...olor=white
Rather, it gives 27 plies [like this](https://pastebin.com/hZ6AaBZe) while lichess.com link above gives 1000-977==23 plies. Finding the bug will be highly appreciated.