From 5e905800887da94d481978d3bddd9539b2111458 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 1 May 2012 11:33:38 +0100 Subject: [PATCH] Convert constants to decimal representation Hex representation doesn't add any value in those cases. Preserve hex representation where more self-documenting for instance for binary masks values. No functional change. Signed-off-by: Marco Costalba --- src/evaluate.cpp | 2 +- src/search.cpp | 6 +++--- src/types.h | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 880a531c..9b755955 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1108,7 +1108,7 @@ Value do_evaluate(const Position& pos, Value& margin) { } // Winning pawn is unstoppable and will promote as first, return big score - Score score = make_score(0, (Value) 0x500 - 0x20 * pliesToQueen[winnerSide]); + Score score = make_score(0, (Value) 1280 - 32 * pliesToQueen[winnerSide]); return winnerSide == WHITE ? score : -score; } diff --git a/src/search.cpp b/src/search.cpp index be6e360a..d711d743 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -67,7 +67,7 @@ namespace { const Depth RazorDepth = 4 * ONE_PLY; // Dynamic razoring margin based on depth - inline Value razor_margin(Depth d) { return Value(0x200 + 0x10 * int(d)); } + inline Value razor_margin(Depth d) { return Value(512 + 16 * int(d)); } // Maximum depth for use of dynamic threat detection when null move fails low const Depth ThreatDepth = 5 * ONE_PLY; @@ -77,13 +77,13 @@ namespace { // At Non-PV nodes we do an internal iterative deepening search // when the static evaluation is bigger then beta - IIDMargin. - const Value IIDMargin = Value(0x100); + const Value IIDMargin = Value(256); // Minimum depth for use of singular extension const Depth SingularExtensionDepth[] = { 8 * ONE_PLY, 6 * ONE_PLY }; // Futility margin for quiescence search - const Value FutilityMarginQS = Value(0x80); + const Value FutilityMarginQS = Value(128); // Futility lookup tables (initialized at startup) and their access functions Value FutilityMargins[16][64]; // [depth][moveNumber] diff --git a/src/types.h b/src/types.h index 9c997418..cf0b3f95 100644 --- a/src/types.h +++ b/src/types.h @@ -311,16 +311,16 @@ inline Score apply_weight(Score v, Score w) { #undef ENABLE_OPERATORS_ON #undef ENABLE_SAFE_OPERATORS_ON -const Value PawnValueMidgame = Value(0x0C6); -const Value PawnValueEndgame = Value(0x102); -const Value KnightValueMidgame = Value(0x331); -const Value KnightValueEndgame = Value(0x34E); -const Value BishopValueMidgame = Value(0x344); -const Value BishopValueEndgame = Value(0x359); -const Value RookValueMidgame = Value(0x4F6); -const Value RookValueEndgame = Value(0x4FE); -const Value QueenValueMidgame = Value(0x9D9); -const Value QueenValueEndgame = Value(0x9FE); +const Value PawnValueMidgame = Value(198); +const Value PawnValueEndgame = Value(258); +const Value KnightValueMidgame = Value(817); +const Value KnightValueEndgame = Value(846); +const Value BishopValueMidgame = Value(836); +const Value BishopValueEndgame = Value(857); +const Value RookValueMidgame = Value(1270); +const Value RookValueEndgame = Value(1278); +const Value QueenValueMidgame = Value(2521); +const Value QueenValueEndgame = Value(2558); extern const Value PieceValueMidgame[17]; // Indexed by Piece or PieceType extern const Value PieceValueEndgame[17]; -- 2.39.2