mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 11:39:15 +00:00
Retire extensions as UCI option
There is no real need why an user should change these values. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
633c83f648
commit
ccd5ccbcdb
2 changed files with 19 additions and 26 deletions
|
@ -180,7 +180,7 @@ namespace {
|
|||
// Step 9. Internal iterative deepening
|
||||
|
||||
// Minimum depth for use of internal iterative deepening
|
||||
const Depth IIDDepth[2] = { 8 * ONE_PLY /* non-PV */, 5 * ONE_PLY /* PV */};
|
||||
const Depth IIDDepth[] = { 8 * ONE_PLY, 5 * ONE_PLY };
|
||||
|
||||
// At Non-PV nodes we do an internal iterative deepening search
|
||||
// when the static evaluation is bigger then beta - IIDMargin.
|
||||
|
@ -188,13 +188,14 @@ namespace {
|
|||
|
||||
// Step 11. Decide the new search depth
|
||||
|
||||
// Extensions. Configurable UCI options. Array index 0 is used at
|
||||
// non-PV nodes, index 1 at PV nodes.
|
||||
Depth CheckExtension[2], PawnPushTo7thExtension[2];
|
||||
Depth PassedPawnExtension[2], PawnEndgameExtension[2];
|
||||
// Extensions. Array index 0 is used for non-PV nodes, index 1 for PV nodes
|
||||
const Depth CheckExtension[] = { ONE_PLY / 2, ONE_PLY / 1 };
|
||||
const Depth PawnEndgameExtension[] = { ONE_PLY / 1, ONE_PLY / 1 };
|
||||
const Depth PawnPushTo7thExtension[] = { ONE_PLY / 2, ONE_PLY / 2 };
|
||||
const Depth PassedPawnExtension[] = { DEPTH_ZERO, ONE_PLY / 2 };
|
||||
|
||||
// Minimum depth for use of singular extension
|
||||
const Depth SingularExtensionDepth[2] = { 8 * ONE_PLY /* non-PV */, 6 * ONE_PLY /* PV */};
|
||||
const Depth SingularExtensionDepth[] = { 8 * ONE_PLY, 6 * ONE_PLY };
|
||||
|
||||
// Step 12. Futility pruning
|
||||
|
||||
|
@ -205,8 +206,16 @@ namespace {
|
|||
Value FutilityMarginsMatrix[16][64]; // [depth][moveNumber]
|
||||
int FutilityMoveCountArray[32]; // [depth]
|
||||
|
||||
inline Value futility_margin(Depth d, int mn) { return d < 7 * ONE_PLY ? FutilityMarginsMatrix[Max(d, 1)][Min(mn, 63)] : 2 * VALUE_INFINITE; }
|
||||
inline int futility_move_count(Depth d) { return d < 16 * ONE_PLY ? FutilityMoveCountArray[d] : 512; }
|
||||
inline Value futility_margin(Depth d, int mn) {
|
||||
|
||||
return d < 7 * ONE_PLY ? FutilityMarginsMatrix[Max(d, 1)][Min(mn, 63)]
|
||||
: 2 * VALUE_INFINITE;
|
||||
}
|
||||
|
||||
inline int futility_move_count(Depth d) {
|
||||
|
||||
return d < 16 * ONE_PLY ? FutilityMoveCountArray[d] : MOVES_MAX;
|
||||
}
|
||||
|
||||
// Step 14. Reduced search
|
||||
|
||||
|
@ -477,14 +486,6 @@ bool think(Position& pos, const SearchLimits& limits, Move searchMoves[]) {
|
|||
}
|
||||
|
||||
// Read UCI options
|
||||
CheckExtension[1] = Options["Check Extension (PV nodes)"].value<Depth>();
|
||||
CheckExtension[0] = Options["Check Extension (non-PV nodes)"].value<Depth>();
|
||||
PawnPushTo7thExtension[1] = Options["Pawn Push to 7th Extension (PV nodes)"].value<Depth>();
|
||||
PawnPushTo7thExtension[0] = Options["Pawn Push to 7th Extension (non-PV nodes)"].value<Depth>();
|
||||
PassedPawnExtension[1] = Options["Passed Pawn Extension (PV nodes)"].value<Depth>();
|
||||
PassedPawnExtension[0] = Options["Passed Pawn Extension (non-PV nodes)"].value<Depth>();
|
||||
PawnEndgameExtension[1] = Options["Pawn Endgame Extension (PV nodes)"].value<Depth>();
|
||||
PawnEndgameExtension[0] = Options["Pawn Endgame Extension (non-PV nodes)"].value<Depth>();
|
||||
UCIMultiPV = Options["MultiPV"].value<int>();
|
||||
SkillLevel = Options["Skill level"].value<int>();
|
||||
|
||||
|
|
|
@ -81,14 +81,6 @@ OptionsMap::OptionsMap() {
|
|||
o["Space"] = Option(100, 0, 200);
|
||||
o["Aggressiveness"] = Option(100, 0, 200);
|
||||
o["Cowardice"] = Option(100, 0, 200);
|
||||
o["Check Extension (PV nodes)"] = Option(2, 0, 2);
|
||||
o["Check Extension (non-PV nodes)"] = Option(1, 0, 2);
|
||||
o["Pawn Push to 7th Extension (PV nodes)"] = Option(1, 0, 2);
|
||||
o["Pawn Push to 7th Extension (non-PV nodes)"] = Option(1, 0, 2);
|
||||
o["Passed Pawn Extension (PV nodes)"] = Option(1, 0, 2);
|
||||
o["Passed Pawn Extension (non-PV nodes)"] = Option(0, 0, 2);
|
||||
o["Pawn Endgame Extension (PV nodes)"] = Option(2, 0, 2);
|
||||
o["Pawn Endgame Extension (non-PV nodes)"] = Option(2, 0, 2);
|
||||
o["Minimum Split Depth"] = Option(4, 4, 7);
|
||||
o["Maximum Number of Threads per Split Point"] = Option(5, 4, 8);
|
||||
o["Threads"] = Option(1, 1, MAX_THREADS);
|
||||
|
|
Loading…
Add table
Reference in a new issue