I\'ve implemented a minimax algorithm with alpha-beta pruning. In order to get the best move, I call the alpha-beta algorithm with the rootAlphaBeta
function. H
Your rootAlphaBeta
doesn't update the alpha
value. It calls all its child nodes with the full range of (-inf, inf), when it could have narrowed down the range for all child nodes except the first. This will prevent pruning of some branches which will have no effect on the final score, and increase the node count.