Remove major corrhist

Remove major correction history and slightly increase all other
correction weights.

Passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 50080 W: 13171 L: 12959 D: 23950
Ptnml(0-2): 196, 5998, 12462, 6166, 218
https://tests.stockfishchess.org/tests/live_elo/67954526406a4efe9eb7d176

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 51504 W: 13188 L: 12995 D: 25321
Ptnml(0-2): 54, 5658, 14128, 5865, 47
https://tests.stockfishchess.org/tests/live_elo/67954961406a4efe9eb7d251

closes https://github.com/official-stockfish/Stockfish/pull/5822

Bench: 2081366
This commit is contained in:
Martin Novák
2025-01-26 22:41:00 +01:00
committed by Disservin
parent 69be04d38e
commit 831cb01cea
5 changed files with 5 additions and 34 deletions
+4 -20
View File
@@ -335,7 +335,6 @@ void Position::set_check_info() const {
void Position::set_state() const {
st->key = st->materialKey = 0;
st->majorPieceKey = st->minorPieceKey = 0;
st->nonPawnKey[WHITE] = st->nonPawnKey[BLACK] = 0;
st->pawnKey = Zobrist::noPawns;
st->nonPawnMaterial[WHITE] = st->nonPawnMaterial[BLACK] = VALUE_ZERO;
@@ -360,16 +359,12 @@ void Position::set_state() const {
{
st->nonPawnMaterial[color_of(pc)] += PieceValue[pc];
if (type_of(pc) >= ROOK)
st->majorPieceKey ^= Zobrist::psq[pc][s];
else
if (type_of(pc) <= BISHOP)
st->minorPieceKey ^= Zobrist::psq[pc][s];
}
else
{
st->majorPieceKey ^= Zobrist::psq[pc][s];
st->minorPieceKey ^= Zobrist::psq[pc][s];
}
}
@@ -742,7 +737,6 @@ void Position::do_move(Move m,
do_castling<true>(us, from, to, rfrom, rto);
k ^= Zobrist::psq[captured][rfrom] ^ Zobrist::psq[captured][rto];
st->majorPieceKey ^= Zobrist::psq[captured][rfrom] ^ Zobrist::psq[captured][rto];
st->nonPawnKey[us] ^= Zobrist::psq[captured][rfrom] ^ Zobrist::psq[captured][rto];
captured = NO_PIECE;
}
@@ -773,10 +767,7 @@ void Position::do_move(Move m,
st->nonPawnMaterial[them] -= PieceValue[captured];
st->nonPawnKey[them] ^= Zobrist::psq[captured][capsq];
if (type_of(captured) >= ROOK)
st->majorPieceKey ^= Zobrist::psq[captured][capsq];
else
if (type_of(captured) <= BISHOP)
st->minorPieceKey ^= Zobrist::psq[captured][capsq];
}
@@ -858,10 +849,7 @@ void Position::do_move(Move m,
st->materialKey ^=
Zobrist::psq[promotion][pieceCount[promotion] - 1] ^ Zobrist::psq[pc][pieceCount[pc]];
if (promotionType >= ROOK)
st->majorPieceKey ^= Zobrist::psq[promotion][to];
else
if (promotionType <= BISHOP)
st->minorPieceKey ^= Zobrist::psq[promotion][to];
// Update material
@@ -881,14 +869,10 @@ void Position::do_move(Move m,
if (type_of(pc) == KING)
{
st->majorPieceKey ^= Zobrist::psq[pc][from] ^ Zobrist::psq[pc][to];
st->minorPieceKey ^= Zobrist::psq[pc][from] ^ Zobrist::psq[pc][to];
}
else if (type_of(pc) >= ROOK)
st->majorPieceKey ^= Zobrist::psq[pc][from] ^ Zobrist::psq[pc][to];
else
else if (type_of(pc) <= BISHOP)
st->minorPieceKey ^= Zobrist::psq[pc][from] ^ Zobrist::psq[pc][to];
}