  In the realm of biological flow networks, the ability to dynamically adjust
to varying demands is paramount. Drawing inspiration from the remarkable
adaptability of Physarum polycephalum, we present a novel physical mechanism
tailored to optimize flow networks. Central to our approach is the principle
that each network component -- specifically, the tubes -- harnesses locally
available information to collectively minimize a global cost function. Our
findings underscore the scalability of this mechanism, making it feasible for
larger, more complex networks. We construct a comprehensive phase diagram,
pinpointing the specific network parameters under which successful adaptation,
or tuning, is realized. There exists a phase boundary in the phase diagram,
revealing a distinct satisfiability-unsatisfiability (SAT-UNSAT) phase
transition delineating successful and unsuccessful adaptation.
