I'm implementing an Alpha-Beta Pruning algorithm that will be used to get the best move in an Othello game. When the algorithm have reached a leaf node (i.e there is no valid moves or it reached the maximum depth) I calculate the heuristic value of that node based on this:
How many bricks does the maximising player (the player that is running the algorithm and is gonna use the move which the algorithm returns) have on the board at this node? (+1 for each brick)
How many valid moves does the maximising player have at this node? (+10 for each move)
How many corner bricks does the maximising player have? (+100 for each corner brick)
The problem is: What should I do when it's not the maximisings players turn in the leaf node? Then it's impossible to calculate his valid moves as it's not his turn. I might have misunderstood the whole alpha-beta pruning algorithm, or atleast how the heuristic function should work. Can someone please give me a hint?
Thanks