]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Fix the handling of opposite bishops in KXK endgame evaluation
[stockfish] / src / types.h
index 2709d77ffea70c3a39276bc62d45883c6f5d3be8..3260b903190b419858eee25818e7db5874ebd10a 100644 (file)
@@ -183,7 +183,7 @@ enum Value : int {
   VALUE_MATE_IN_MAX_PLY  =  VALUE_MATE - 2 * MAX_PLY,
   VALUE_MATED_IN_MAX_PLY = -VALUE_MATE + 2 * MAX_PLY,
 
-  PawnValueMg   = 188,   PawnValueEg   = 248,
+  PawnValueMg   = 171,   PawnValueEg   = 240,
   KnightValueMg = 764,   KnightValueEg = 848,
   BishopValueMg = 826,   BishopValueEg = 891,
   RookValueMg   = 1282,  RookValueEg   = 1373,
@@ -421,6 +421,10 @@ inline Square to_sq(Move m) {
   return Square(m & 0x3F);
 }
 
+inline int from_to(Move m) {
+ return m & 0xFFF;
+}
+
 inline MoveType type_of(Move m) {
   return MoveType(m & (3 << 14));
 }