> For the complete documentation index, see [llms.txt](https://fuxi-up-research.gitbook.io/open-project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fuxi-up-research.gitbook.io/open-project/research_topics/churn_prediction.md).

# 游戏玩家流失预测

## 课题背景

随着游戏市场的逐渐饱和，竞争也愈加激烈。许多研究声称吸引一个新玩家的成本远大于保留一个老玩家的成本。因此，使老玩家留存以提升游戏营收是游戏公司非常关心的问题。流失预测作为常用的提升用户留存率的手段，在电信、金融、在线游戏、电子商务等领域受到广泛研究。如图1所示，游戏用户生命周期是一个从探索成长到成熟稳定，并随着时间逐渐衰亡的过程。

在游戏领域中，大部分研究把流失预测建模为二分类问题，将未来一段时间未上线视为流失，反之视为留存，基于领域知识和数据分析，提取出有用的特征建模为用户的画像并进行分类预测。另一部分把流失预测建模为预测玩家流失的时间，即多久之后会流失，通常采用传统的回归方法和能处理删失数据的生存分析进行建模。

如何精确地对将流失的玩家进行预测，并执行有效的干预手段，提升玩家的留存，进而提升游戏的营收，对游戏的成功运营有着重要意义。

![图1：游戏用户生命周期变化图](https://noterminus.gitee.io/image_bed/images/tu-pian%20%288%29.png)

## 问题定义

定义一：将流失预测建模为二分类问题，未来一段时间未登陆标记为流失（如7天、14天），反之则为留存，基于领域知识和数据分析构建用户特征，进而建立流失模型，进行二分类流失预测。

定义二：将流失预测建模为预测玩家的流失时间，找到玩家最后一次登陆与当前登陆时间的距离天数作为标记，建模成回归问题。

## 问题挑战

游戏场景中的流失预测问题中的挑战主要包括以下几点：

* 如何更有效地定义流失，并与有效的干预手段结合，产生实际商业价值；
* 如何提升预测精度，尤其是对未来长时间流失的预测问题；
* 存在不可忽略且难以观测到的外部因素导致的流失，如何降低其影响。

## 评价指标

游戏场景中的流失预测主要通过两个指标进行评估：

* 二分类流失预测准确率： Accuracy、Precision、Recall、F1、AUC；
* 流失距离天数预测准确率：RMSE。

## 数据集描述

游戏数据集主要分为三个部分：

* 用户画像数据

| 字段           | 类型     | 描述     |
| ------------ | ------ | ------ |
| role\_id     | string | 玩家id   |
| level        | int    | 玩家等级   |
| role\_class  | int    | 职业     |
| online\_time | int    | 在线时长   |
| total\_exp   | int    | 总经验    |
| total\_gold  | int    | 游戏代币数量 |
| ……           |        |        |

* 用户历史动作序列

| 字段             | 类型     | 描述                 |
| -------------- | ------ | ------------------ |
| role\_id       | string | 玩家id               |
| action\_id     | int    | 动作id               |
| objective\_ids | string | 动作对象id，多个对象id以逗号隔开 |
| time\_stamp    | int    | 动作发生的时间戳           |

* 用户关系网络（以游戏组队和师徒为例）

| 字段          | 类型     | 描述     |
| ----------- | ------ | ------ |
| role\_id    | string | 玩家id   |
| team\_id    | int    | 游戏队伍id |
| teacher\_id | int    | 师傅id   |
| student\_id | int    | 徒弟id   |
| ……          |        |        |

## 联系我们

有任何问题，请联系 <xiongyu1@corp.netease.com>, <zhaoshiwei@corp.netease.com>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fuxi-up-research.gitbook.io/open-project/research_topics/churn_prediction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
