Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
Value last_search_score = -VALUE_INF;
Move last_best_move = Move::none();

const auto print_info_line = [&] {

Check warning on line 82 in src/search.cpp

View workflow job for this annotation

GitHub Actions / Linter / cpp-linter

src/search.cpp:82:16 [readability-identifier-naming]

invalid case style for constant 'print_info_line'
// Lambda to convert internal units score to uci score. TODO: add eval rescaling here once we get one
auto format_score = [](Value score) {
if (score < -VALUE_WIN && score > -VALUE_MATED) {
Expand Down Expand Up @@ -207,7 +207,7 @@
}

if (!PV_NODE && !is_in_check && depth >= tuned::nmp_depth && static_eval >= beta) {
int R = tuned::nmp_base_r;

Check warning on line 210 in src/search.cpp

View workflow job for this annotation

GitHub Actions / Linter / cpp-linter

src/search.cpp:210:18 [readability-identifier-naming]

invalid case style for variable 'R'
Position pos_after = pos.null_move();

m_repetition_info.push(pos_after.get_hash_key(), true);
Expand All @@ -223,7 +223,7 @@

// Razoring
if (!PV_NODE && !is_in_check && depth <= 7 && static_eval + 260 * depth < alpha) {
const Value razor_score = quiesce(pos, ss, alpha, beta, ply);

Check warning on line 226 in src/search.cpp

View workflow job for this annotation

GitHub Actions / Linter / cpp-linter

src/search.cpp:226:21 [readability-identifier-naming]

invalid case style for constant 'razor_score'
if (razor_score <= alpha) {
return razor_score;
}
Expand Down Expand Up @@ -255,6 +255,12 @@
}
}

Value see_threshold = quiet ? -67 * depth : -32 * depth;
// SEE PVS Pruning
if (depth <= 10 && !ROOT_NODE && !SEE::see(pos, m, see_threshold)) {
continue;
}

// Do move
Position pos_after = pos.move(m);
moves_played++;
Expand Down Expand Up @@ -313,7 +319,7 @@
if (best_value >= beta && quiet_move(best_move)) {
ss->killer = best_move;

const i32 bonus = std::min(1896, 4 * depth * depth + 120 * depth - 120);

Check warning on line 322 in src/search.cpp

View workflow job for this annotation

GitHub Actions / Linter / cpp-linter

src/search.cpp:322:19 [readability-identifier-naming]

invalid case style for constant 'bonus'
m_td.history.update_quiet_stats(pos, best_move, bonus);
for (Move quiet : quiets_played) {
m_td.history.update_quiet_stats(pos, quiet, -bonus);
Expand Down Expand Up @@ -428,8 +434,8 @@
}

Value Worker::evaluate(const Position& pos) {
const Color us = pos.active_color();

Check warning on line 437 in src/search.cpp

View workflow job for this annotation

GitHub Actions / Linter / cpp-linter

src/search.cpp:437:17 [readability-identifier-naming]

invalid case style for constant 'us'
const Color them = invert(us);

Check warning on line 438 in src/search.cpp

View workflow job for this annotation

GitHub Actions / Linter / cpp-linter

src/search.cpp:438:17 [readability-identifier-naming]

invalid case style for constant 'them'

Value material =
100 * (pos.piece_count(us, PieceType::Pawn) - pos.piece_count(them, PieceType::Pawn))
Expand Down
Loading