- tte->save(posKey, VALUE_NONE, ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval);
+ tte->save(posKey, VALUE_NONE, ss->ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval);
+ }
+
+ // Update static history for previous move
+ if (is_ok((ss-1)->currentMove) && !(ss-1)->inCheck && !priorCapture)
+ {
+ int bonus = ss->staticEval > -(ss-1)->staticEval + 2 * Tempo ? -stat_bonus(depth) :
+ ss->staticEval < -(ss-1)->staticEval + 2 * Tempo ? stat_bonus(depth) :
+ 0;
+ thisThread->staticHistory[~us][from_to((ss-1)->currentMove)] << bonus;