私はリバーシゲーム用のAIプレーヤーを作成し、NegaMaxまたはMiniMaxで作成することにしました。疑似コード:
function negamax(node, depth, α, β, color)
if node is a terminal node or depth = 0
return color * the heuristic value of node
else
foreach child of node
val := -negamax(child, depth-1, -β, -α, -color)
{the following if statement constitutes alpha-beta pruning}
if val≥β
return val
if val≥α
α:=val
return α
しかし、ノードをこの関数に送信する必要があります。どうすればこのノードを作成できますか?状態に応じて移動する可能性のあるすべてのノードを作成してから、ノード内で移動する可能性のあるすべての人に子ノードを作成しますか?
そして、あなたがα、β値を手伝うことができれば...