Skip to content

Commit 8c60b5d

Browse files
committed
Fixed the order of alpha and beta defualt values (as found by Mervyn).
1 parent 3efcbd1 commit 8c60b5d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pacai/agents/minimax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_action(self, state: pacai.core.gamestate.GameState) -> pacai.core.action
7373
self._stats_states_evaluated.append(0)
7474
self._stats_nodes_visited.append(0)
7575

76-
actions, score = self.minimax_step(state, self.ply_count + 1, math.inf, -math.inf)
76+
actions, score = self.minimax_step(state, self.ply_count + 1, -math.inf, math.inf)
7777
action = self.rng.choice(actions)
7878

7979
logging.debug("Turn: %d, Game State Score: %d, Minimax Score: %d, Chosen Action: %s, States Evaluated: %d, Nodes Visited: %d.",

pacai/student/multiagents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MyMinimaxLikeAgent(pacai.agents.minimax.MinimaxLikeAgent):
4141
(you can ignore alpha and beta).
4242
4343
To implement minimax with alpha-beta pruning,
44-
minimax_step_max() and minimax_step_min() with alpha an beta are required.
44+
minimax_step_max() and minimax_step_min() with alpha and beta are required.
4545
4646
To implement expectimax, minimax_step_max() and minimax_step_expected_min() are required.
4747

0 commit comments

Comments
 (0)