Changes

Jump to: navigation, search

Improving

1,101 bytes added, 6 July
new discoveries :D
| style="text-align:left;" | Reduce more when not improving / less when improving
|}
 
=Dynamic Improving=
 
[[Aron Petkovski]] introduced the concept of ''Dynamic Improving''. By using static evaluation differences as a bonus to a improving score, Dynamic Improving allows for more control over improving-based mechanisms.
 
<pre>
stack->improving_rate = 0.0;
 
if (!state.InCheck() && !stack->excluded_tt_move) {
...
 
Score static_eval_diff = kScoreNone;
double prev_improving_rate = 0.0;
if ((stack - 2)->static_eval != kScoreNone) {
static_eval_diff = stack->static_eval - (stack - 2)->static_eval;
prev_improving_rate = (stack - 2)->improving_rate;
} else if ((stack - 4)->static_eval != kScoreNone) {
static_eval_diff = stack->static_eval - (stack - 4)->static_eval;
prev_improving_rate = (stack - 4)->improving_rate;
}
 
if (static_eval_diff != kScoreNone) {
stack->improving_rate = prev_improving_rate + (static_eval_diff) / 25.0;
stack->improving_rate = std::clamp(stack->improving_rate, 0.0, 1.0);
}
} else {
stack->static_eval = eval = kScoreNone;
}
</pre>
=Code Example=
</pre>
This following code is from [[Integral]]. It demonstrates one common way to adjust LMP margin with dynamic improving.
<pre>
const int lmp_threshold = static_cast<int>((3 .0 + depth * depth) / (2 .0 - improvingstack->improving_rate));
if (is_quiet && moves_seen >= lmp_threshold) {
move_picker.SkipQuiets();
166
edits

Navigation menu