This project develops an integrative approach to study the impact of instantaneous decisions in complex environments. We aim at linking individual instantaneous decisions (which are relatively easy to study and link to their neurological, physiological and genetic substrates) to large-scale outcomes (such as the distribution of individuals in a given environment, which determine average fitness). As a proof of concept for such a theory we are studying foraging behavior in Caenorhabditis elegans. This small nematode is an ideal model, because it is simple yet displays rich behaviors (including chemotaxis, associative learning and food choice), it is already extremely well studied at the genetic and neural levels, and it is amenable for high-throughput behavioral experiments.