Caenorhabditis elegans foraging patterns follow a simple rule of thumb