The advantage of foraging myopically