Coding Agent
새 사건 해석, world knowledge 연결, 장기 consequence reasoning, mechanism selection, exception handling, code revision.
Code World Model: Coding Agent as World Brain — executable state, persistent consequences, and proxy-conditioned visual realization
기존 video world model은 세계가 어떻게 보이는가를 잘 배운다. Code World Model은 질문을 바꾼다. 세계가 왜 그렇게 변했고, 그 결과가 다음 사건에서도 왜 계속 남아 있어야 하는가를 executable code에 맡긴다.
이 논문은 세계의 evolution과 visual realization을 분리한다. coding agent는 사건을 해석하고 장기 결과를 추론해 reusable code를 작성·호출·수정한다. code는 수많은 상태변수를 고빈도로 업데이트한다. 그 결과에서 현재 관측에 필요한 coarse spatiotemporal state만 proxy로 compile하고, video model은 proxy와 text를 조건으로 고품질 observation을 생성한다.
핵심은 “LLM + video model”이라는 조합 그 자체가 아니다. 언어모델의 지식·추론, 코드의 지속적이고 재현 가능한 상태 전이, 비디오 모델의 시각·동작 prior를 서로 다른 계산 역할로 분업시킨다는 점이다. 이 구조는 latent visual memory만으로 장기 세계를 유지하려는 접근과 다른 설계 철학을 제시한다.
이 논문이 문제 삼는 것은 visual quality가 아니라 hidden mechanisms의 부재이다.
복잡한 interactive world에서는 entity의 속성, 관계, 행동이 장시간에 걸쳐 함께 변한다. 논문은 도시의 통치자가 암살되는 예를 든다. 이 사건은 즉시 화면에 보이는 변화만 만드는 것이 아니라 succession, local order, faction alliance, trade, NPC의 belief와 goal에 연쇄적으로 영향을 준다. 플레이어가 도시를 떠난 뒤에도 consequence는 계속 전개되고, 훨씬 나중에 돌아왔을 때 다시 관측되어야 한다.
이 요구는 world model에 네 가지 능력을 요구한다. broad world knowledge, entity/event relation reasoning, commonsense와 world rule에 기반한 consequence inference, 그리고 continual reasoning·planning·decision-making이다. 장기 세계의 핵심은 관측의 연속성이 아니라 consequence의 지속성이다.
video world model은 visual experience에서 환경, agent, motion, interaction의 풍부한 prior를 배울 수 있다. action- 또는 prompt-conditioned generation, long-horizon consistency, memory, streaming·real-time interaction도 빠르게 발전해 왔다.
그러나 gameplay video에서 각 frame은 game code를 실행한 결과일 뿐, 그 frame을 만든 executable logic는 rendering 이후 사라진다. off-screen state는 영상에 기록되지 않으며, causal consequence가 현재 context보다 훨씬 긴 시간에 걸쳐 전파될 수 있다. 논문은 current video model의 training context가 일반적으로 1분보다 짧은 반면, world-time에서는 며칠이나 수년에 걸친 process가 필요할 수 있다고 지적한다.
따라서 scale-up은 더 많은 outcome을 보여줄 수 있지만 hidden rule을 직접 제공하지 않는다. 저자들의 문제 정의는 명확하다. “다음 observation을 그럴듯하게 생성하는 것”만으로는 open-ended world evolution을 유지하기 어렵다.
| Research line | What it does well | What remains | Examples discussed in the paper |
|---|---|---|---|
| Interactive Video World Models | action/language-conditioned visual rollout, long-horizon memory, real-time interaction | 세계의 persistent state와 rule이 주로 visual history/latent context에 내재 | Genie, GameGen-X, PAN, DreamX-World, WorldMem, WorldPlay, Matrix-Game, LingBot-World 2.0 등 |
| Generative 3D Worlds | explicit geometry, navigation, editing, viewpoint consistency | production-quality asset, animation, material, simulator를 open-ended하게 확장하는 비용 | Text2Room, WonderWorld, HunyuanWorld, WorldGen, FlashWorld, HY-World 등 |
| Coding-Agent World Models | state transition과 rule을 inspectable·testable·revisable program으로 외재화 | learned visual world의 지속적 운영 매체로 code를 사용하는 문제는 덜 탐색됨 | WorldCoder, LLM-guided program induction, Code World Models for game playing, CWM, GameDevBench, OpenGame 등 |
agent는 드물고 어려운 판단을 하고, code는 자주 반복되는 상태 전이를 실행한다.
복잡한 세계 운영에는 서로 다른 두 계산 regime이 존재한다. 첫째는 사건의 의미를 읽고 장기 consequence를 추론하며 mechanism을 추가·수정하는 sparse but semantically complex reasoning이다. 둘째는 위치, 수치 속성, collision, cooldown, attack range, schedule 등을 반복 갱신하는 dense and repetitive execution이다.
LLM을 모든 low-level update에 호출하면 비싸고 느리다. 반면 code는 rule-consistent하고 reproducible한 업데이트를 고빈도로 처리하기 좋다. 그래서 coding agent는 high-level intent를 reusable code로 변환하고, code는 model call 없이 여러 entity와 시간에 걸쳐 실행된다.
새 사건 해석, world knowledge 연결, 장기 consequence reasoning, mechanism selection, exception handling, code revision.
position, orientation, collision, numerical rule, cooldown, scheduled event 등 반복적 상태 업데이트.
agent reasoning frequency, code execution frequency, video generation frame rate를 서로 decouple하는 것이 이 구조의 계산적 핵심이다.
interaction 또는 world event가 현재 상황을 바꾸면 coding agent는 maintained world state를 읽는다. 기존 code로 충분하면 호출하고, 부족하면 local program을 수정한다. code가 state를 전진시키고, 실행 결과·test·새 feedback이 다시 agent의 다음 판단 evidence가 된다.
새 상황이 기존 mechanism으로 처리되지 않으면 agent는 world program 자체를 바꾼다. 이때 바뀌는 것은 현재 state뿐 아니라 앞으로 세계가 작동하는 방식이다. 논문은 code를 coding agent의 continuously maintained, executable, modifiable extension으로 정의한다.
전통적 world model은 현재 state와 action이 다음 state를 만들고, 다음 state가 observation을 만든다고 쓸 수 있다.
Code World Model은 complete world state를 두 부분으로 분리한다.
\(S_t^{\mathrm{exe}}\)는 evolving world program, entity attribute, rule, relation, event history와 직접 실행 가능한 변수를 담는다. \(S_t^{\mathrm{vis}}\)는 appearance, motion 등 video model이 생성했지만 시간적으로 일관되어야 하는 visual information을 담는다.
여기서 \(T_{AC}\)는 agent와 code가 함께 만드는 transition, \(G_\theta\)는 video model이다. 다만 raw code나 complete executable state를 video network에 그대로 넣는다는 뜻은 아니다. 바로 그 연결 문제를 proxy가 담당한다.
coding agent가 full 3D environment를 만들게 할 수도 있다. 이미 알려진 object, appearance, action, interaction에는 효과적이다. 그러나 open world는 새 character, object, behavior, situation을 계속 도입한다. 모든 경우에 asset, animation, material, simulator, renderer를 준비하면 visual richness의 ceiling이 pipeline coverage에 묶인다.
video model은 대규모 visual data에서 appearance, motion, interaction, physical behavior prior를 배운다. code가 무슨 일이 일어나는지와 무엇이 지속되는지를 정하고, video model은 그 일이 어떻게 보이는지를 생성한다. 저자들은 inference cost와 latency가 conventional rendering보다 높은 대가를 인정하면서도 visual fidelity와 open-endedness를 위해 이 trade-off를 선택한다.
world state를 video model이 따라갈 수 있는 frame-wise condition으로 compile한다.
가장 단순한 interface는 executable state를 structured text로 serialize하는 것이다. identity, appearance, role, goal, position, orientation, relation, behavior, combat state를 language condition으로 넣을 수 있다. 새로운 object나 rule도 쉽게 추가된다.
그러나 저자들의 실험에서는 최근 video world model이 text와 별도 camera condition을 함께 받아도 precise camera trajectory와 entity motion을 충분히 제어하지 못했다. 모든 pixel을 언어로 기술하는 것은 이론적으로 가능하지만 token-inefficient하고 real-time latency와도 맞지 않는다.
proxy는 camera, entity position, pose, trajectory, spatial relation, interaction-relevant state를 coarse programmable representation으로 구성한다. deterministic compiler가 이를 proxy video로 rasterize한다. 이 condition은 text가 하던 semantic channel을 대체하지 않는다.
identity, appearance, role, action semantics, material, dynamic detail 등 proxy가 생략한 의미 정보를 전달한다.
frame-wise entity location, coarse geometry, trajectory, occlusion, relative relation, camera motion을 직접 지정한다.
proxy는 low-quality target video가 아니다. texture, material, fine lighting, detailed animation은 넣지 않는다. 현재 observation이 반드시 지켜야 하는 coarse state만 지정하고, visual realization의 나머지는 video prior에 남겨 둔다.
저자들은 learned 3D generator 같은 별도 generative mapping을 proxy 사이에 두지 않는다. 그러면 coding agent가 condition의 출처와 수정 경로를 직접 inspect하기 어렵기 때문이다. proxy primitive는 few lines of code로 만들 수 있는 simple reusable shape이고, position·scale·pose·layout·camera·state marker를 addressable parameter로 갖는다.
복잡한 object에 simple primitive가 충분한 discriminability를 주지 못하면 bounding box로 fallback하고, identity와 appearance는 text로 지정한다. 이 구조는 constructible, inspectable, addressable, locally editable한 visual prompt를 지향한다.
joint-level articulated motion까지 넣으면 grounding은 강해지지만 coding agent가 모든 joint trajectory를 안정적으로 제어해야 한다. 너무 sparse하면 spatial constraint가 약하다. 그래서 논문은 proxy design을 constructability와 grounding strength의 trade-off로 정의한다.
현재 구현의 proxy spatial resolution은 target의 각 축에서 1/4이므로 pixel/visual-token 규모는 target의 1/16이다. 저자들은 additional inference burden이 작다고 보고한다.
또한 proxy는 항상 켜는 fixed modality가 아니라 coding agent가 필요에 따라 enable/disable하거나 represented state type, granularity, resolution, condition frame rate를 조정할 수 있는 visual prompting tool로 제안된다. 다만 논문이 실제로 평가한 것은 하나의 fixed proxy design이며, autonomous switching과 bandwidth adaptation은 future design space이다.
game runtime에서는 자동 추출하고, real video에서는 geometry-assisted offline compilation을 사용한다.
game은 target RGB video와 대응 runtime state를 한 번의 execution에서 동시에 얻을 수 있어 proxy–observation pair를 만들기 적합하다. 시스템은 full 3D model, texture, material을 저장하지 않고 proxy 구성에 필요한 camera state, entity position/orientation, approximate scale, scene layout, interaction-critical state만 기록한다.
이 runtime record는 target video를 다시 수집하지 않고도 coverage와 granularity가 다른 proxy로 재compile할 수 있다. frame마다 pixel-wise ground-truth instance map을 얻기 때문에 structured text의 identity/attribute/action description을 해당 proxy region과 정확히 연결할 수 있다.
논문의 Figure 3(a)는 game RGB frame과 proxy가 같은 frame에 정렬된 예를 보여 준다. skeletal pose나 detailed 3D mesh처럼 coding agent가 inference time에 재현·유지하기 어려운 표현은 의도적으로 제외한다.
real-world recording은 scale, occlusion, contact, camera egomotion, action에 따른 physical response처럼 embodied agent에 중요한 cue를 제공한다. 이 interface는 separate action label이나 camera-control label을 요구하지 않고, visual effect와 camera motion을 proxy video 자체에 담는다.
논문은 KITTI-360에서 geometry-assisted proof-of-concept를 수행한다. rectified RGB frame을 target으로 하고, calibrated camera pose, semantic 3D reconstruction, 3D object annotation은 offline proxy compilation에만 사용한다. video model에 직접 주지 않는다. static geometry를 camera view에 projection해 metric depth와 surface normal을 만들고, pedestrian capsule, vehicle wireframe, vegetation low-poly proxy, building coarse extent를 shared depth buffer로 rasterize해 occlusion과 alignment를 유지한다.
중요한 구분은 현재 video model adaptation과 결과가 gameplay paired data 중심이라는 점이다. KITTI-360은 real-data proxy construction 가능성을 보이는 interface proof-of-concept이다.
page 9의 paired-data figure는 game과 real data를 나란히 배치한다. game 쪽은 runtime annotation에서 proxy를 자동 생성하고 identity를 frame across time에 유지한다. real 쪽은 calibrated reconstruction과 object annotation에서 scene layout, entity location, occlusion을 offline compile한다. 두 경우의 공통점은 target RGB와 proxy가 동일 frame index에서 정렬된다는 것이다.
MiniMax-H3 Ref2VA를 LoRA로 적응시키고, coding agent는 existing game-engine template를 확장한다.
| Item | Configuration | Role |
|---|---|---|
| Backbone | Official MiniMax-H3 Ref2VA | proxy-conditioned video generation |
| Gameplay source | 157 takes, about 5.6 hours | paired RGB–proxy source |
| Training clips | 9,420 clips, each 5 seconds, sampled every 2 seconds | fine-tuning examples |
| Target video | 124 frames, 1344×768, 24 FPS | RGB prediction target |
| Proxy condition | 124 frames, 336×192; fixed-log depth + categorical semantic-ID maps | frame-aligned spatial condition |
| Encoder proxy frames | 11 frames at offsets 0, 12, 24, …, 120 | multimodal condition input |
| Adaptation | rank-128 LoRA across all 50 transformer blocks; ~596M trainable parameters | proxy-following adaptation |
| Hardware | 8× NVIDIA H800 GPUs | training compute |
| Optimization | AdamW, global batch 8, weight decay 0.01, grad clip 1.0, BF16, FlashAttention-3, gradient checkpointing | training setup; audio loss disabled |
| Schedule | 3 epochs / 3,534 steps; 100-step warmup; cosine LR 2×10⁻⁵ → 1×10⁻⁶ | available-compute-constrained training |
coding agent로 GPT-5.6 Sol을 사용한다. inference에서 basic player control, collision handling, runtime update loop가 포함된 existing game-engine code와 training-data construction에 쓰인 proxy primitive를 함께 제공한다.
저자들은 current coding agent가 AAA-scale scene과 complex interaction logic를 전부 scratch에서 구축하는 데 여전히 어려움이 있다고 명시한다. 대신 existing AAA scene과 gameplay logic를 template로 결합·확장·재작성해 target world를 구성한다. resulting world는 executable하고 player-controllable하지만, visually relevant state는 refined 3D asset이 아니라 coarse proxy geometry로 표현한다.
이 점은 성과를 정확히 읽는 데 중요하다. “coding agent가 완전한 open-world game을 자율 제작했다”는 결과가 아니다. 현재 결과는 persistent executable mechanism과 learned visual renderer를 연결하는 prototype validation이다.
step 3,534 checkpoint에서 explicit Euler 20 step으로 video를 sample한다. qualitative example에서는 GPT Image 2가 first proxy frame과 coding-agent-written text prompt를 조건으로 1536×864 first-frame appearance anchor를 만든다. 이 prompt는 proxy가 지정한 entity count, approximate position, relative scale, orientation, coarse layout, camera height, framing을 보존하도록 지시하면서 identity, material, environment, visual style은 text로 구체화한다.
anchor는 1344×768로 resize되어 initial latent slot과 Ref2VA appearance-reference branch에 들어간다. complete proxy sequence가 camera/entity motion과 scene layout을 frame-wise로 제어하고, text가 appearance와 action semantics를 보완한다. 각 inference call은 124 frame, 1344×768, 24 FPS video를 생성한다.
long-video inference는 overlapping 124-frame window를 사용한다. 이후 window는 이전 window의 마지막 34 RGB frame을 continuation context로 받고 90 frame씩 앞으로 전진한다. 동일 first-frame appearance anchor를 매 window에 재사용해 global identity와 appearance를 유지하려 한다.
stitching에서는 첫 window를 모두 유지하고, 다음 window의 regenerated 34-frame overlap을 버린 뒤 remaining 90 frame을 붙인다. proxy는 전체 sequence 동안 frame-aligned condition으로 유지된다.
paper가 제시하는 evidence는 proxy-following의 qualitative demonstration이며, latency를 포함한 종합 benchmark는 아니다.
Figure 4는 각 case에서 시간순 6개 frame을 보여 주며, 위 row는 frame-aligned proxy, 아래 row는 generated RGB이다. fine-tuning data는 약 5.6시간 gameplay에 불과하지만, 논문은 다양한 character, environment, motion, camera trajectory에서 proxy의 spatiotemporal structure를 따르면서 rich visual detail을 유지한다고 보고한다.
예시는 stylized character dance, water interaction과 combat, flying fantasy object, meadow running, mountain-monastery 이동 등 training game visual과 다른 appearance를 포함한다. 이 결과가 보여주는 것은 proxy가 final appearance를 직접 render하지 않아도 coarse geometry와 trajectory를 전달하는 condition으로 작동할 수 있다는 가능성이다.
project-page qualitative comparison에서 proxy condition은 character motion, action, camera movement를 더 precise하고 responsive하게 제어한다고 보고한다. frame-wise pose와 trajectory를 직접 지정하기 때문에 modern 3D game에 가까운 granularity로 individual character action과 camera operation을 표현할 수 있다는 주장이다.
다만 comparison은 control quality를 isolate하기 위해 inference latency를 고려하지 않는다. 또한 main paper에는 broad quantitative metric table이나 human preference benchmark가 없다. 따라서 현재 evidence는 architecture의 feasibility와 qualitative controllability를 지지하지만, 속도·비용·장기 안정성까지 포함한 우월성을 확정하지는 않는다.
available compute 때문에 training scale이 작고 generation quality도 제한된다. autoregressive real-time generation은 구현하지 않았다.
current coding agent는 highly complex game mechanism을 scratch에서 안정적으로 구현하지 못한다. complete open-world game/simulator의 autonomous construction은 future work이다.
이 한계 때문에 논문의 결론은 신중하다. current prototype은 coding agent가 world state와 operating mechanism을 code로 바꿀 수 있고, fine-tuned video model이 proxy-specified state를 visual observation으로 render할 수 있다는 preliminary evidence를 제공한다.
latent memory, executable memory, visual generation을 분리해 보면 world model의 새로운 연구축이 열린다.
이 문단은 논문의 직접 주장보다 한 단계 확장한 해석이다. Code World Model은 language model의 learned knowledge/reasoning, executable code의 explicit symbolic state transition, video model의 generative perception을 분리한다. 즉 모든 세계 지식을 하나의 latent network에 넣기보다 무엇을 neural prior에 맡기고 무엇을 executable structure로 외재화할지를 설계한다.
이 관점에서 code는 단순 tool call이 아니다. persistent relation, event history, operating rule, entity attribute를 시간에 걸쳐 유지하는 executable long-term memory이자 causal substrate라고 볼 수 있다. 다만 real-world causality를 학습했다는 증거는 아니다. 현재 demonstration은 game-like world에서 rule-consistent persistent evolution을 위한 architecture 수준의 제안이다.
proxy의 진짜 흥미로운 점은 rendering primitive 자체보다 information selection에 있다. world state는 매우 크지만 특정 observation이 지켜야 할 constraint는 일부다. coding agent가 interaction-critical entity와 region을 선택하고, 어떤 state type과 granularity를 시각 condition으로 보낼지 결정한다면 proxy는 programmable information bottleneck이 된다.
논문은 이를 future design space로 남긴다. 더 나은 video control이 등장하면 proxy는 더 sparse해질 수 있고 일부 scene에서는 사라질 수도 있다. 반대로 physical interaction이나 spatial relation이 중요한 장면에서는 더 강한 condition bandwidth를 사용할 수 있다.
embodied agent는 object permanence, off-screen state, scale, occlusion, contact, action consequence 같은 정보를 필요로 한다. Code World Model은 executable state와 real-video visual prior를 결합함으로써 virtual-world generation뿐 아니라 scalable training/evaluation environment를 장기 목표로 제시한다.
다만 현재 prototype은 embodied task performance를 직접 평가하지 않았다. 따라서 robot policy가 더 잘 학습되거나 real-world transfer가 향상된다는 것은 아직 inference이다. 이를 검증하려면 proxy-conditioned world에서 학습한 agent의 downstream control, planning, generalization benchmark가 필요하다.
| Appendix example | Motion structure | What it tests |
|---|---|---|
| The Rainkeeper’s Steps | 주인공은 stationary. camera가 side → rear → side로 arc | entity translation 없이 camera following과 scene preservation을 분리해 시험 |
| Hollowfacet Hill | wooden marionette courier가 uphill walk 후 균형을 잃고 continuous fall | 여러 temporally ordered body state와 camera response를 포함하는 complex motion prompt |
| The Mycelial Provision Road | shoebill courier가 제자리에서 breathing, weight shift, head turn 등 subtle idle motion | large displacement 없이 fine motion과 scene/identity preservation을 시험 |
각 example은 Appearance and scene → Protagonist action timeline → Other visible actors의 구조를 사용한다. appearance·identity·material·environment는 매우 상세한 language description으로 지정하고, 시간 구간별 action은 0.00–5.17초의 timeline으로 작성한다. 이는 proxy가 coarse spatiotemporal state를 담당하더라도 text가 high-bandwidth semantic realization을 계속 담당한다는 것을 보여 준다.
Code World Model이 보여 주는 가장 중요한 설계 변화는 시각 품질이 아니다. world evolution의 책임을 video model 하나에 몰아넣지 않고, knowledge-driven decision은 coding agent, persistent and repetitive evolution은 code, spatiotemporal grounding은 proxy, visual realization은 video model에 분배한다.
이 분업은 open-ended world를 완성했다는 증거가 아니라, 어디에서 intelligence를 실행하고 어디에서 state를 보존하며 어디에서 generative prior를 활용할지에 대한 architecture hypothesis이다. 현재 결과는 작은-scale gameplay adaptation과 qualitative example에 머물지만, 질문 자체는 크다. 미래의 world model은 세계를 그리는 모델인가, 세계를 운영하는 시스템인가.
원문은 95개 reference를 통해 interactive video world model, long-horizon memory, real-time generation, generative 3D worlds, coding agents, program-based world models, data/attention techniques를 폭넓게 연결한다. 위 목록은 본문 구조를 이해하기 위한 대표 research lineage이다.