Is there anyway to implement Alpha Beta pruning without recursion. Say, you have fixed number of levels, and you are assigning each array all the possible nodes for that particular level. My minimax algorithm works fine with this approach, but can't seem to figure out alpha beta.
Asked
Active
Viewed 309 times
1 Answers
0
So I am assuming you just have as many nested loops as your fixed number of levels? If so, you just need to 1) make sure to swap alpha and beta appropriately between levels; and 2) change the early return
(cutoff) (from recursive call) statement into a break
(from current loop) statement.

Jeff Y
- 2,437
- 1
- 11
- 18
-
Thanks. Will implement it and let you know. – someone May 08 '16 at 15:02