Skip to content

Commit d9ef05a

Browse files
Prateek KhandelwalPrateek Khandelwal
Prateek Khandelwal
authored and
Prateek Khandelwal
committed
Correcting return types
1 parent 9e9ec20 commit d9ef05a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

machine_learning/minimax.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def minimax(
55
depth: int, node_index: int, is_maximizing_player: bool, scores: list, height: int
6-
) -> int:
6+
) -> float:
77
"""
88
Minimax algorithm to determine the optimal move for a player in a two-player
99
zero-sum game.

machine_learning/minimax_alpha_beta_pruning.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ def minimax_with_pruning(
77
is_maximizing_player: bool,
88
scores: list,
99
height: int,
10-
alpha: int,
11-
beta: int,
12-
) -> int:
10+
alpha: float,
11+
beta: float,
12+
) -> float:
1313
"""
1414
Minimax algorithm with alpha-beta pruning to determine the optimal
1515
move with improved efficiency.

0 commit comments

Comments
 (0)