Text this: A stochastic explanation for observed local-to-global foraging states in Caenorhabditis elegans