with minimax and alpha-beta pruning