I am coding a board game. I have generated a game tree using alpha-beta pruning and have 2 options:

  1. Use iterative deepening to optimize the alpha-beta so that it keeps generating one more ply until time is over.
  2. By trial and error, I know the maximum depth reachable for every board configuration in the time limit without previously inspecting lower plies.

Which approach is better and will make the search reach a deeper depth? I know, for example, that at the beginning I can generate a tree of depth X consuming all the time available... Can iterative deepening add more depth?

Let me know if I can be more clear...

有帮助吗?

解决方案

If your branching factor and evaluation function's required time stays about the same between different rounds you might be able to use option 2. But it sounds like it might be very difficult.

Option 1 has the ability to dramatically increase alpha-beta's performance if you don't have perfect move ordering already. You save the best move at every node, found during the previous search up to d-1, and then tell alpha-beta to search that first. It's called a transposition table, and if it is possible to implement this in your case option 1 will dominate option 2.

The first time I heard of a transposition table I didn't think it could make much of a difference, but it increased my maximum search depth by 50%.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top