This might come across as a silly question but I am curious to know if given a maximization algorithm and asked to get the dual (minimization version), it is just a matter of converting all max’s into min’s and doing other basic adjustments?
If yes, are there any problems where this would not be the case? If not, is there a good intuitive reason why this does not work?
Yes, maximization and minimization problems are basically the same. The solution for
max(f(x))is the same as-min(-f(x)).When searching game trees this relation is used for example to convert a minimax search into a negamax search. This has the advantage that instead of writing two functions, one for maximizing your score and another for minimizing the opponent’s score, you write a single maximizing function but flip the sign of the result of the evaluation function when it’s the other person’s move.