1
在alpha beta算法中随机选择一个节点的孩子比按顺序选择它们有更好的机会获得一个截断?关于用alpha beta修剪的随机性和最小最大值算法
这里是伪代码,我的加法标记为***。
function alphabeta(node, depth, α, β, maximizingPlayer)
if depth = 0 or node is a terminal node
return the heuristic value of node
arrange childs of node randomly ***
if maximizingPlayer
v := -∞
for each child of node
v := max(v, alphabeta(child, depth - 1, α, β, FALSE))
α := max(α, v)
if β ≤ α
break (* β cut-off*)
return v
else
v := ∞
for each child of node
v := min(v, alphabeta(child, depth - 1, α, β, TRUE))
β := min(β, v)
if β ≤ α
break (* α cut-off*)
return v
我跑了这个小样本上的连接四个游戏,它似乎运行快一点,但是当我真正使用和不使用随机数的临界值,有更多的截断没有随机性。这有点奇怪。
是否有可能证明它更快(或更慢)?
这真的很奇怪,但随机选择实际上比通过分数排序并记住下一次搜索的顺序更快......这是一个连接四个游戏,板子尺寸为8 * 8和深度为6,所以它不是很小。 – shinzou
在像棋这样的游戏中,与先前分数相比排序移动的策略可能会更好,这种游戏在性质上不像混合游戏那样混乱。对于后一种类型的游戏,先前评估过的位置的分数趋于变化更多。 –