function negamax(node, depth, α, β, color)
if node is a terminal node or depth = 0
return color * the heuristic value of node
else
foreach child of node
val := -negamax(child, depth-1, -β, -α, -color)
{the following if statement constitutes alpha-beta pruning}
if val≥β
return val
if val≥α
α:=val
return α
Так что, если выше приведен мой код Negamax (скопированный из Википедии), и он называется следующим образом:
negamax(origin, depth, -inf, +inf, 1)
Тогда будет ли эта функция всегда возвращать положительное значение независимо от того, с какой глубиной мы вызываем функцию. Это предполагает, что эвристическое значение само по себе всегда положительно.