Dynamic difficulty adjustment (DDA) is a technique for adaptively changing a game to make it easier or harder. A common paradigm to achieve DDA is through heuristic prediction and intervention, adjusting game difficulty once undesirable player states (e.g., boredom or frustration) are observed. Without quantitative objectives, it is impossible to optimize the strength of intervention and achieve the best effectiveness. In this paper, we propose a DDA framework with a global optimization objective of maximizing a player’s engagement throughout the entire game. Using level-based games as our example, we model a player’s progression as a probabilistic graph. Dynamic difficulty reduces to optimizing transition probabilities to maximize a player’s stay time in the progression graph. We have successfully developed a system that applies this technique in multiple games by Electronic Arts, Inc., and have observed up to 9% improvement in player engagement with a neutral impact on monetization.