Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@
m8x64 pinner = maybe_pinner1 & maybe_pinner2;

// Does this ray have a pinner?
const m8x64 has_pinner = geometry::ray_fill(pinner);

Check warning on line 502 in src/position.cpp

View workflow job for this annotation

GitHub Actions / Linter / cpp-linter

src/position.cpp:502:17 [readability-identifier-naming]

invalid case style for constant 'has_pinner'
const m8x64 pinned = maybe_pinned & has_pinner;

Check warning on line 503 in src/position.cpp

View workflow job for this annotation

GitHub Actions / Linter / cpp-linter

src/position.cpp:503:17 [readability-identifier-naming]

invalid case style for constant 'pinned'

u8x64 nonmasked_pinned_ids =
geometry::lane_broadcast(pinned.mask(ray_places & u8x64::splat(0xF)));
Expand Down Expand Up @@ -991,7 +991,7 @@
return os;
}

bool Position::is_reversible(Move move) {
bool Position::is_reversible(Move move) const {
return !(move.is_capture() || move.is_promotion() || move.is_castle()
|| (m_board[move.from()].ptype() == PieceType::Pawn));
}
Expand Down
2 changes: 1 addition & 1 deletion src/position.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ struct Position {

[[nodiscard]] u16 get_50mr_counter() const;

[[nodiscard]] bool is_reversible(Move move);
[[nodiscard]] bool is_reversible(Move move) const;

const std::array<Wordboard, 2> calc_attacks_slow();
const std::array<PieceMask, 2> calc_attacks_slow(Square sq);
Expand Down
6 changes: 3 additions & 3 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ Value Worker::search(

ss->cont_hist_entry = &m_td.history.get_cont_hist_entry(pos, m);
Position pos_after = pos.move(m, m_td.push_psqt_state(), &m_searcher.tt);
repetition_info.push(pos_after.get_hash_key(), pos_after.is_reversible(m));
repetition_info.push(pos_after.get_hash_key(), pos.is_reversible(m));

Value probcut_value = -quiesce<IS_MAIN, false>(pos_after, ss + 1, -probcut_beta,
-probcut_beta + 1, ply + 1);
Expand Down Expand Up @@ -740,7 +740,7 @@ Value Worker::search(
moves_played++;

// Put hash into repetition table. TODO: encapsulate this and any other future adjustment to do "on move" into a proper function
repetition_info.push(pos_after.get_hash_key(), pos_after.is_reversible(m));
repetition_info.push(pos_after.get_hash_key(), pos.is_reversible(m));

// Get search value
Depth new_depth = depth - 1 + extension;
Expand Down Expand Up @@ -1066,7 +1066,7 @@ Value Worker::quiesce(const Position& pos, Stack* ss, Value alpha, Value beta, i
moves.skip_quiets();

// Put hash into repetition table. TODO: encapsulate this and any other future adjustment to do "on move" into a proper function
repetition_info.push(pos_after.get_hash_key(), pos_after.is_reversible(m));
repetition_info.push(pos_after.get_hash_key(), pos.is_reversible(m));

// Get search value
Value value = -quiesce<IS_MAIN, PV_NODE>(pos_after, ss + 1, -beta, -alpha, ply + 1);
Expand Down
Loading