Optimal foraging theory explains adaptation via natural selection through quantitative models. Behaviors that are most likely to be favored by natural selection can be predicted by maximizing functions representing Darwinian fitness. Optimization has natural applications in engineering, and so this approach can also be used to design behaviors of engineered agents. In this thesis, we generalize ideas from optimal foraging theory to allow for its easy application to engineering design. By extending standard models and suggesting new value functions of interest, we enhance the analytical efficacy of optimal foraging theory and suggest possible optimality reasons for previously unexplained behaviors observed in nature. Finally, we develop a procedure for maximizing a class of optimization functions relevant to our general model. As designing strategies to maximize returns in a stochastic environment is effectively an optimal portfolio problem, our methods are influenced by results from modern and post-modern portfolio theory. We suggest that optimal foraging theory could benefit by injecting updated concepts from these economic areas.