With closer inspection, researchers have recognized that what appears to be a randomly dispersed herd peacefully eating grass is in fact a complex system of individuals in a group facing differing tensions. A team of mathematicians and a biologist has now built a mathematical model that incorporates a cost function to behavior in such a herd to understand the dynamics of such systems.