1

In the alpha-beta pruning version of the minimax algorithm, when one evaluates a state p with $\alpha$ and $\beta$ cutoff and gets a v value, i.e.,

v = alphabeta(p, $\alpha$, $\beta$)

are these properties true?

  1. alphabeta(p, -$\infty$, $\beta$) = v when $\alpha$ < v
  2. alphabeta(p, $\alpha$, $\infty$) = v when v < $\beta$
  3. alphabeta(p, $\alpha$', $\beta$') = v when $\alpha$ $\le$ $\alpha$' $\le$ $\beta$' $\le$ $\beta$
  4. if v > $\beta$, then alphabeta(p, $\beta$, $\infty$) = alphabeta(p, $\alpha$, $\infty$)
  5. if v < $\alpha$, then alphabeta(p, -$\infty$, $\alpha$) = alphabeta(p, -$\infty$, $\beta$)

I've reached to this results studying the algorithm itself after reading a couple of papers. After applying it to a real case I've got an improvement of ~30% (in number of states visited, and this gives about a 30% of time execution improvement also), but I want to know if there is a mathematical background that supports these changes to the algorithm.

Ivan
  • 121
  • 6

2 Answers2

0

For a complete reference you can check An Analysis of Alpha-Beta Priming If I am not misunderstanding eq 15 and 16 apply to your case.

Jagj77
  • 1
  • 1
0

My understanding is that these inequalities are just required to make alpha/beta pruning correct, that is to guarantee that you get the minimax result.

You say you get an improvement of 30%. You might add if that is 30% fewer numbers checked, or 30% faster execution time (you might be checking say 65% fewer numbers, but might take twice as long on average per number checked).

But alpha/beta works best if you have a reasonably good heuristic to find and check “good” values i first, and for each value i find bad values ij first. The reason: If you examine an i first where the minimum of $a_{ij}$ is large, then it will be easier to reject i’ which is not as good as i, and if you were able to guess a j first that makes $a_{ij}$ small then i’ is again easier to reject.

In chess alpha-beta pruning will be substantially better than just 30%.

PS. I thought about it, and your savings should be a lot more than 30%, even if your values are random. Say you have 100x100 values which are a just random. If you examined i and now examine i’ and i’ has a higher maximum, then you examine on average 50% of the values to find the maximum at which point the search for i’ is pruned (or likely even earlier). If the maximum is lower, you examine 100 values. For the k-th value I that you examine the chance that it has the lowest maximum so far is 1/k so it’s much more likely that you examine around 50 numbers, not 100.

But after a while the smallest maximum will get smaller, and you’ll find a bigger element in a row much faster than after 50 attempts. Someone with more patience can probably give you a good approximation but I’m sure you need to examine much fewer than 70% of all numbers.

gnasher729
  • 32,238
  • 36
  • 56