KYLChiu / sporkfish

Chess engine in Python
MIT License
5 stars 0 forks source link

[SPORK-108] Switch from WDL->DTZ for endgame #111

Closed michelle-lai-swl closed 9 months ago

michelle-lai-swl commented 9 months ago

Change from WDL to DTZ scores for endgame tablebases (syzygy)

KYLChiu commented 9 months ago

We need to check for cursed win/loss too. Will do.

ccjeremylo commented 9 months ago

Change from WDL to DTZ scores for endgame tablebases (syzygy)

  • We now handle all cases, from loss to win, given it can be probed in the table base.
  • Implements an algorithm to check desirability of DTZ category (unconditional loss last, unconditional win first).

    • If DTZ category is higher than previous move, select the new category.
    • If DTZ category is same as previous move, compare against the previous score (depending on the category) and change the move if required.

@KYLChiu suggest adding a line here to clarify context - why we decided to change from WDL to DTZ - see here for official doc

KYLChiu commented 9 months ago

Change from WDL to DTZ scores for endgame tablebases (syzygy)

  • We now handle all cases, from loss to win, given it can be probed in the table base.
  • Implements an algorithm to check desirability of DTZ category (unconditional loss last, unconditional win first).

    • If DTZ category is higher than previous move, select the new category.
    • If DTZ category is same as previous move, compare against the previous score (depending on the category) and change the move if required.

@KYLChiu suggest adding a line here to clarify context - why we decided to change from WDL to DTZ - see here for official doc

Not enough to check the linked issue? ;) Anyway, done.

ccjeremylo commented 9 months ago

Change from WDL to DTZ scores for endgame tablebases (syzygy)

  • We now handle all cases, from loss to win, given it can be probed in the table base.
  • Implements an algorithm to check desirability of DTZ category (unconditional loss last, unconditional win first).

    • If DTZ category is higher than previous move, select the new category.
    • If DTZ category is same as previous move, compare against the previous score (depending on the category) and change the move if required.

@KYLChiu suggest adding a line here to clarify context - why we decided to change from WDL to DTZ - see here for official doc

Not enough to check the linked issue? ;) Anyway, done.

Please excuse my blindness, but ty for clarifying 🤓