Biologists have developed a computational model of flatworm regeneration to answer an important question in regeneration research – what are the signals that determine the rebuilding of specific anatomical structures? The model confirms experiments showing how numerous factors determine body pattern formation, and the critical role nerve fibers play in determining polarity in regeneration. The model could help understand regeneration in mammals, birth defects, and bioengineering of organoids.