Discrete numerical optimization with black-box target function

252 Views Asked by At

Let's say I have a function $f(x_1, \dots, x_n)$ of about 50 discrete variables mapping them to a natural number. Some are integers and so are orderable, but most are categorical features and don't have any good order on them (think eye color or a boolean variable). I don't know anything about the function either, besides its output on any given input (which is expensive to calculate, by the way — on the order of seconds). It also seems that most of the inputs are independent (in the sense that if $\hat{x}_j = \arg \min_{x_j} f(x_1, \dots, x_n)$ for a fixed $(x_1, \dots, x_{j - 1}, x_{j + 1} \dots, x_n)$, then $\hat{x}_j$ would be the argmin for any other choice of the other variables), but I know that there are some that are not, so I can use this independence for heuristics but cannot fully rely on it. I also don't know if the global minimum is at $0$ or if it's greater than $0$. Numerical optimization is one of my weakest math areas, so how do I minimize the output of this function?

One thing I know is a "reasonable" initial input vector (but it doesn't mean it's closest to the global optimum), so I'm not completely in the dark. Given that, I could only come up with the obvious algorithm of starting with that vector and then iteratively varying each of the variables, updating the vector at the single position giving the best decrease of the value of $f$, stopping as soon as I find myself in some minimum (which will happen since nats are well-founded). Almost-independence means such a greedy algorithm almost-makes-sense, but could I do better?