Polymers of hydrogen cyanide and their hydrolysis products constitute a plausible, but still poorly understood proposal for early prebiotic chemistry on Earth.HCN polymers are generated by the interplay of more than a dozen distinctive reaction mechanisms and form a highly complex mixture. Here we use a computational model based on graph grammars as a means of exploring the chemical spaces of HCN polymerization and hydrolysis. A fundamental issue is to understand the combinatorial explosion inherent in large, complex chemical systems. We demonstrate that experimental data, here obtained by mass spectrometry, and computationally predicted free energies together can be used