Scientists have long employed relatively simple guidelines to help explain the physical world, from Newton's second law of motion to the laws of thermodynamics. Biomedical engineers have used dynamic modeling and machine learning to construct similarly simple rules for complex biology. They have devised a framework to accurately interpret and predict the behavior of mutually beneficial biological systems, such as human gut bacteria, plants and pollinators, or algae and corals.