Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def heuristique(self, b, etat):
- return 1
- def maxValue(self, b, etat, alpha, beta, profondeur=0):
- profondeur+=1
- #eval heuristique
- if profondeur > 4:
- return heuristique(self, b, etat)
- for col in getPossibleColumns():
- alpha = max(alpha, minValue(self, b, alpha, beta))
- if alpha >= beta:
- return beta
- return alpha
- def minValue(self, b, etat, alpha, beta, profondeur=0):
- profondeur += 1
- #eval heuristique
- if profondeur > 4:
- return heuristique(self, b, etat)
- for col in getPossibleColumns():
- beta = min(beta, maxValue(self, b, alpha, beta))
- if alpha >= beta:
- return beta
- return alpha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement