Artificial Intelligence for Chess
COLL 110
minimax §
def minimax() -> int:
if len(b) == 0:
return 0
l = -minimax(b[0])
r = -minimax(b[-1])
return max(l + b[0], r + b[-1])
def minimax() -> int:
if len(b) == 0:
return 0
l = -minimax(b[0])
r = -minimax(b[-1])
return max(l + b[0], r + b[-1])