https://youtu.be/TotZPVCFjec
When threatened by a predator i.e. your foot, ants instinctively form a single entity by becoming a highly organised superorganism. Depending on their location, individual ants react very differently yet in a coordinated fashion, if trouble is brewing. Ant colonies are incredibly complex and intensely cooperative, which is why they are often referred to as single superorganisms. To simulate an invasion on an ant colony, researchers remove the ants scouting at the colony border, and then discretely, removed labours from the centre of the nest. When lookouts were removed from the edge, the foraging ‘arms’ of the group retracted back into the nest. Yet, when ants were removed from within the centre of the colony, the whole nest of ants will flee, seeking safe haven in a new location. Scientists have determined that this behavior is similar to the nervous systems of single organisms: in that the responses to damage are both appropriate and location-dependent. Also, as an individual organism may respond to cell damage via nerve stimulus the ant colonies respond to loss of workers by a collective consciousness.
http://www.delta-optimist.com/opinion/blogs/deltabc-1.983313/blog-threatened-ants-turn-in-transformers-1.2113481