Command Palette
Search for a command to run...
miHoYo open-sources an Agent Capable of Playing Games, Allowing Gamers to Plan While Operating, Challenging the long-term Main Storyline Missions of 'Honkai: Star Rail'.

In a side quest in Honkai: Star Rail, players need to help the museum recover missing exhibits. From following Pela to investigate and questioning informants, to finding exhibit fragments and returning to the museum, the quest spans multiple scenes. For a game agent, the difficulty lies not only in recognizing visuals and controlling the character, but also in balancing real-time reactions with long-term task planning.
The game does not pause while the model thinks. As the character approaches an intersection, the agent must release the forward key and adjust direction in time, or it may deviate from the route. After entering a new scene, it also needs to remember clues obtained earlier, even if the relevant dialogue has long left the screen. These two requirements can sometimes constrain each other: when moving along a determined route, re-reasoning at every step may cause the agent to miss the timing for action; but when the task enters a new stage, the current screen alone may not be enough to know what to do next.
To address this problem, miHoYo's Honkai AI R&D team proposed a general game agent framework, Gamer, which integrates visual perception, keyboard and mouse operation, task reasoning, and long-term memory into a single model: act directly when the goal is clear, reason only when the plan needs adjustment, and retain information needed for subsequent tasks through memory summaries.
This design attempts to let the agent balance the speed of real-time operation with the continuity of long-horizon tasks. To achieve this, the researchers built training data covering different task levels, adopted a staged training method, and tested Gamer's actual capabilities through cross-game transfer, complex task execution, and real-time interaction experiments.
The related research, titled "Gamer: A Generalist Vision-Language-Action Foundation Model for Long-Horizon Real-Time Game Agent," has been published on the preprint platform arXiv.
Image View paper:
https://hyper.ai/cn/papers/2611.18397
From game recordings to training samples: aligning operations, tasks, and decision processes To equip the model with these capabilities, the first problem to solve is training data. Game recordings capture character movement and interaction processes, while keyboard and mouse logs provide specific operations, but these records do not directly explain why the player acted. For example, was a turn made to avoid an obstacle or to find a task target? To move the model from imitating operations to autonomously executing tasks, researchers need to reconstruct the goals and task progress behind actions from continuous behavior.
The team first aligned game frames with keyboard and mouse operations over time, organizing about 2,400 hours of interaction trajectories from data sources such as VPT, D2E, and OpenP2P as well as Honkai: Star Rail for continued pretraining. At the same time, they introduced general multimodal data such as image-text understanding and visual reasoning. Calculated by training tokens, the sampling ratios of the two data types were 85% and 15%, respectively.
These data can help the model learn how to operate the game, but to understand the goals served by actions, it also needs to observe behavior over longer time spans. To this end, the team selected about 1,000 hours from roughly 11,000 hours of Honkai: Star Rail recordings and annotated them at two time scales.
In short clips of about 10 seconds, GPT-5.6-Luna identifies decision moments such as route selection, target switching, and post-failure adjustment based on frames and keyboard/mouse records; for longer continuous recordings, it segments the start and end positions of tasks and summarizes completed items. The team thereby obtained about 1.2 million decision-reasoning annotations, 63,000 task segments, and 223,000 memory summaries. Note that these reasoning annotations are the model's explanations of observable behavior and do not represent the player's actual thoughts at the time.
The researchers also organized continuous operations into instructions at different levels. The same recording can correspond to a local operation such as "approach a certain character," a subgoal such as "bypass obstacles and talk to the character," or a complete task such as "pass through multiple areas and complete interactions along the way." Ultimately, the team constructed about 261,000 operation samples, 211,000 subgoal samples, and 234,000 task-level samples, and first split the training and evaluation sets by complete recordings or tasks before cutting them into clips, to reduce the risk of data leakage.
Image How the same recording forms three levels of instructions
Gamer: three-stage training teaches the model to operate, reason, and remember With game frames, operation records, and task instructions at different levels, the next question is: how can the model use this information in real-time interaction?
Image Gamer's interaction method
The main version of Gamer in Honkai: Star Rail is based on Qwen3-VL-8B. The model observes the screen every 200 milliseconds and, combining task instructions, key descriptions, and recent operations, outputs mouse displacement and six groups of key states executed in sequence. In this way, while observing five times per second, the model can still perform finer operations between observations.
Training is divided into three stages: continued pretraining, supervised fine-tuning, and online reinforcement learning.
First, the model needs to master basic operations. Considering that different games may use different keys, the researchers randomly remap rebindable keys and synchronously modify key descriptions and operation records, so the model learns the correspondence between keys and functions.
Another issue is repeated actions. More than 85% of action steps in game trajectories repeat the previous step, such as continuously holding the forward key. The team retained these records to help the model learn action duration, while reducing the training weight of consecutive repeated actions, so that key changes such as starting, stopping, and turning receive more sufficient learning.
In the supervised fine-tuning stage, the researchers further introduced task instructions, reasoning, and memory summaries, so that the model no longer merely predicts keys but decides how to act based on task progress.
For example, when moving along a predetermined route, Gamer can directly output actions; when encountering obstacles or needing to switch goals, it then generates reasoning and adjusts its actions. The paper calls this approach of performing explicit reasoning only at some steps "sparse reasoning." When a task enters a new stage, or early interactions are about to exceed the context window, the model also generates memory summaries, recording completed goals, failed attempts, and remaining plans, so that earlier information can continue to guide subsequent actions.
Image When to reason, what information enters memory
However, imitating player actions does not mean being able to complete tasks independently. In actual gameplay, a single steering deviation can put the character into a state that never appeared in the demonstrations. Therefore, in the final stage, the team introduced online reinforcement learning, letting the model repeatedly attempt from the same task conditions and collecting approximately 14,600 autonomous interaction trajectories in total.
The researchers propose a time-aware group relative policy optimization method (TA-GRPO), which divides long trajectories into segments connected by memory summaries and compares the results achieved by different attempts at corresponding stages. The game backend verifies whether goals are reached and interactions are completed, and provides training feedback; when actually operating, the agent still makes judgments based on screen images and task context.
In addition to learning correct operations, the model must also act promptly. To reduce inference latency, the team developed the Streaming-vLLM engine, which reuses already processed frames and text and sends the first set of keystrokes to the game client immediately after they are generated, without waiting for the entire set of actions to be generated. Training and evaluation share this system to test the model's actual performance while the game is continuously running.
Cross-game and new-task testing: Gamer's capability improvements and generalization limits The researchers evaluate Gamer from three aspects: cross-game transfer, complex task execution, and real-time interaction, examining respectively whether the model can adapt to unfamiliar environments, complete new tasks, and how operation speed affects performance.
First is cross-game transfer. The GameScaling experiment cited in the paper compared 120 training configurations, varying model scale, amount of game data, and the mix of training games. The results show that with only 50 hours of game data for training, the model's action prediction error decreased on both seen and unseen games. But after continuing to add data, the gains depended on game type: adding Minecraft recordings mainly improved prediction performance on that game, while introducing more games helped cover other interaction modes. For unfamiliar games with large differences in visuals and mechanics, the model's progress often quickly plateaued.
More accurate action prediction does not necessarily mean better actual game performance. The team therefore compared model scores under two conditions—paused game and real-time running—on four public benchmarks: MCU, ViZDoom, OmniGameArena, and GameWorld.
Under real-time conditions, the continued-pretrained 8B dense model and 35B-A3B mixture-of-experts model achieved average scores of 29.5 and 31.5, respectively, higher than the highest average score of 17.6 among the evaluated general multimodal models. However, on GameWorld, which differs greatly from the training environment, the two Gamer versions scored 34.0 and 30.2, respectively, both lower than GPT-5.6-Sol's 44.3. This indicates that game interaction training can improve overall performance, but the advantage does not hold in all environments.
Next, the researchers kept the game environment unchanged and examined the model's ability to execute new tasks. In Honkai: Star Rail, they selected two side quests unseen during training and split them into 30 and 55 verifiable steps, respectively, covering pathfinding, dialogue, combat, interface operations, and puzzles, with each step evaluated three times. In addition, they used 40 task instances across seven types of minigames to examine rule understanding, spatial reasoning, and operation timing.
Image Task sequence of the museum exhibit side quest
Taking the museum task mentioned at the beginning as an example, the model that had only learned game operations achieved a step execution success rate of 34.4%. After adding instruction, reasoning, and memory supervision, the success rate increased to 72.2%, the most significant improvement among all training stages. On this basis, using the results generated by the model's own interactions for online reinforcement learning further raised the success rate to 80.0%.
This result shows that merely learning how players operate is not enough to support more complex task execution. Enabling the model to understand the goal of the current action, retain prior task information, and continue adjusting based on actual operation results can significantly improve its ability to complete tasks step by step.
In the minigame tests, after online reinforcement learning, the success rate of the compass task increased from 50.0% to 95.8%, while the maze task dropped from 52.4% to 23.8%. Even within the same game environment, different tasks place different demands on rule understanding, path planning, and operation timing, so training gains are uneven.
In addition to what the model learned, the researchers also examined another factor: how quickly it must interact with the game.
In eight navigation tasks, the researchers set up a normal real-time operation group and a low-speed operation group, with the latter's sampling rate reduced to 0.6 frames per second. The results show that during the first 50 training rounds, the real-time group generally obtained higher rewards earlier, while the rewards of some low-speed groups declined later.
This difference is related to the continuous changes in the game environment. When the model takes too long to complete a turn, the character may have already passed the intersection; by the time new frames are sent back to the model, the originally expected operating conditions no longer exist. Thus, action delay not only affects execution results but also changes the subsequently observed environment and the training feedback the model can obtain from interactions.
Image Reward changes across the eight navigation tasks
To further evaluate the effect of inference acceleration, the researchers also conducted independent tests. On the same Qwen3-VL-8B model, compared with the control method DSCache, Streaming-vLLM reduced single-query latency from 0.53 seconds to 0.08 seconds, while showing no score drop on either of the two video understanding benchmarks. In another game operation test using an H200 GPU and the 35B-A3B model, multiple inference optimizations together shortened the end-to-end latency of an action request from about 1.31 seconds to 65 milliseconds.
These experiments show from different perspectives that the capabilities of a real-time game agent cannot be measured solely by the model's judgment accuracy on static frames. Whether the model can output actions in a timely manner, whether it can adapt to a new environment after acting, and whether previously accumulated information can continue to guide subsequent actions all affect final performance.
Final thoughts Return to the missing museum exhibit from the beginning. Gamer achieved an 80.0% success rate in step-by-step evaluation, but this does not mean it can independently complete the entire side quest with the same probability. In continuous tasks, a single steering deviation or a missed clue may affect subsequent actions.
Gamer integrates real-time operation, task reasoning, and long-term memory into the same framework, improving the agent's ability to execute tasks step by step, but long-term continuous interaction still faces challenges. When the character takes a wrong path, misses a clue, or the original plan fails, can the agent promptly identify the problem, adjust its actions, and ultimately complete the task? This remains a key problem that must be solved in moving from single-step operations to long-term autonomous execution.


