Skip to content

Clean up chesstb - #1231

Open
noobpwnftw wants to merge 1 commit into
niklasf:mainfrom
noobpwnftw:chesstb-cleanup
Open

noobpwnftw wants to merge 1 commit into
niklasf:mainfrom
noobpwnftw:chesstb-cleanup

Conversation

@noobpwnftw

Copy link
Copy Markdown
Contributor
  • Make everything but Tablebase, open_tablebase, ProbeResult and MissingTableError private, and modernize the typing.
  • ProbeResult is a frozen dataclass of signed values in the probe_* conventions, None where a field can't be determined.
  • Tablebase takes no directory; open_tablebase() and add_directory() accept path-likes.
  • Import lz4.block directly.
  • Rewrite the API docs for users.
  • Test through the public API and copies of the test tables.

* Make everything but Tablebase, open_tablebase, ProbeResult and
  MissingTableError private, and modernize the typing.
* ProbeResult is a frozen dataclass of signed values in the probe_*
  conventions, None where a field can't be determined.
* Tablebase takes no directory; open_tablebase() and add_directory()
  accept path-likes.
* Import lz4.block directly.
* Rewrite the API docs for users.
* Test through the public API and copies of the test tables.
@noobpwnftw

Copy link
Copy Markdown
Contributor Author

ProbeResult used to expose internal WDL codes (LOSE=0 … WIN=4, ILLEGAL=7) that weren't public, unsigned distances, and has_* flags. It now follows the probe_* conventions:

  • wdl: −2…2; wdl50: 2, 0 or −2 at the probed clock
  • dtz, dtm, dtm50: signed plies; dtc: (pushes, signed plies)
  • None where a field can't be determined; wdl is None (formerly ILLEGAL) when the tables can't answer at all.

The separate DTC and DTM50 class codes follow from the sign of the distance, and a 0 is a draw or a checkmate on the board, as with probe_dtm().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant