  We present a novel methodology for exploring local features directly in the
primordial power spectrum using a genetic algorithm (GA) pipeline coupled with
a Boltzmann solver and Cosmic Microwave Background data (CMB). After testing
the robustness of our pipeline using mock data, we apply it to the latest CMB
data, including Planck 2018 and CamSpec PR4. Our model-independent approach
provides an analytical reconstruction of the power spectra that best fits the
data, with the unsupervised machine learning algorithm exploring a functional
space built off simple ``grammar'' functions. We find significant improvements
upon the simple power-law behaviour, by $\Delta \chi^2 \lesssim -21$,
consistently with more traditional model-based approaches. These best-fits
always address both the low$\ell$ anomaly in the TT spectrum and the residual
high$\ell$ oscillations in the TT, TE and EE spectra. The proposed pipeline
provides an adaptable tool for exploring features in the primordial power
spectrum in a model-independent way, providing valuable hints to theorists for
constructing viable inflationary models that are consistent with the current
and upcoming CMB surveys.
