Skip to content

Commit f04ef73

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

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

machine_learning/minimax.py

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

4-
def minimax(depth: int, node_index: int, is_maximizing_player: bool,
5-
scores: list, height: int) -> int:
4+
5+
def minimax(
6+
depth: int, node_index: int, is_maximizing_player: bool, scores: list, height: int
7+
) -> int:
68
"""
79
Minimax algorithm to determine the optimal move for a player in a two-player
810
zero-sum game.

machine_learning/minimax_alpha_beta_pruning.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
import math
22

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

0 commit comments

Comments
 (0)