https://thenextweb.com/neural/2021/02/02/sony-patents-ai-that-adjusts-gameplay-difficulty-when-youre-struggling/
The machine learning model would then determine new behaviors for the opponent that make them more or less tricky to defeat.