When plants such as sunflowers are planted together in dense patches, they will grow in such a way to give maximum sunlight to their neighbors. A team including Tel Aviv researchers discovered that sunflowers can distinguish between another plant and an inanimate object such as a building.
https://journals.aps.org/prx/abstract/10.1103/PhysRevX.14.031027