summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
917944e)
It seems a regression at 15+0.05:
ELO: -4.82 +-2.1 (95%) LOS: 0.0%
Total: 40000 W: 7181 L: 7736 D: 25083
bench:
8331357
-/// quiet_moves() returns a pointer to the beginning of moves array. It
-/// is used to access already tried quiet moves when updating history.
-
-const ExtMove* MovePicker::quiet_moves() const {
- return stage == KILLERS_S1 ? killers
- : stage == QUIETS_1_S1 || stage == QUIETS_2_S1 ? moves : NULL;
-}
-
-
/// score() assign a numerical move ordering score to each move in a move list.
/// The moves with highest scores will be picked first.
template<>
/// score() assign a numerical move ordering score to each move in a move list.
/// The moves with highest scores will be picked first.
template<>
MovePicker(const Position&, Move, const HistoryStats&, PieceType);
MovePicker(const Position&, Move, Depth, const HistoryStats&, Move*, Search::Stack*);
MovePicker(const Position&, Move, const HistoryStats&, PieceType);
MovePicker(const Position&, Move, Depth, const HistoryStats&, Move*, Search::Stack*);
- const ExtMove* quiet_moves() const;
template<bool SpNode> Move next_move();
private:
template<bool SpNode> Move next_move();
private:
assert(PvNode || (alpha == beta - 1));
assert(depth > DEPTH_ZERO);
assert(PvNode || (alpha == beta - 1));
assert(depth > DEPTH_ZERO);
+ Move quietsSearched[64];
StateInfo st;
const TTEntry *tte;
SplitPoint* splitPoint;
StateInfo st;
const TTEntry *tte;
SplitPoint* splitPoint;
Value bestValue, value, ttValue, eval, nullValue, futilityValue;
bool inCheck, givesCheck, pvMove, singularExtensionNode, improving;
bool captureOrPromotion, dangerous, doFullDepthSearch;
Value bestValue, value, ttValue, eval, nullValue, futilityValue;
bool inCheck, givesCheck, pvMove, singularExtensionNode, improving;
bool captureOrPromotion, dangerous, doFullDepthSearch;
+ int moveCount, quietCount;
// Step 1. Initialize node
Thread* thisThread = pos.this_thread();
// Step 1. Initialize node
Thread* thisThread = pos.this_thread();
+ moveCount = quietCount = 0;
bestValue = -VALUE_INFINITE;
ss->currentMove = threatMove = (ss+1)->excludedMove = bestMove = MOVE_NONE;
ss->ply = (ss-1)->ply + 1;
bestValue = -VALUE_INFINITE;
ss->currentMove = threatMove = (ss+1)->excludedMove = bestMove = MOVE_NONE;
ss->ply = (ss-1)->ply + 1;
pvMove = PvNode && moveCount == 1;
ss->currentMove = move;
pvMove = PvNode && moveCount == 1;
ss->currentMove = move;
+ if (!SpNode && !captureOrPromotion && quietCount < 64)
+ quietsSearched[quietCount++] = move;
// Step 14. Make the move
pos.do_move(move, st, ci, givesCheck);
// Step 14. Make the move
pos.do_move(move, st, ci, givesCheck);
// played non-capture moves.
Value bonus = Value(int(depth) * int(depth));
History.update(pos.moved_piece(bestMove), to_sq(bestMove), bonus);
// played non-capture moves.
Value bonus = Value(int(depth) * int(depth));
History.update(pos.moved_piece(bestMove), to_sq(bestMove), bonus);
-
- for (const ExtMove* em = mp.quiet_moves(); em && em->move != bestMove; ++em)
- History.update(pos.moved_piece(em->move), to_sq(em->move), -bonus);
+ for (int i = 0; i < quietCount - 1; ++i)
+ {
+ Move m = quietsSearched[i];
+ History.update(pos.moved_piece(m), to_sq(m), -bonus);
+ }
if (is_ok((ss-1)->currentMove))
Countermoves.update(pos.piece_on(prevMoveSq), prevMoveSq, bestMove);
if (is_ok((ss-1)->currentMove))
Countermoves.update(pos.piece_on(prevMoveSq), prevMoveSq, bestMove);