mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Simplify TT replace strategy
Tested for no-regression with SPRT[-3, 1] at STC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 32046 W: 6020 L: 5918 D: 20108 No functional change.
This commit is contained in:
parent
e7362dae78
commit
865b71309c
1 changed files with 3 additions and 6 deletions
|
@ -94,7 +94,6 @@ const TTEntry* TranspositionTable::probe(const Key key) const {
|
||||||
|
|
||||||
void TranspositionTable::store(const Key key, Value v, Bound b, Depth d, Move m, Value statV) {
|
void TranspositionTable::store(const Key key, Value v, Bound b, Depth d, Move m, Value statV) {
|
||||||
|
|
||||||
int c1, c2, c3;
|
|
||||||
TTEntry *tte, *replace;
|
TTEntry *tte, *replace;
|
||||||
uint32_t key32 = key >> 32; // Use the high 32 bits as key inside the cluster
|
uint32_t key32 = key >> 32; // Use the high 32 bits as key inside the cluster
|
||||||
|
|
||||||
|
@ -112,11 +111,9 @@ void TranspositionTable::store(const Key key, Value v, Bound b, Depth d, Move m,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implement replace strategy
|
// Implement replace strategy
|
||||||
c1 = (replace->generation8 == generation ? 2 : 0);
|
if ( (replace->generation8 == generation) * 2
|
||||||
c2 = (tte->generation8 == generation || tte->bound() == BOUND_EXACT ? -2 : 0);
|
- (tte->generation8 == generation || tte->bound() == BOUND_EXACT) * 2
|
||||||
c3 = (tte->depth16 < replace->depth16 ? 1 : 0);
|
+ (tte->depth16 < replace->depth16) > 0)
|
||||||
|
|
||||||
if (c1 + c2 + c3 > 0)
|
|
||||||
replace = tte;
|
replace = tte;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue