A machine learning algorithm for partitioning the nuclear vibrational space into subspaces is introduced. The subdivision criterion is based on Liouville's theorem, i.e. best preservation of the unitary of the reduced dimensionality Jacobian determinant within each subspace along a probe full-dimensional classical trajectory. The algorithm is based on the idea of evolutionary selection and it is implemented through a probability graph representation of the vibrational space partitioning. We interface this customized version of genetic algorithms with our divide-and-conquer semiclassical initial value representation method for calculation of molecular power spectra. First, we benchmark the algorithm by calculating the vibrational power spectra of two model systems, for which the exact subspace division is known. Then, we apply it to the calculation of the power spectrum of methane. Exact calculations and full-dimensional semiclassical spectra of this small molecule are available and provide an additional test of the accuracy of the new approach. Finally, the algorithm is applied to the divide-and-conquer semiclassical calculation of the power spectrum of 12-atom trans-N-Methylacetamide.