Added comments to tictactoe.py

This commit is contained in:
uzy lol 2024-02-26 23:14:27 -08:00
parent f8c487e831
commit 9f39068cc2

View File

@ -165,7 +165,9 @@ def minimax(board):
best_action = action
return best_action
"""
Helper function lol
"""
def max_value(board):
if terminal(board):
return utility(board)
@ -174,7 +176,9 @@ def max_value(board):
v = max(v, min_value(succ(board, action)))
return v
"""
Another helper function lol
"""
def min_value(board):
if terminal(board):
return utility(board)