Any space search algorithm has the possibility of getting stuck at local optima. Gradient descent (and all other gradient/newton/etc methods, regardless of order) would need to be used alongside repeated random initial sampling or maybe large perturbations upon reaching the local optimum if you want it to have any chance of reaching a somewhat global optimum. You could instead try taking a massive amount of samples and interpolate to create some splines which you could use to more easily find a global optimum. There’s a lot of problems with that, though, mainly having to do with the massive dimensionality of the space, the necessity of using splines over high-degree polynomials, and the still-significant search time of an optimum over high dimensional splines.
Genetic algorithms (and more generally, evolutionary algorithms) have all sorts of nifty tricks to get around local optima. Instead of being constrained to the gradient of the surface, EA’s can sample in multiple directions, with varying step sizes. If you’re particularly concerned about local optima, maybe you could try making a few offspring with small mutations for a more standard gradient descent approach, while also making a few offspring with larger mutations to see if maybe things are better on the other side of the hill.
Crossover mutations between bifurcated populations can also be helpful. If each of two populations are converging to their local optima, perhaps combining their genomes to find some middle ground will find something even better.
Combine the above with a meta-strategy for evolving multiple populations scattered throughout the space, then crossing their best offspring (after a number of generations) with one another to create a new set of distinct populations, and you can end up with a really robust algorithm which maps out many optima.
I really just see GAs as a set of tools for approximating gradient descent and avoiding local optima. You can pick and choose which to use depending on your knowledge of the space, but as @jrowe47 mentioned, you can implement it naively and it’ll get you your global optimum, eventually.
Er, I wish I could contribute to the more on-topic discussion of energy source ratios, but I’ve been content with the standard ~60/20/20 carb-heavy profile. (I haven’t done all that much research, but) Given that people seem to be surviving on carb-heavy, carb-light, and carb-free (keto) diets, with weight loss seeming to correspond to caloric restriction and regular exercise more than the energy source ratios, I’m inclined to say it doesn’t matter much. The biggest draw to keto for me is hearing about eating chocolate, fat, and peanut butter as components of a balanced diet, but I like my oats.