Odd-Even+Effect

toc
 * Home * Search * Alpha-Beta * Odd-Even Effect**

The **Odd-Even Effect** of Alpha-Beta is caused by the topology of the minimal game tree of uniform depth **n** and branching factor **b**. Michael Levin found the formula of the number of leaf nodes, which was published in Edwards' and Hart's 1961 Alpha-Beta paper.

=Even= > math \displaystyle 2b^{n/2} - 1 math

=Odd= > math \displaystyle b ^ { \frac {n+1} 2 } + b ^ { \frac {n-1} 2 } - 1 math

=Node Types= Number of Leaf nodes of a certain Node type at depth n :

> math \displaystyle PV_n = 1 math > math \displaystyle CUT_n = CUT_{n-1} math > math \displaystyle ALL_n = ALL_{n-1} + b^{{n}/{2}} - b^{\frac{n-2}{2}} math
 * n = even:**

> math \displaystyle PV_n = 1 math > math \displaystyle CUT_n = CUT_{n-1} + b^{\frac{n+1}{2}} - b^{\frac{n-1}{2}} math > math \displaystyle ALL_n = ALL_{n-1} math
 * n = odd:**

So for the sum of the Leaf-nodes at depth n as well as the total sum of nodes (including interior nodes) up to depth n holds > math \displaystyle ALL_n = CUT_{n-1} math  =Leaves by Depth= Assuming a constant branching factor of 40, this results in following number of leaves, using the [|floor and ceiling] formulas in the header :

b^n math ||= math b^{\lceil n / 2 \rceil} + b^{\lfloor n / 2 \rfloor} - 1 math ||= ||= math b^{\lceil n / 2 \rceil} - 1 math ||= math b^{\lfloor n / 2 \rfloor} - 1 math ||
 * ~ depth ||||||||||~ number of leaves with depth n and b = 40 ||
 * ~ ||~ worst case ||~ best case ||~ PV ||~ CUT ||~ ALL ||
 * = **n** ||= math
 * = 0 ||> 1 ||> 1 ||> 1 ||> 0 ||> 0 ||
 * = 1 ||> 40 ||> 40 ||> 1 ||> 39 ||> 0 ||
 * = 2 ||> 1,600 ||> 79 ||> 1 ||> 39 ||> 39 ||
 * = 3 ||> 64,000 ||> 1,639 ||> 1 ||> 1,599 ||> 39 ||
 * = 4 ||> 2,560,000 ||> 3,199 ||> 1 ||> 1,599 ||> 1,599 ||
 * = 5 ||> 102,400,000 ||> 65,599 ||> 1 ||> 63,999 ||> 1,599 ||
 * = 6 ||> 4,096,000,000 ||> 127,999 ||> 1 ||> 63,999 ||> 63,999  ||
 * = 7 ||> 163,840,000,000 ||> 2,623,999 ||> 1 ||> 2,559,999 ||> 63,999 ||
 * = 8 ||> 6,553,600,000,000 ||> 5,119,999 ||> 1 ||> 2,559,999 ||> 2,559,999  ||

> math \displaystyle \frac{Leaves_n+1}{Leaves_{n-1}+1} = \frac{2b}{b+1} \approx 2 math
 * n = even:**

> math \displaystyle \frac{Leaves_n+1}{Leaves_{n-1}+1} = \frac{b+1}{2} \approx \frac{b}{2} math
 * n = odd:**

=Iterative Deepening= Inside an iterative deepening framework, the odd-even effect causes an asymmetry in time usage. Even-odd transitions grow (much) more than odd-even. The effect diminishes due to quiescence search and selectivity in the upper part of the tree. However, past and recent programs addressed that issue. For instance L'Excentrique used two ply increments, and Bebe had no quiescence at all, and searched in two ply increments as well. Other programs used fractional plies for extensions and ID increments.  =Score Oscillation= Additionally, many programs exhibit an effect on the score based on the [|parity] of the search depth due to the extra tempo of odd ply searches. Scores are stable when one looks at results from the odd plies only, or even plies only, but are sometimes unstable when they are mixed. One remedial on this odd-even effect is to apply a tempo bonus in leaf evaluation for the side to move.

=See also=
 * Asymmetric Evaluation
 * Minimax Wall
 * Parity Pruning

=Forum Posts=
 * [|Odd ply versus even ply searches] by Robert Hyatt, rgcc, February 28, 1996 » BeBe
 * [|PROG: odd/even score alternance] by Rémi Coulom, rgcc, June 5, 1997 » Tempo
 * [|pv score oscillation] by Willie Wood, CCC, October 18, 1997
 * [|Node counts at a given depth/iteration in search] by BB+, OpenChess Forum, May 23, 2011
 * [|CUT/ALL nodes ratio] by Daniel Shawul, CCC, June 06, 2013
 * [|Asymmetrical evaluation] by Laurie Tunnicliffe, CCC, May 24, 2016 » Asymmetric Evaluation

=References= =What links here?= include page="Odd-Even Effect" component="backlinks" limit="20"
 * Up one level**