I recently encountered hundreds of caterpillars while walking in the mountains. This type of behaviour is common for the caterpillars during their autumn migration before they create a new nest to stay the winter in.

Amazing animals and an impressive co ordination. By removing one caterpillar the others instantly adapted and reformed the line, and the removed unit was then united in the back of the line. Amazing!