γ-ray transitions from excited states of 16N and 16O isomers that appear in the γ spectrum of the 6 C N O 16 10 7 16 9 8 16 8 beta decay chain are investigated. The theoretical approach used in this research starts with a mean-field potential consisting of a phenomenological Woods–Saxon potential including spin-orbit and Coulomb terms (for protons) in order to obtain single-particle energies and wave functions for nucleons in a nucleus. A schematic residual surface delta interaction is then employed on the top of the mean field and is treated within the proton–neutron Tamm–Dancoff approximation (pnTDA) and the proton– neutron random phase approximation. The goal is to use an optimized surface delta interaction interaction, as a residual interaction, to improve the results. We have used artificial intelligence algorithms to establish a good agreement between theoretical and experimental energy spectra. The final results of the ‘optimized’ calculations are reasonable via this approach.