fixed accumulator bug | bench 1343750
This commit is contained in:
1 parent
44843fa6a8
commit
c2e03f1c19
2 files changed
+3
-3
No files matched your search
@@ -39,8 +39,8 @@ void AccumulatorPair::addSubSub(bool stm, int add, int addPT, int sub1, int subP
|
||||
int subW1 = CalculateIndex(White, stm, subPT1, sub1);
|
||||
int subB1 = CalculateIndex(Black, stm, subPT1, sub1);
|
||||
|
||||
int subW2 = CalculateIndex(White, ~stm, subPT2, sub2);
|
||||
int subB2 = CalculateIndex(Black, ~stm, subPT2, sub2);
|
||||
int subW2 = CalculateIndex(White, !stm, subPT2, sub2);
|
||||
int subB2 = CalculateIndex(Black, !stm, subPT2, sub2);
|
||||
|
||||
for (int i = 0; i < NNUE::HL_SIZE; i++) {
|
||||
white.values[i] += NNUE::net.accumulator_weights[addW * NNUE::HL_SIZE + i];
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ bool Board::MakeMove(Move move) {
|
||||
if (move.GetFlags() != epCapture) {
|
||||
accPair.addSubSub(sideToMove, move.MoveTo(), endPiece, move.MoveFrom(), attackerPiece, move.MoveTo(), targetPiece);
|
||||
} else {
|
||||
accPair.addSubSub(sideToMove, move.MoveTo(), endPiece, move.MoveFrom(), attackerPiece, enPassantTarget, Pawn);
|
||||
accPair.addSubSub(sideToMove, enPassantTarget, endPiece, move.MoveFrom(), attackerPiece, move.MoveTo() - direction, Pawn);
|
||||
}
|
||||
} else {
|
||||
if (move.GetFlags() != kingCastle && move.GetFlags() != queenCastle) {
|
||||
|
||||
Reference in new issue
Block a user