This will allow to have wider access to attack
information, for instance from MovePicker.
Note that 'eval' field become obsolete, it is kept
just becasue when we get a position score from TT
we update 'eval' even without an EvalInfo object.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
currentMove = threatMove = MOVE_NONE;
reduction = Depth(0);
eval = VALUE_NONE;
currentMove = threatMove = MOVE_NONE;
reduction = Depth(0);
eval = VALUE_NONE;
}
void SearchStack::initKillers() {
}
void SearchStack::initKillers() {
const int FutilityValueMargin = 112 * bitScanReverse32(int(depth) * int(depth) / 2);
// Evaluate the position statically
const int FutilityValueMargin = 112 * bitScanReverse32(int(depth) * int(depth) / 2);
// Evaluate the position statically
- if (isCheck)
- ss[ply].eval = VALUE_NONE;
- else
{
if (tte && (tte->type() & VALUE_TYPE_EVAL))
staticValue = value_from_tt(tte->value(), ply);
else
{
if (tte && (tte->type() & VALUE_TYPE_EVAL))
staticValue = value_from_tt(tte->value(), ply);
else
staticValue = evaluate(pos, ei, threadID);
staticValue = evaluate(pos, ei, threadID);
+ ss[ply].evalInfo = &ei;
+ }
ss[ply].eval = staticValue;
futilityValue = staticValue + FutilityValueMargin;
ss[ply].eval = staticValue;
futilityValue = staticValue + FutilityValueMargin;
/// from nodes shallower and deeper in the tree during the search. Each
/// search thread has its own array of SearchStack objects, indexed by the
/// current ply.
/// from nodes shallower and deeper in the tree during the search. Each
/// search thread has its own array of SearchStack objects, indexed by the
/// current ply.
struct SearchStack {
Move pv[PLY_MAX_PLUS_2];
struct SearchStack {
Move pv[PLY_MAX_PLUS_2];
Move killers[KILLER_MAX];
Depth reduction;
Value eval;
Move killers[KILLER_MAX];
Depth reduction;
Value eval;
void init(int ply);
void initKillers();
void init(int ply);
void initKillers();