]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Base work for exclusion search
[stockfish] / src / position.h
index c04f1412e5db666ef0ac06f86395171f663abc66..1d6a99bab0f9bfa13314c7a77c7ca6bae4192144 100644 (file)
@@ -236,7 +236,7 @@ public:
   // Doing and undoing moves
   void saveState();
   void do_move(Move m, StateInfo& st);
-  void do_move(Move m, StateInfo& st, Bitboard dcCandidates);
+  void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool moveIsCheck);
   void undo_move(Move m);
   void do_null_move(StateInfo& st);
   void undo_null_move();
@@ -255,7 +255,6 @@ public:
   // Incremental evaluation
   Score value() const;
   Value non_pawn_material(Color c) const;
-  Phase game_phase() const;
   Score pst_delta(Piece piece, Square from, Square to) const;
 
   // Game termination checks
@@ -282,6 +281,9 @@ public:
   static void init_zobrist();
   static void init_piece_square_tables();
 
+  // Public zobs
+  static Key zobExclusion;
+
 private:
 
   // Initialization helper functions (used while setting up a position)
@@ -296,9 +298,6 @@ private:
   void undo_castle_move(Move m);
   void find_checkers();
 
-  template<PieceType Piece>
-  void update_checkers(Bitboard* pCheckersBB, Square ksq, Square from, Square to, Bitboard dcCandidates);
-
   template<bool FindPinned>
   Bitboard hidden_checkers(Color c) const;
 
@@ -529,22 +528,6 @@ inline Value Position::non_pawn_material(Color c) const {
   return st->npMaterial[c];
 }
 
-inline Phase Position::game_phase() const {
-
-  // Values modified by Joona Kiiski
-  static const Value MidgameLimit = Value(15581);
-  static const Value EndgameLimit = Value(3998);
-
-  Value npm = non_pawn_material(WHITE) + non_pawn_material(BLACK);
-
-  if (npm >= MidgameLimit)
-      return PHASE_MIDGAME;
-  else if(npm <= EndgameLimit)
-      return PHASE_ENDGAME;
-  else
-      return Phase(((npm - EndgameLimit) * 128) / (MidgameLimit - EndgameLimit));
-}
-
 inline bool Position::move_is_passed_pawn_push(Move m) const {
 
   Color c = side_to_move();