Consequences of adaptive foraging in diverse communities