mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-23 21:27:14 +00:00
Simplify indexing
Removes 1 function (from_to) from the Move type, change them to simpler raw. Remove the "and" use in the correction history structure calculation. Adjust the indexing. Passed simplification STC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 42880 W: 11327 L: 11113 D: 20440 Ptnml(0-2): 161, 4852, 11212, 5042, 173 https://tests.stockfishchess.org/tests/view/690593b8ea4b268f1fac1e8a Passed simplification LTC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 43560 W: 11276 L: 11079 D: 21205 Ptnml(0-2): 17, 4679, 12197, 4864, 23 https://tests.stockfishchess.org/tests/view/6906f819ea4b268f1fac216b closes https://github.com/official-stockfish/Stockfish/pull/6391 Bench: 2523092
This commit is contained in:
committed by
Joost VandeVondele
parent
df88db16c6
commit
7b7a9485d6
+4
-4
@@ -158,7 +158,7 @@ ExtMove* MovePicker::score(MoveList<Type>& ml) {
|
||||
else if constexpr (Type == QUIETS)
|
||||
{
|
||||
// histories
|
||||
m.value = 2 * (*mainHistory)[us][m.from_to()];
|
||||
m.value = 2 * (*mainHistory)[us][m.raw()];
|
||||
m.value += 2 * (*pawnHistory)[pawn_history_index(pos)][pc][to];
|
||||
m.value += (*continuationHistory[0])[pc][to];
|
||||
m.value += (*continuationHistory[1])[pc][to];
|
||||
@@ -176,7 +176,7 @@ ExtMove* MovePicker::score(MoveList<Type>& ml) {
|
||||
|
||||
|
||||
if (ply < LOW_PLY_HISTORY_SIZE)
|
||||
m.value += 8 * (*lowPlyHistory)[ply][m.from_to()] / (1 + ply);
|
||||
m.value += 8 * (*lowPlyHistory)[ply][m.raw()] / (1 + ply);
|
||||
}
|
||||
|
||||
else // Type == EVASIONS
|
||||
@@ -185,9 +185,9 @@ ExtMove* MovePicker::score(MoveList<Type>& ml) {
|
||||
m.value = PieceValue[capturedPiece] + (1 << 28);
|
||||
else
|
||||
{
|
||||
m.value = (*mainHistory)[us][m.from_to()] + (*continuationHistory[0])[pc][to];
|
||||
m.value = (*mainHistory)[us][m.raw()] + (*continuationHistory[0])[pc][to];
|
||||
if (ply < LOW_PLY_HISTORY_SIZE)
|
||||
m.value += (*lowPlyHistory)[ply][m.from_to()];
|
||||
m.value += (*lowPlyHistory)[ply][m.raw()];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user