Python Forum
a chess endgame problem, almost solved but not quite
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a chess endgame problem, almost solved but not quite
#1
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Endgame engine with non-standard figures doesn't behave correctly max248 0 454 Dec-07-2024, 12:44 PM
Last Post: max248
  optimum chess endgame with D=3 pieces doesn't give an exact moves_to_mate variable max22 1 918 Mar-21-2024, 09:31 PM
Last Post: max22
  A new endgame problem, almost solved but not quite 2 max22 0 800 Mar-07-2024, 07:12 PM
Last Post: max22
  Python trivial endgame engine is not working as expected max22 0 1,108 Feb-24-2024, 04:41 PM
Last Post: max22
  strange behavior of chess library in Python max22 1 1,162 Jan-18-2024, 06:35 PM
Last Post: deanhystad
  Problem with datetime [SOLVED] AlphaInc 3 8,798 Apr-22-2022, 01:33 PM
Last Post: snippsat
  Python chess game to detect winner ddddd 1 2,595 Dec-13-2020, 10:24 PM
Last Post: michael1789
  unpacking error - chess gboreham 3 4,565 Apr-05-2017, 09:54 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020