Skip to content

Commit 52e91a8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent af84b6c commit 52e91a8

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

machine_learning/minimax.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import math
22
from typing import List
33

4-
def minimax(depth: int, node_index: int, is_maximizing_player: bool,
5-
scores: List[int], height: int) -> int:
4+
5+
def minimax(
6+
depth: int,
7+
node_index: int,
8+
is_maximizing_player: bool,
9+
scores: List[int],
10+
height: int,
11+
) -> int:
612
"""
713
Minimax algorithm to determine the optimal move for a player in a two-player
814
zero-sum game.

machine_learning/minimax_alpha_beta_pruning.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import math
22
from typing import List
33

4-
def minimax_with_pruning(depth: int, node_index: int, is_maximizing_player: bool,
5-
scores: List[int], height: int, alpha: int, beta: int) -> int:
4+
5+
def minimax_with_pruning(
6+
depth: int,
7+
node_index: int,
8+
is_maximizing_player: bool,
9+
scores: List[int],
10+
height: int,
11+
alpha: int,
12+
beta: int,
13+
) -> int:
614
"""
715
Minimax algorithm with alpha-beta pruning to determine the optimal
816
move with improved efficiency.

0 commit comments

Comments
 (0)