Optimizing a blackbox function with binary states

I have a non-linear black box function, which inputs a vector(size=250) and outputs a scalar value; f(x) = value.

The x variable is a vector of size 250 and has binary elements, e.g.: x = [0, 1, 1, 1, 0, 0, ...]

The result is just a scalar value and I am trying to maximize this value via a binary differential evolution algorithm. Additionally, the calculation time of f(x) is about 10 seconds.

Since there are $$2^{250}$$ different x vectors, it is really hard to find the optimizer(x) of this function. However, a result that is not the optimum but not close to it would be also still an acceptable answer.

I was thinking, if I am using the right approach here in the binary differential evolution algorithm, I would appreciate it if you would give me your comments or feedback!

• Find some meaningful starting population (size=100) for the binary evo.
• Run f(x) with this population
• Create a surrogate model (probably a simple neural network that maps the vector to the result values)
• Run the surrogate model 10000 times with a random selection of x
• Select the best-performing 100 xs from the 10000 sample
• Initialize the differential evolution with the best-performing 100 surrogate model x

Suppose you have the 250 length vector $$V$$, use the binary step activation function (you can use sigmoid), and use $$f(x)$$ as your loss function (if you want to maximize the output use $$\frac{1}{f(x)}$$). And then learn the $$V$$ by backpropagation.