-
Notifications
You must be signed in to change notification settings - Fork 8
tb_probe_root
Andrew Grant edited this page Feb 13, 2026
·
2 revisions
unsigned tb_probe_root(
uint64_t white, uint64_t black,
uint64_t kings, uint64_t queens,
uint64_t rooks, uint64_t bishops,
uint64_t knights, uint64_t pawns,
unsigned rule50, unsigned ep,
bool turn, unsigned *results);Calling Conditions:
- Can only be called when neither player has any Castling Rights remaining
- Can only be called when the # of pieces is less than or equal to TB_LARGEST
- Can only be called by one thread at a time
Non-trivial Parameters:
-
rule50is the fifty-move counter -
epis the Enpassant Square, as described in a typical FEN. If there is no square, the value must be 0 -
turnmust either be PYRRHIC_WHITE, or PYRRHIC_BLACK. Those constants may differ from your own engine -
resultsmay beNULL, or a pointer to someunsigned results[TB_MAX_MOVES]
Return Value:
- Failed probes will return
TB_RESULT_FAILED - Probes in already finished games will return
TB_RESULT_STALEMATEorTB_RESULT_CHECKMATE - Successful probes will return an
unsigned TB_RESULT
Additional Notes:
- The move encoded in the return value is guaranteed to preserve the optimal WDL result
- Moves in the
resultsarray are not guaranteed to preserve the optimal WDL result - Moves in the
resultsarray can have wrong WDL results when repetitions have occurred - This function should not be used for "Filtering" the Root Moves of an engine's search