News for hackers. Stuff that matters.
Re:Open Problems in Robotics by alwahi on Wednesday August 19, 2020 @03:17AM (#24207977)
sorry for sidetracking your answer but what actually does convex mean in the context of optimization. I remember looking at a book called convex optimization.

Your statement that > Motion planning is very much non-convex,

suggests to me that you are very much talking about the same thing. I understand convexity as in a shape. Why is convex good and concave bad in terms of optimization?

I don't want you to dumb down the answer too much as I am a trained Mechanical Engineer but then my major isn't math. Hope you understand :)

Re:Open Problems in Robotics by YeGoblynQueenne on Wednesday August 19, 2020 @06:06AM (#24208820)
Convex/ non-convex optimisation refers to the shape of the error function we're trying to optimise. In convex optimisation we can assume it's, well, convex:

  .               . ε
   \             /
    \           /
     \         /
      \       /
       '._ _.'

          ^
    Global optimum
In non-convex optimisation we can't make any assumption about the shape of the error function:

      ,--.            .--.                               ε
     /    \          /    \              ,--.
    /      \        /      \            /    \        /
  .'        \      /        \          /      \      /
             \    /          \        /        \    /
              `--'            \      /          `--'
               ^               \    /            ^
               |                `--'             |
               |                 ^               |
               |                 |               |
               |                 |               |
               `--------- Local optima ----------'

"Optimisation" means that we're trying to find an optimum of a function - a maximum or a minimum. We're usually interested in the minimum of a function, particularly a function that represents the error of an approximator on a set of training data. Generally we prefer to find a _global_ minimum of the error function because then we can expect the resulting approximator to generalise better to data that was not available during training.

If the error function has a convex shape we're basically guaranteed to find its global minimum. In non-convex optimisation, we're guaranteed to get stuck to local minima.

(Ok, the above is a bit tongue in cheek, there's no _guarantee_ of getting stuck to local minima, but it's very likely).

Re:Open Problems in Robotics by dorgo on Wednesday August 19, 2020 @04:32PM (#24215997)
>Generally we prefer to find a _global_ minimum of the error function because then we can expect the resulting approximator to generalise better to data that was not available during training.

Sorry to nitpick, but is this true? We are doing optimization here and a global minimum is just a better solution than a non-global minimum. Is there a connection to generalisation here?

Re:Open Problems in Robotics by YeGoblynQueenne on Thursday August 20, 2020 @06:41AM (#24221862)
I'ts like cpgxiii says. You're right to nitpick though, because there are no certainties. We optimise on a set of data sampled from a distribution that is probably not the real distribution, so there's some amount of sampling error. Even if we find the global optimum of our sampled data, there's no reason why it's going to be close to the global optimum of our testing data.

But - there are some guarantees. Under PAC-Learning assumptions we can place an upper bound on the expected error as a function of the number of training examples and the size of the hypothesis space (the set of possible models). The maths is in a paper called Occam's Razor: https://www.sciencedirect.com/science/article/abs/pii/002001...

Unfortunately, PAC-Learning presupposes that the sampling distribution is the same as the real distribution, i.e. what I said above we can't know for sure.

In any case, I think most people would agree that a model that can reach the global minimum of training error on a large dataset has better chance to reach the global minimum of generalisation error (i.e. in the real world) than a model that gets stuck in local minima on the training data. Modulo assumptions.

Re:Open Problems in Robotics by cpgxiii on Wednesday August 19, 2020 @10:07PM (#24219163)
In an ML context, the global optima may often correspond to better performance and (hopefully) a more general solution.

In a motion planning or controls context, a local minima can often mean a configuration or path that is infeasible due to collision or wildly inefficient.

Re:Open Problems in Robotics by kleiba on Thursday August 20, 2020 @09:19AM (#24222901)
Beautiful ASCII graphs!
Re:Open Problems in Robotics by fxtentacle on Wednesday August 19, 2020 @03:23AM (#24208005)
Think of numerical optimization (e.g. gradient decent) as if you're letting a marble run down a hill. Only for some hill shapes can you be sure that the marble will reach the bottom. For other shapes, it'll get stuck on a small flat or in a small hole. Those would be called zero gradient or local minima failures.

If your hill has a convex shape, then the marble will always roll up the bottom eventually.

Re:Open Problems in Robotics by cpgxiii on Wednesday August 19, 2020 @03:39AM (#24208093)
It's generally understood that motion planning for nontrivial problems is very non-convex, and it's basically impossible to predict if a given initial condition can be optimized to the global optima. Even simple convex 3D geometry in the environment projects to very complex non-convex geometry in the configuration space of the robot (the space you're performing optimization in).
Re:Open Problems in Robotics by fxtentacle on Wednesday August 19, 2020 @04:03AM (#24208213)
While that is true, the critical question is whether it will be locally smooth once you get close enough to your goal. Long-distance planning is generally bad, even for humans. Short-distance planning tends to work well with A-star
Re:Open Problems in Robotics by cpgxiii on Wednesday August 19, 2020 @04:37AM (#24208392)
The problem is that "distance" here is not necessarily in any intuitive or useful space, and knowing if you are close to the goal may be as hard as finding the full solution. You can be quite "close" to a solution in, say, Euclidean distance over joint angles, while constraints like joint limits and collisions mean that the actual solution path will be quite long.
Re:Open Problems in Robotics by fxtentacle on Wednesday August 19, 2020 @07:10AM (#24209140)
I apologize, I hadn't thought about robot arms. All the planning stuff that I was involved with so far was either quadcopters or slowfliers or buggies, so only cases where the Euclidean norm is useful.
Re:Open Problems in Robotics by alwahi on Wednesday August 19, 2020 @04:39AM (#24208401)
this was so apt and it makes so much sense. a bulb just went on in my head. thanks so much for your simple and precise explanation.
Re:Open Problems in Robotics by kajecounterhack on Wednesday August 19, 2020 @03:43AM (#24208110)
> what actually does convex mean in the context of optimization

It means there's a deterministic solution.

Longer explanation:

When you're optimizing a function in math, the function's solutions exist in N-dimensional space. If the space of solutions is a hyperplane in this space, and you want to find a value on that plane that minimizes the function, a convex plane will allow you to find the minimum every time, deterministically -- one way is to simply follow the negative gradient of the plane. A non-convex plane may have lots of holes or other shapes (e.g "saddle points"), so if you follow the negative gradient, you'll end up thinking you're at a minimum, but turns out you're only at a _local_ minimum and there may be another, better solution out there.

So whenever you see "convex" read: a best solution exists. Whenever you see "non-convex" read: an approximation is your best hope. Motion planning is non-convex.

From https://en.wikipedia.org/wiki/Convex_function: "Any local minimum of a convex function is also a global minimum. A strictly convex function will have at most one global minimum.[4]"