2 Stockfish, a UCI chess playing engine derived from Glaurung 2.1
3 Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
4 Copyright (C) 2008-2010 Marco Costalba, Joona Kiiski, Tord Romstad
6 Stockfish is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 Stockfish is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #if !defined MOVEPICK_H_INCLUDED
21 #define MOVEPICK_H_INCLUDED
29 /// MovePicker is a class which is used to pick one legal move at a time from
30 /// the current position. It is initialized with a Position object and a few
31 /// moves we have reason to believe are good. The most important method is
32 /// MovePicker::pick_next_move(), which returns a new legal move each time it
33 /// is called, until there are no legal moves left, when MOVE_NONE is returned.
34 /// In order to improve the efficiency of the alpha beta algorithm, MovePicker
35 /// attempts to return the moves which are most likely to be strongest first.
39 MovePicker& operator=(const MovePicker&); // silence a warning under MSVC
42 MovePicker(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss, Value beta);
43 MovePicker(const Position& p, Move ttm, Depth d, const History& h);
47 void score_captures();
48 void score_noncaptures();
49 void score_evasions();
55 MoveStack ttMoves[2], killers[2];
56 int badCaptureThreshold, phase;
57 const uint8_t* phasePtr;
58 MoveStack *curMove, *lastMove, *lastGoodNonCapture, *badCaptures;
59 MoveStack moves[MOVES_MAX];
62 #endif // !defined(MOVEPICK_H_INCLUDED)