fix crash
This commit is contained in:
parent
b83e65a52f
commit
c4358b19e3
@ -17,8 +17,8 @@ def _alphabeta(
|
||||
if board.is_game_over() or depth == 0:
|
||||
return heuristic(board, color), None
|
||||
|
||||
wantMax = board.next_player() == color
|
||||
best_move = None
|
||||
wantMax = (board.next_player() == color)
|
||||
best_move = -1
|
||||
|
||||
if wantMax:
|
||||
acc = -math.inf
|
||||
@ -92,7 +92,7 @@ def IDDFS(
|
||||
max_depth: int = 10,
|
||||
duration: float = 5.0, # Duration in seconds
|
||||
):
|
||||
best_move = None
|
||||
best_move = -1
|
||||
start_time = time.time()
|
||||
shouldStop = lambda: (time.time() - start_time) >= duration
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user