News for hackers. Stuff that matters.
Re:Gradient Free Optimizers: A collection of modern optimiza... by simonblanke on Sunday February 28, 2021 @09:46AM (#26293715)
I am glad you like my project. The search space is not continuous. But you can make the steps as small as you want. Like: np.arange(0, 10, 0.00001)

I am not sure i understand your second question. The entire search space is always a N-dimensional cube. So you just define a start and end point and the step size in each dimension.

Re:Gradient Free Optimizers: A collection of modern optimiza... by zmk_ on Sunday February 28, 2021 @10:14AM (#26293916)
They probably mean that you can search in n-dimensional cubes, but what they'd like is having a more general shapes of the grid, e.g., have restriction of the sort: a+b<1.
Re:Gradient Free Optimizers: A collection of modern optimiza... by simonblanke on Sunday February 28, 2021 @10:28AM (#26294013)
Okay that is interesting. You could realize that by making a restricted area in the search space by returning np.nan in the objective function for those cases. Gradient-Free-Optimizers can handle np.nan and np.inf just fine.

Maybe you could do something like:

If a+b>=1: return np.nan else: return score

Re:Gradient Free Optimizers: A collection of modern optimiza... by ialyos on Sunday February 28, 2021 @11:43AM (#26294564)
This is at a high level how one of our Google internal black box optimizers behaves. The term used is "infeasible region" but it's the same idea as using a nan.

I would caution against using nan to always mean infeasible. Instead users should catch experiments outside the feasibility region and return a special infeasible value. This will increase visibility into the behavior of the optimizer, because it leaves nan to be used for values inside the region of constraint that are still problematic (due to bugs, numerical instability, etc)

Re:Gradient Free Optimizers: A collection of modern optimiza... by unnah on Sunday February 28, 2021 @12:16PM (#26294908)
If the volume of feasible space is small, the optimizer may have considerable trouble finding the feasible region(s) in the domain. The simple solution is to use a penalty function instead, i.e. add a term like M*max(0, 1-(a+b)) to the objective, with sufficiently large M. If the optimum is at the boundary of the feasible region, you might still get a solution that is slightly infeasible, which can be worked around with more special case logic...
Re:Gradient Free Optimizers: A collection of modern optimiza... by opium_tea on Monday March 01, 2021 @02:42AM (#26300503)
Is there a subset of these constrained optimisation techniques that work when the constraint bounds are unknown before evaluation time? This applies to certain physical engineering problems where, due to the complexity of the environmental system you're modelling, you don't necessarily know what combination of input parameters lead to a non-viable solution. That is, a given solution might be numerically valid but the objective function could determine it to be non-viable due to not satisfying engineering constraints (e.g. it vibrates too fast).
Re:Gradient Free Optimizers: A collection of modern optimiza... by unnah on Tuesday March 02, 2021 @09:25AM (#26315601)
Just adding a penalty to the objective works. Another alternative is to consider a two-dimensional lexicographic objective (total constraint violation, actual objective), so that reducing constraint violations is always preferable, and the actual objective is only compared between solutions that are equally good in terms of constraint violations.
Re:Gradient Free Optimizers: A collection of modern optimiza... by craftinator on Sunday February 28, 2021 @08:16PM (#26298765)
Annnnnnnd you've added gradients to the gradient free optimizer. Every shovel is a hammer if try hard enough.
Re:Gradient Free Optimizers: A collection of modern optimiza... by abhgh on Sunday February 28, 2021 @11:23AM (#26294407)
This would be like the barrier function [1] for gradient based methods; which produces some challenges for those techniques. Do you know how this affects gradient free techniques?

[1] https://en.m.wikipedia.org/wiki/Barrier_function

Re:Gradient Free Optimizers: A collection of modern optimiza... by dwiel on Sunday February 28, 2021 @05:37PM (#26297768)
Another option in some cases is to just map the space to something else. Like in this case, x and y are unconstrained and are what the optimizer sees, a = x and b = (1 - a) - abs(y).

Not always easy to do, but can work in some cases if the optimizer cant deal with it natively.

Re:Gradient Free Optimizers: A collection of modern optimiza... by plaidfuji on Sunday February 28, 2021 @10:10AM (#26293894)
Nope, that answers the question. I was asking about cases where the space is, for example, a triangle or something non-cuboidal. Think constraints like x1 + x2 < 1 or something like that.

What I’m wondering is if your library converts the search_space to an enumerated list of candidate points somewhere in the backend, and if there’s a way for me to just construct that list and pass it directly for more complex cases.