Researchers have created a basic framework of how cancer cells adapt when their attempts to metastasize are blocked by drugs or the body’s immune system. Understanding the cells’ strategies could someday help scientists design therapies that keep them in check.