I spend a lot of time debugging optimization code, and I find that it's a lot harder than debugging "normal" code. I think it's hard because optimality requires universal quantification: for the code to be correct, it needs to find the BEST instance out of ALL of them.
Conversation
Replying to
Is this for instances where you’re actually looking for a global optimum, or “just” trying to find a local one? Because there are ways to check for local optima.
1
Replying to
Global optimum! Sometimes the problem is convex and the two are the same, but not always. By "ways" do mean things like taking a step in some direction and seeing if the solution worsens?

