Insects and other arthropods face a number of (non-cognitive) decisions while foraging for resources, including whether to accept a current site for exploitation, which resources to exploit, when to abandon a resource patch, etc. These problems are often exacerbated by the state of the organism e.g. the state of its energy reserves, its knowledge state, eggload or ovipositor wear. We will use 2 examples that illustrate how we study in these problems theoretically and experimentally. In the first example, a foraging parasitic wasp depletes a patch of hosts that may harbour predators. We develop a dynamic state variable model to predict when a wasp will exit such a patch and then test our predictions in controlled experiments. In the second example, we explore the role of energy limitation in a bark beetle making host (habitat) selection decisions. Using a dynamic state variable model, we develop predictions about the quality of host trees accepted by energy-starved and non-starved beetles, and present experimental results testing predictions.