Managing player engagement is an important problem in the video game industry, as many games generate revenue via subscription models and microtransactions. We consider a class of online video games whereby players are repeatedly matched by the game to compete against one another. Players have different skill levels which affect the outcomes of matches, and the win-loss record influence their willingness to remain engaged. The goal is to maximize the overall player engagement over time by optimizing the dynamic matchmaking strategy. We propose a general but tractable framework to solve this problem, which can be formulated as an infinite linear program. We then focus on a stylized model where there are two skill levels and players churn only when they experience a losing streak. The optimal policy always matches as many low-skilled players who are not at risk of churning to high-skilled players who are one loss away from churning. In some scenarios when there are too many low-skilled players, high-skilled players are also matched to low-skilled players that are at risk of churning.
Regarding the power of the optimal policy, we compare it to the industry status quo that matches players with the same skill level together (skill-based matchmaking). We prove the benefit of optimizing the matchmaking system grows exponentially with the number of skill levels. We then use our framework to analyze two common but controversial interventions to increase engagement: adding AI bots and a pay-to-win system. We show that optimal matchmaking may reduce the number of bots needed significantly without loss of engagement. The pay-to-win system can influence player engagement positively when the majority of players are low-skilled. Surprisingly, even non-paying low-skilled players may be better off in some scenarios. Finally, we conduct a case study with real data from an online chess platform. We show the optimal policy can improve engagement by 4-6% or reducing the percentage of bot players by 15% in comparison to skill-based matchmaking.