- int cf = Options["Contempt"] * PawnValueEg / 100; // From centipawns
- DrawValue[ RootPos.side_to_move()] = VALUE_DRAW - Value(cf);
- DrawValue[~RootPos.side_to_move()] = VALUE_DRAW + Value(cf);
+ int contempt = Options["Contempt"] * PawnValueEg / 100; // From centipawns
+ DrawValue[ RootPos.side_to_move()] = VALUE_DRAW - Value(contempt);
+ DrawValue[~RootPos.side_to_move()] = VALUE_DRAW + Value(contempt);
+
+ TB::Hits = 0;
+ TB::RootInTB = false;
+ TB::UseRule50 = Options["Syzygy50MoveRule"];
+ TB::ProbeDepth = Options["SyzygyProbeDepth"] * ONE_PLY;
+ TB::Cardinality = Options["SyzygyProbeLimit"];
+
+ // Skip TB probing when no TB found: !TBLargest -> !TB::Cardinality
+ if (TB::Cardinality > TB::MaxCardinality)
+ {
+ TB::Cardinality = TB::MaxCardinality;
+ TB::ProbeDepth = DEPTH_ZERO;
+ }