The stochastic exploration of the configuration space and the exploitation of functional states underlie many biological processes. The evolutionary dynamics stands out as a remarkable example. Here, we introduce a novel formalism that mimics evolution and encodes a general exploration-exploitation dynamics for biological networks. We apply it to the brain wiring problem, focusing on the maturation of that of the nematode Caenorhabditis elegans. We demonstrate that a parsimonious maxent description of the adult brain combined with our framework is able to track down the entire developmental trajectory.