Assessing the capability of random forest to predict the evolution of enhanced gamma-ray states of active galactic nuclei