Given an ordered input set of boolean values $S$ of length $|S|$,
I want to minimize a function $f(S)$
while maximizing the number of $True \in S$
constrained by $|True \in S|$ $\ge$ $threshold$
I understand this is NP-hard to manage with the $2^{|S|}$ possible inputs, but know some of them will be nonsensical.
Is there a way to frame this problem as a bayesian optimization problem for generating a set of booleans which minimize $f$ in such a way that I can avoid most of this parameter space?