Added comments to tictactoe.py
This commit is contained in:
parent
f8c487e831
commit
9f39068cc2
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user