mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 03:26:24 +08:00
Small cleanups
Delete cast to int in movepick. update AUTHORS. adjust assert in sigmoid. fix spelling mistakes in README closes https://github.com/official-stockfish/Stockfish/pull/3922 closes https://github.com/official-stockfish/Stockfish/pull/3948 closes https://github.com/official-stockfish/Stockfish/pull/3942 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
45f2416db4
commit
004ea2c25e
@@ -163,7 +163,7 @@ inline int64_t sigmoid(int64_t t, int64_t x0,
|
||||
int64_t P,
|
||||
int64_t Q)
|
||||
{
|
||||
assert(C > 0);
|
||||
assert(C > 0 && Q != 0);
|
||||
return y0 + P * (t-x0) / (Q * (std::abs(t-x0) + C)) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,8 +107,8 @@ void MovePicker::score() {
|
||||
|
||||
for (auto& m : *this)
|
||||
if constexpr (Type == CAPTURES)
|
||||
m.value = int(PieceValue[MG][pos.piece_on(to_sq(m))]) * 6
|
||||
+ (*captureHistory)[pos.moved_piece(m)][to_sq(m)][type_of(pos.piece_on(to_sq(m)))];
|
||||
m.value = 6 * PieceValue[MG][pos.piece_on(to_sq(m))]
|
||||
+ (*captureHistory)[pos.moved_piece(m)][to_sq(m)][type_of(pos.piece_on(to_sq(m)))];
|
||||
|
||||
else if constexpr (Type == QUIETS)
|
||||
m.value = (*mainHistory)[pos.side_to_move()][from_to(m)]
|
||||
|
||||
Reference in New Issue
Block a user