In alpha, beta pruning algorithm, I have a class in which a fucntion def getAction(self,gamestate) id defined. I made 2 more function in def getAction
Like:
class BAC:
def you(self,gamestate):
def me(gamestate,depth,alpha, beta):
------
return v
def both(gamestate,depth,alpha, beta):
-------------------
return v
return me(gamestate,0,alpha, beta)-
I need to put alpha, beta in functions me and both. But where do I define alpha and beta values.If i define alpha and beta in def me and def both then error occurs as there global name alpha is not present.
How do I made alpha nd beta local variables or How acan I make it possible to work correctly.