some minor changes to NNUE interference | bench 1136338

This commit is contained in:
rektdie committed 2025-05-07 01:07:47 +02:00
1 parent d73ed3b98d
commit 0a8d7ca2f5
5 files changed
+47 -43

No files matched your search

+18 -18
View File
@@ -23,11 +23,11 @@ void AccumulatorPair::addSub(bool stm, int add, int addPT, int sub, int subPT) {
int subB = CalculateIndex(Black, stm, subPT, sub);
for (int i = 0; i < NNUE::HL_SIZE; i++) {
white.values[i] += NNUE::net.accumulator_weights[addW * NNUE::HL_SIZE + i];
black.values[i] += NNUE::net.accumulator_weights[addB * NNUE::HL_SIZE + i];
white[i] += NNUE::net.accumulator_weights[addW * NNUE::HL_SIZE + i];
black[i] += NNUE::net.accumulator_weights[addB * NNUE::HL_SIZE + i];
white.values[i] -= NNUE::net.accumulator_weights[subW * NNUE::HL_SIZE + i];
black.values[i] -= NNUE::net.accumulator_weights[subB * NNUE::HL_SIZE + i];
white[i] -= NNUE::net.accumulator_weights[subW * NNUE::HL_SIZE + i];
black[i] -= NNUE::net.accumulator_weights[subB * NNUE::HL_SIZE + i];
}
}
@@ -43,14 +43,14 @@ void AccumulatorPair::addSubSub(bool stm, int add, int addPT, int sub1, int subP
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];
black.values[i] += NNUE::net.accumulator_weights[addB * NNUE::HL_SIZE + i];
white[i] += NNUE::net.accumulator_weights[addW * NNUE::HL_SIZE + i];
black[i] += NNUE::net.accumulator_weights[addB * NNUE::HL_SIZE + i];
white.values[i] -= NNUE::net.accumulator_weights[subW1 * NNUE::HL_SIZE + i];
black.values[i] -= NNUE::net.accumulator_weights[subB1 * NNUE::HL_SIZE + i];
white[i] -= NNUE::net.accumulator_weights[subW1 * NNUE::HL_SIZE + i];
black[i] -= NNUE::net.accumulator_weights[subB1 * NNUE::HL_SIZE + i];
white.values[i] -= NNUE::net.accumulator_weights[subW2 * NNUE::HL_SIZE + i];
black.values[i] -= NNUE::net.accumulator_weights[subB2 * NNUE::HL_SIZE + i];
white[i] -= NNUE::net.accumulator_weights[subW2 * NNUE::HL_SIZE + i];
black[i] -= NNUE::net.accumulator_weights[subB2 * NNUE::HL_SIZE + i];
}
}
@@ -69,17 +69,17 @@ void AccumulatorPair::addAddSubSub(bool stm, int add1, int addPT1, int add2, int
int subB2 = CalculateIndex(Black, stm, subPT2, sub2);
for (int i = 0; i < NNUE::HL_SIZE; i++) {
white.values[i] += NNUE::net.accumulator_weights[addW1 * NNUE::HL_SIZE + i];
black.values[i] += NNUE::net.accumulator_weights[addB1 * NNUE::HL_SIZE + i];
white[i] += NNUE::net.accumulator_weights[addW1 * NNUE::HL_SIZE + i];
black[i] += NNUE::net.accumulator_weights[addB1 * NNUE::HL_SIZE + i];
white.values[i] += NNUE::net.accumulator_weights[addW2 * NNUE::HL_SIZE + i];
black.values[i] += NNUE::net.accumulator_weights[addB2 * NNUE::HL_SIZE + i];
white[i] += NNUE::net.accumulator_weights[addW2 * NNUE::HL_SIZE + i];
black[i] += NNUE::net.accumulator_weights[addB2 * NNUE::HL_SIZE + i];
white.values[i] -= NNUE::net.accumulator_weights[subW1 * NNUE::HL_SIZE + i];
black.values[i] -= NNUE::net.accumulator_weights[subB1 * NNUE::HL_SIZE + i];
white[i] -= NNUE::net.accumulator_weights[subW1 * NNUE::HL_SIZE + i];
black[i] -= NNUE::net.accumulator_weights[subB1 * NNUE::HL_SIZE + i];
white.values[i] -= NNUE::net.accumulator_weights[subW2 * NNUE::HL_SIZE + i];
black.values[i] -= NNUE::net.accumulator_weights[subB2 * NNUE::HL_SIZE + i];
white[i] -= NNUE::net.accumulator_weights[subW2 * NNUE::HL_SIZE + i];
black[i] -= NNUE::net.accumulator_weights[subB2 * NNUE::HL_SIZE + i];
}
}