0

I have a program which plays Connect Four against a human opponent using either standard Minimax algorithm or minimax with alpha-beta pruning. Both algorithms have a depth limit, after which they apply an evaluation function. As part of the project I had to create performance curves showing the number of nodes of the search tree expanded by the algorithms, per turn of the computer. The curves show a downward trend, as expected, since the number of possible states goes down as the game progresses. However, I can't explain why the number of nodes increases in the second turn of the computer, most prominently in the alpha-beta case, as can be seen in the images below:

Number of nodes expanded by Minimax (millions of nodes)

Number of nodes expanded by minimax with Alpha-Beta pruning (thousands of nodes

These curves were built based on a test game where the human played first and a depth limit of 8 plies. Does anyone know why the curves are not strictly decreasing?

RicardoC
  • 109
  • 1
  • 2
  • 9

1 Answers1

1

Minimax can see an increase in the number of nodes depending on how the game branches at different plies. Consider a silly game where, in the first 8 plies, both players are forced to "do nothing", and on the 9th ply, they get many more options. If your depth is 8 plies, you'll certainly see more nodes expanded once the minimax is allowed to reach the 9th ply.

This is also true in alpha-beta pruning. But furthermore, in alpha-beta pruning, the order of node evaluation affects the number of nodes expanded. In other words, it's a bit more random.

k_ssb
  • 6,024
  • 23
  • 47