It's not brute force search, more like stochastic sampling of random variants. It's a directed search where feedback from the environment prunes and weights the search space, and reproduction is a stochastic process biased by fitness. And fitness is defined by the survival and chances of successful mating, aka reproductive success.

Basically, your sex drive is the main search optimization :p

Edit: This is essentially how genetic algorithms in computer science work. They’re often remarkably effective at finding good solutions without needing brute force.