Project JoyTwin mascot icon

Microsoft Research Project

Project JoyTwin

Acting While Thinking, Self-Evolving Through Play in a living 3D action RPG.

In a real-time 3D world, an agent cannot pause the game while it thinks. JoyTwin pairs a continuous action executive with an asynchronous quest planner in Veloren—dodging, striking, and navigating without standing still, while self-evolving with experience across episodes.

← Back to Overview
76.0%19 / 25 Tasks Solved · Self-Evolving (3 Episodes)
56.0%14 / 25 Tasks Solved · Zero-Shot (1st Episode)
9 / 14Open-World RPG Missions Solved (vs. ≤ 1 / 14 Baselines)
89.0%Prompt-Cache Hit Rate via Incremental Memory

01 / Overview

Acting While Thinking in a Living 3D Action RPG

Deep quest reasoning takes seconds, yet a living 3D world updates every single frame. Acting While Thinking lets JoyTwin deliberate over multi-stage RPG quests without freezing in front of the next attack.

In Veloren, an open-source 3D action RPG, an adventurer must weave together real-time melee combat, town dialogue, merchant bartering, multi-station crafting, skill-tree loadouts, and 2D map navigation. A synchronous “Think, Then Act” agent freezes between reasoning turns and takes fatal hits while waiting for a plan; a purely reactive policy survives brief skirmishes but loses track of long-horizon quests. Operating strictly from player-visible screen frames and mouse-and-keyboard controls, JoyTwin decouples high-level quest planning from continuous real-time execution—and self-evolves through play across episodes.

The World Does Not Wait

Think, Then Act cartoon diagram: the agent stops while planning, takes hits from the enemy, and reaches HP 0.
Think, Then Act · Synchronous Freeze

The Agent Stops. The Enemy Does Not.

While the planner reasons over the next move, a blocked controller stands still—taking fatal hits (HP 0) before the plan returns.

Think, Then Act · Synchronous Baseline (4× Replay)

Think, Then Act · DeepSeek Harness Defeated

On the outdoor grassy hillside, DeepSeek Harness pauses between synchronous reasoning turns while the Green Legoom closes in—taking 16 melee hits while frozen and falling in combat (You Died).

Act While Thinking cartoon diagram: the planner reasons ahead while the reactive controller dodges and strikes in real time to win.
Act While Thinking · Asynchronous Control

Keep Moving. Keep Thinking. Adapt.

JoyTwin’s reactive controller dodges and strikes in real time while the deliberative planner reasons ahead in parallel—surviving and winning the fight.

Act While Thinking · JoyTwin Live Combat (4× Replay)

Act While Thinking · JoyTwin Victory in 52.4s

Facing the same enemy type on the outdoor hillside, JoyTwin’s continuous action loop tracks, spaces, and strikes in real time while the planner supervises quest progress.

02 / System Architecture

How JoyTwin Acts While Thinking & Self-Evolves

JoyTwin coordinates three loops around the game world: grounded visual perception (See the Game), concurrent planning and execution without a turn barrier (Think & Play), and cross-episode refinement (Self-Evolving with Experience).

JoyTwin architecture: See the game; Think & play with independent Plan and Act loops running together; Experience: learn from play and carry lessons forward.
Figure 1: JoyTwin system architecture.See the Game: player-visible observations and HUD cues feed incremental working memory. Think & Play: independent Plan (continuous planning) and Act (continuous action) loops run together via guidance and real-time feedback. Experience: verified lessons and composed routines carry forward to subsequent episodes.
Loop 01

See the Game

Player-visible perception and incremental working memory.

JoyTwin perceives the 3D world and RPG interfaces strictly from screen frames and HUD cues, issuing standard mouse-and-keyboard inputs with zero privileged access to internal engine state.

Loop 02

Think & Play (Core Mechanism)

Independent Plan and Act loops running together.

Continuous planning (Plan) provides high-level stage guidance while continuous action (Act) keeps moving, dodging, and fighting in real time—exchanging immediate feedback without a turn barrier.

Loop 03

Self-Evolving with Experience (Learn from Play)

Composing runtime routines and carrying lessons forward.

During play, JoyTwin binds and composes multi-step action routines on the fly; across episodes, it distills verified gameplay outcomes into persistent playbook rules and reusable skills—recovering failed quests and executing up to 2× faster.

03 / Experimental Results

Acting While Thinking & Self-Evolving Across 25 Veloren RPG Tasks

We evaluate JoyTwin against five visual-agent baselines—Tool-Calling Agent, DeepSeek Harness, SmolAgents, GamingAgent, and GameScaling—on 25 Veloren RPG Tasks: 11 Basic Action & Survival tasks and 14 Open-World RPG Missions, with each method evaluated over a 3-episode horizon per task. Because synchronous baselines freeze during multi-second reasoning turns and struggle to maintain long-horizon RPG state, three of the five external baselines (Tool-Calling Agent, GamingAgent, GameScaling) solve 0 of 14 (0.0%) RPG missions, and the other two (DeepSeek Harness and SmolAgents) solve only 1 of 14 (7.1%), capping the best overall baseline at 7 of 25 (28.0%).

By Acting While Thinking, JoyTwin solves 14 of 25 (56.0%) tasks zero-shot in the 1st episode (8/11 Basic, 6/14 RPG)—already 2.0× the best baseline. By Self-Evolving with Experience across just 3 episodes, JoyTwin reaches 19 of 25 (76.0%) (10/11 Basic, 9/14 RPG): a +20.0 percentage-point gain (+5 tasks solved) and 2.7× the best overall baseline.

Gameplay: From First Attempt to Experience

Times are in-game episode durations. Videos marked 4× Replay are accelerated observation replays, not continuous live recordings.

Bounty Contract & Ogre Hunt

Bounty Contract & Ogre Hunt

With a novice sword (~0.6–1.5 HP/hit), a 320 HP Ogre is objectively unwinnable in a 1-on-1 duel (requiring 200+ hits). After dying in a head-on fight on its first attempt, JoyTwin learns to tag the Ogre for quest credit and kite it into the high-level town guard to claim the 1,000-coin bounty.

Zero-Shot (1st Attempt) · 4× Replay

Zero-Shot (1st Attempt) · Why 1-on-1 Combat Fails (71 Hits = Only 14% HP)

With novice gear, fighting the 320 HP Ogre head-on chips only 44.9 HP (14%) across 71 hits before the player is overwhelmed and killed (1,016.9s).

With Experience · 4× Replay

With Experience · Tag, Kite to Town Guard & Claim 1,000 Coins (553.6s)

Recognizing the stat gap, JoyTwin accepts the contract, lands 7 tagging hits for quest credit, draws the 320 HP Ogre into the town guard, and collects the 1,000-coin payout at 100 HP.

Visual Rule Induction & Maze

Visual Rule Induction & Maze

Infer a hidden wall-niche branching rule in a practice wing and transfer it across two unseen dungeon wings within a strict 344m travel budget.

Zero-Shot (1st Attempt) · 4× Replay

Zero-Shot (1st Attempt) · Unsolved (448.9m > 344m Cap)

Completes all three dungeon wings with zero deaths, but corner checks and backtracking in the application wings exceed the 344m travel limit (2,700.1s).

With Experience · 4× Replay

With Experience · Solved in 1,044.0s (330.5m ≤ 344m)

Decodes the wall-niche branching rule and traverses both unseen application wings in 330.5m with zero deaths, stopping 1.50m from the final chamber center.

RPG Skill Trees & Combat

RPG Skill Trees & Combat

Unlock a sword technique, bind the auxiliary hotbar slot, and trigger the configured skill in live combat.

Zero-Shot (1st Attempt) · 4× Replay

Zero-Shot (1st Attempt) · Unsolved

Engages with basic melee swings before completing the skill-tree hotbar binding (300.5s).

With Experience · 4× Replay

With Experience · Solved in 153.8s

Binds the learned Cross Cut sword technique to the auxiliary slot, closes distance, and defeats the opponent.

Merchant Trade, Crafting & Hunt

Merchant Trade, Crafting & Hunt

Barter within a merchant budget, adapt within an episode after native campfire respawn, and streamline gathering, crafting, and equipment binding.

Zero-Shot (1st Attempt) · 4× Replay

Zero-Shot (1st Attempt) · Merchant Trade · 121.3s

Purchases and equips upgraded armor within coin budget while retaining remaining gold.

Zero-Shot (1st Attempt) · 4× Replay

Zero-Shot (1st Attempt) · Self-Funded Hunt · 973.9s

Under native campfire respawn rules, after an unarmored initial push and respawn at the stone arch, JoyTwin adapts by crafting a Rawhide Chestpiece and trading with the merchant for 57 coins before solo-killing both 25 HP Green Legooms.

Zero-Shot (1st Attempt) · Real-Time Capture

Zero-Shot (1st Attempt) · Craft & Equip · 357.4s

Completes material gathering, recipe crafting, and equipping with exploratory menu navigation.

With Experience · Real-Time Capture

With Experience · Craft & Equip · 174.6s (−51.1% Time)

Streamlines material gathering, crafting confirmation, and equipment slot binding in half the time.

Benchmark Results: Zero-Shot vs. Self-Evolving (3 Episodes)

Overall Success Across All 25 Veloren Tasks

+20.0 pp · +5 Tasks Solved
JoyTwin (Ours)
Tool-Calling Agent
DeepSeek Harness
SmolAgents
GamingAgent
GameScaling

Open-World RPG Missions (14 Complex Quests)

9/14 Solved vs. ≤ 1/14 Baselines
JoyTwin (Ours)
Tool-Calling Agent
DeepSeek Harness
SmolAgents
GamingAgent
GameScaling
JoyTwin · Self-Evolving with Experience (3 Episodes)JoyTwin · Zero-Shot (1st Episode)External Visual Baselines (3 Episodes)

89.0% Prompt-Cache Reuse

89.0% Cached Context11.0% Incremental Input

6.32M cached vs. 0.78M fresh input tokens (~12.2 planner calls/episode on the survival suite)—invoking System 2 only at stage transitions while System 1 acts continuously.

−51.1% Time on Craft & Equip

2.0× faster completion and −50.7% total tokens by streamlining material gathering, recipe crafting, and equipment slot binding.

−42.5% Time on Melee Combat

1.7× faster encounter resolution and −52.5% total tokens via immediate target lock and downhill melee spacing.

Across 25 Veloren RPG Tasks, JoyTwin’s Acting While Thinking pairs responsive combat and survival with deliberate multi-stage quest progress, while Self-Evolving with Experience raises task success from 56.0% in the 1st episode to 76.0% within just 3 episodes (vs. 28.0% for the strongest baseline). Gameplay replays show how learned experience recovers failed missions and cuts crafting and combat time nearly in half, while incremental working memory sustains long-horizon planning with 89.0% prompt-cache reuse. Together, these results point toward RPG agents that keep acting in a world that never waits, while rapidly self-evolving across a handful of episodes.


Acknowledgements

The Microsoft JoyTwin team consists of Xunlan Zhou, Xianliang Yang, Kaixin Wang, Chang Xu, Ling Zhang, and Li Zhao.

Leadership
Li Zhao

Microsoft JoyTwin Team · Microsoft Research

People