mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 07:27:46 +00:00
Fix castling rights feature encoding.
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Eval {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (Eval::NNUE::IndexType i = 0; i < kDimensions; ++i) {
|
for (Eval::NNUE::IndexType i = 0; i < kDimensions; ++i) {
|
||||||
if (relative_castling_rights & (i << 1)) {
|
if (relative_castling_rights & (1 << i)) {
|
||||||
active->push_back(i);
|
active->push_back(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,8 +55,8 @@ namespace Eval {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (Eval::NNUE::IndexType i = 0; i < kDimensions; ++i) {
|
for (Eval::NNUE::IndexType i = 0; i < kDimensions; ++i) {
|
||||||
if ((relative_previous_castling_rights & (i << 1)) &&
|
if ((relative_previous_castling_rights & (1 << i)) &&
|
||||||
(relative_current_castling_rights & (i << 1)) == 0) {
|
(relative_current_castling_rights & (1 << i)) == 0) {
|
||||||
removed->push_back(i);
|
removed->push_back(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user