mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 14:27:45 +00:00
Retire is_upper_bound() and friend
Directly expand in the few places where is called. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+5
-5
@@ -1179,7 +1179,7 @@ namespace {
|
|||||||
&& tte
|
&& tte
|
||||||
&& tte->move()
|
&& tte->move()
|
||||||
&& !excludedMove // Do not allow recursive singular extension search
|
&& !excludedMove // Do not allow recursive singular extension search
|
||||||
&& is_lower_bound(tte->type())
|
&& (tte->type() & VALUE_TYPE_LOWER)
|
||||||
&& tte->depth() >= depth - 3 * ONE_PLY;
|
&& tte->depth() >= depth - 3 * ONE_PLY;
|
||||||
|
|
||||||
// Step 10. Loop through moves
|
// Step 10. Loop through moves
|
||||||
@@ -1957,8 +1957,8 @@ namespace {
|
|||||||
|| v >= Max(value_mate_in(PLY_MAX), beta)
|
|| v >= Max(value_mate_in(PLY_MAX), beta)
|
||||||
|| v < Min(value_mated_in(PLY_MAX), beta))
|
|| v < Min(value_mated_in(PLY_MAX), beta))
|
||||||
|
|
||||||
&& ( (is_lower_bound(tte->type()) && v >= beta)
|
&& ( ((tte->type() & VALUE_TYPE_LOWER) && v >= beta)
|
||||||
|| (is_upper_bound(tte->type()) && v < beta));
|
|| ((tte->type() & VALUE_TYPE_UPPER) && v < beta));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1971,8 +1971,8 @@ namespace {
|
|||||||
|
|
||||||
Value v = value_from_tt(tte->value(), ply);
|
Value v = value_from_tt(tte->value(), ply);
|
||||||
|
|
||||||
if ( (is_lower_bound(tte->type()) && v >= defaultEval)
|
if ( ((tte->type() & VALUE_TYPE_LOWER) && v >= defaultEval)
|
||||||
|| (is_upper_bound(tte->type()) && v < defaultEval))
|
|| ((tte->type() & VALUE_TYPE_UPPER) && v < defaultEval))
|
||||||
return v;
|
return v;
|
||||||
|
|
||||||
return defaultEval;
|
return defaultEval;
|
||||||
|
|||||||
@@ -163,12 +163,4 @@ inline Value value_mated_in(int ply) {
|
|||||||
return -VALUE_MATE + ply;
|
return -VALUE_MATE + ply;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int is_upper_bound(ValueType vt) {
|
|
||||||
return vt & VALUE_TYPE_UPPER;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int is_lower_bound(ValueType vt) {
|
|
||||||
return vt & VALUE_TYPE_LOWER;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // !defined(VALUE_H_INCLUDED)
|
#endif // !defined(VALUE_H_INCLUDED)
|
||||||
|
|||||||
Reference in New Issue
Block a user