minimax with alpha beta pruning