Parallels between the foraging strategies of ants and plants