summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c7843f2)
This was needed by an old optimization in sorting of
non-captures that is now obsoleted by new std::sort()
approach.
Remove also the unused depth member data. Interestingly
this has always been unused since the Glaurung days.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
/// search captures, promotions and some checks) and about how important good
/// move ordering is at the current node.
/// search captures, promotions and some checks) and about how important good
/// move ordering is at the current node.
-MovePicker::MovePicker(const Position& p, bool pv, Move ttm, Depth d,
+MovePicker::MovePicker(const Position& p, Move ttm, Depth d,
const History& h, SearchStack* ss) : pos(p), H(h) {
const History& h, SearchStack* ss) : pos(p), H(h) {
} else
mateKiller = killer1 = killer2 = MOVE_NONE;
} else
mateKiller = killer1 = killer2 = MOVE_NONE;
- depth = d;
- movesPicked = 0;
- numOfMoves = 0;
- numOfBadCaptures = 0;
- checkKillers = checkLegal = false;
+ movesPicked = numOfMoves = numOfBadCaptures = 0;
+ checkKillers = checkLegal = finished = false;
if (p.is_check())
phaseIndex = EvasionsPhaseIndex;
if (p.is_check())
phaseIndex = EvasionsPhaseIndex;
- else if (depth > Depth(0))
phaseIndex = MainSearchPhaseIndex;
phaseIndex = MainSearchPhaseIndex;
- else if (depth == Depth(0))
+ else if (d == Depth(0))
phaseIndex = QsearchWithChecksPhaseIndex;
else
phaseIndex = QsearchWithoutChecksPhaseIndex;
phaseIndex = QsearchWithChecksPhaseIndex;
else
phaseIndex = QsearchWithoutChecksPhaseIndex;
- MovePicker(const Position& p, bool pvnode, Move ttm, Depth d, const History& h, SearchStack* ss = NULL);
+ MovePicker(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss = NULL);
Move get_next_move();
Move get_next_move(Lock& lock);
int number_of_moves() const;
Move get_next_move();
Move get_next_move(Lock& lock);
int number_of_moves() const;
Move ttMove, mateKiller, killer1, killer2;
Bitboard pinned, dc;
MoveStack moves[256], badCaptures[64];
Move ttMove, mateKiller, killer1, killer2;
Bitboard pinned, dc;
MoveStack moves[256], badCaptures[64];
- bool pvNode;
- Depth depth;
int phaseIndex;
int numOfMoves, numOfBadCaptures;
int movesPicked;
int phaseIndex;
int numOfMoves, numOfBadCaptures;
int movesPicked;
- MovePicker mp = MovePicker(pos, false, MOVE_NONE, OnePly, H);
+ MovePicker mp = MovePicker(pos, MOVE_NONE, OnePly, H);
// Castling moves
if (movestr == "O-O-O" || movestr == "O-O-O+")
// Castling moves
if (movestr == "O-O-O" || movestr == "O-O-O+")
if (type_of_piece(pc) == KING)
return AMBIGUITY_NONE;
if (type_of_piece(pc) == KING)
return AMBIGUITY_NONE;
- MovePicker mp = MovePicker(pos, false, MOVE_NONE, OnePly, H);
+ MovePicker mp = MovePicker(pos, MOVE_NONE, OnePly, H);
Move mv, moveList[8];
int n = 0;
Move mv, moveList[8];
int n = 0;
// Initialize a MovePicker object for the current position, and prepare
// to search all moves
// Initialize a MovePicker object for the current position, and prepare
// to search all moves
- MovePicker mp = MovePicker(pos, true, ttMove, depth, Threads[threadID].H, &ss[ply]);
+ MovePicker mp = MovePicker(pos, ttMove, depth, Threads[threadID].H, &ss[ply]);
Move move, movesSearched[256];
int moveCount = 0;
Move move, movesSearched[256];
int moveCount = 0;
// Initialize a MovePicker object for the current position, and prepare
// to search all moves:
// Initialize a MovePicker object for the current position, and prepare
// to search all moves:
- MovePicker mp = MovePicker(pos, false, ttMove, depth, Threads[threadID].H, &ss[ply]);
+ MovePicker mp = MovePicker(pos, ttMove, depth, Threads[threadID].H, &ss[ply]);
Move move, movesSearched[256];
int moveCount = 0;
Move move, movesSearched[256];
int moveCount = 0;
// Initialize a MovePicker object for the current position, and prepare
// to search the moves. Because the depth is <= 0 here, only captures,
// queen promotions and checks (only if depth == 0) will be generated.
// Initialize a MovePicker object for the current position, and prepare
// to search the moves. Because the depth is <= 0 here, only captures,
// queen promotions and checks (only if depth == 0) will be generated.
- MovePicker mp = MovePicker(pos, pvNode, ttMove, depth, Threads[threadID].H);
+ MovePicker mp = MovePicker(pos, ttMove, depth, Threads[threadID].H);
Move move;
int moveCount = 0;
Bitboard dcCandidates = mp.discovered_check_candidates();
Move move;
int moveCount = 0;
Bitboard dcCandidates = mp.discovered_check_candidates();