Strange behaviour in a function while implementing the alpha-beta pruning algorithm

后端 未结 1 1935
遇见更好的自我
遇见更好的自我 2021-01-13 18:44

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

1条回答
  •  一生所求
    2021-01-13 19:03

    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.

    0 讨论(0)
提交回复
热议问题