Hi there im trying to create a Minimax player in AI for dots and boxes Following this algorithm
Max-Value(state) returns a utility value
if Terminal-Test(state) then return Utility(state)
v ← MinimalGameValue
for s in Successors(state) do
v ← Max(v, MinValue(s))
return v
Min-Value(state) returns a utility value
if Terminal-Test(state) then return Utility(state)
v ← MaximalGameValue
for s in Successors(state) do
v ← Min(v, Max-Value(s))
return v
But i just seem to make any headway on,Any Help would be great