X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=ce73cab2964c9ecf618adf6fd46ef24b0b3255d2;hp=a9aa514c97ab21caf63c0a9355643c0d136148a4;hb=1598a3edf851460a62a06493416554e1f7cf719c;hpb=e8b7109efffd95c8f8f3c030d41952d103b3e0fc diff --git a/src/types.h b/src/types.h index a9aa514c..ce73cab2 100644 --- a/src/types.h +++ b/src/types.h @@ -168,16 +168,13 @@ enum Value { VALUE_ENSURE_INTEGER_SIZE_P = INT_MAX, VALUE_ENSURE_INTEGER_SIZE_N = INT_MIN, - PawnValueMidgame = 198, - PawnValueEndgame = 258, - KnightValueMidgame = 817, - KnightValueEndgame = 846, - BishopValueMidgame = 836, - BishopValueEndgame = 857, - RookValueMidgame = 1270, - RookValueEndgame = 1278, - QueenValueMidgame = 2521, - QueenValueEndgame = 2558 + Mg = 0, Eg = 1, + + PawnValueMg = 198, PawnValueEg = 258, + KnightValueMg = 817, KnightValueEg = 846, + BishopValueMg = 836, BishopValueEg = 857, + RookValueMg = 1270, RookValueEg = 1278, + QueenValueMg = 2521, QueenValueEg = 2558 }; enum PieceType { @@ -321,9 +318,22 @@ inline Score apply_weight(Score v, Score w) { #undef ENABLE_OPERATORS_ON #undef ENABLE_SAFE_OPERATORS_ON -extern const Value PieceValueMidgame[17]; // Indexed by Piece or PieceType -extern const Value PieceValueEndgame[17]; -extern int SquareDistance[64][64]; +namespace Zobrist { + + extern Key psq[2][8][64]; // [color][pieceType][square / piece count] + extern Key enpassant[8]; // [file] + extern Key castle[16]; // [castleRight] + extern Key side; + extern Key exclusion; + + void init(); +} + +CACHE_LINE_ALIGNMENT + +extern Score pieceSquareTable[16][64]; // [piece][square] +extern Value PieceValue[2][18]; // [Mg / Eg][piece / pieceType] +extern int SquareDistance[64][64]; // [square][square] struct MoveStack { Move move;