Artificial neural networks are capable of fitting highly non-linear and complex systems. Such complicated systems can be found everywhere in nature, including the non-linear interaction between optical modes in laser resonators. In this work, we demonstrate artificial neural networks trained to model these complex interactions in the cavity of a Quantum Cascade Random Laser. The neural networks are able to predict modulation schemes for desired laser spectra in real-time. This radically novel approach makes it possible to adapt spectra to individual requirements without the need for lengthy and costly simulation and fabrication iterations.