I developed an individually-based non-linear programming model of prey selection to examine diet selection by omnivorous canvasback ducks (Aythya valisineria) in a complex foraging environment that approximates the problem of diet selection faced in real-world conditions. The model incorporated prey depletion, feeding rates and digestion rates, and predicted the energy-maximizing diet for each of 10 individuals choosing among 4 different prey (plant tubers, insect larvae, and 2 kinds of seeds). Feeding trials yielded estimates of the rate of prey digestion and energetic value. I observed underwater foraging in a 2 x 2 x 5 m aquarium to estimate feeding rates and diving times on these 4 prey. Published optimal foraging studies of prey choice have largely supported the theory, but it has been pointed out that existing tests have been so simple that they may not provide the necessary insight into the complex choices faced by some animals under natural conditions. My diet choice trials presented ducks with such a complex situation. My results indicated that canvasbacks did not consume foods in the proportions predicted by the model but appeared to use simple ''rules of thumb'' involving size and texture to select prey. My experiments (like all others) may provide only minimal estimates of the problem-solving abilities of foragers like canvasbacks in complex, real-world situations. Nevertheless, my results suggest that the rules of prey selection that foragers may use when faced with very complex prey choices can result in quite different diets from that predicted using foraging models that predict diets well in the two-prey case.