절차적 콘텐츠 생성(PCG)은 일반적으로 전문적인 도메인 지식과 복잡한 파라미터 튜닝을 필요로 합니다. 우리는 3D 지형 생성을 누구나 쉽게 할 수 있도록 돕기 위해 거대 언어 모델(LLM) 에이전트를 활용한 새로운 Zero-shot 3D 맵 생성 프레임워크를 제안합니다. 우리 시스템은 오케스트레이터(Orchestrator), 창의적 생성자인 액터(Actor), 품질 평가자인 크리틱(Critic)으로 구성된 이중 에이전트 아키텍처(Dual-Agent Architecture)를 사용하여, 간단한 자연어 프롬프트를 기반으로 맵 파라미터를 반복적으로 정제합니다.
문맥 인식 피드백 루프를 통합함으로써, 사용자는 수동으로 파라미터를 조절할 필요 없이 일관되고 고품질의 3D 맵을 생성할 수 있습니다. 우리는 이 시스템이 "화산섬"과 같은 추상적인 개념을 구체적인 PCG 파라미터로 해석하고 변환하는 능력을 입증하였으며, 기존 방식에 비해 사용자 의도에 더욱 부합하는 결과물을 보여줍니다.
핵심 파이프라인은 오케스트레이터(Orchestrator)가 처리하는 사용자 프롬프트로부터 시작되며, 오케스트레이터는 문맥 관리(Context Manager)와 이중 에이전트 시스템 간의 상호 작용을 조정합니다.
그림 1: 이중 에이전트 아키텍처 흐름도. 액터(Actor)가 파라미터를 생성하고(Temp 0.4), 크리틱(Critic)이 이를 평가하는(Temp 0.2) 피드백 루프를 보여줍니다.
사전 학습이나 예제 없이 간단한 텍스트 설명만으로 복잡한 3D 지형을 생성합니다.
액터-크리틱 아키텍처를 통해 높은 충실도를 보장합니다. 액터는 생성하고, 크리틱은 품질을 위해 정제합니다.
OpenCode CLI와 완벽하게 통합되어 있습니다. 터미널 환경에서 직접 맵을 생성하세요.
리포지토리를 복제하고 의존성을 설치합니다.
git clone https://github.com/HaD0Yun/zero-shot-3d-map-generation-with-llm-agents.git
cd zero-shot-3d-map-generation-with-llm-agents
pip install -r requirements.txt
# API 키 설정
export ANTHROPIC_API_KEY=your-key-here
import asyncio
from dual_agent_pcg.orchestrator import Orchestrator, SystemConfig
async def main():
# 이중 에이전트 시스템 설정
config = SystemConfig(
actor_temperature=0.4,
critic_temperature=0.2,
max_iterations=1
)
# 오케스트레이터 초기화
orchestrator = Orchestrator(config=config, llm_provider=llm)
# 맵 생성 실행
result = await orchestrator.execute("Create a mountain terrain...")
print(result)
if __name__ == "__main__":
asyncio.run(main())
설정하기 귀찮으신가요?
아래 프롬프트를 복사해서 좋아하는 LLM CLI (Claude, ChatGPT 등)에 붙여넣기만 하세요.
$ARGUMENTS를 원하는 맵 설명으로 바꾸면 끝!
# Dual-Agent PCG Map Generation
You are executing the **Zero-shot Dual-Agent PCG Refinement Protocol** (arXiv:2512.10501).
## User Request (P_user)
**Map Description**: $ARGUMENTS
---
## Protocol
You will alternate between two roles until convergence (max 3 iterations):
### ACTOR ROLE (Semantic Interpreter)
Generate a Parameter Trajectory Sequence as JSON. You must:
- Translate the user's intent into specific PCG tool configurations
- Include concrete parameter values (NO placeholders like "TBD")
- Ground all tool names and parameters in the API Documentation below
- Identify risks and assumptions
### CRITIC ROLE (Static Verifier)
Review the trajectory against documentation. Apply the 5-dimension framework:
1. **Tool Selection**: Does each tool exist exactly as named?
2. **Parameter Correctness**: All required params present? Values in valid range?
3. **Logic & Sequence**: Generators before modifiers? Dependencies satisfied?
4. **Goal Alignment**: Does trajectory achieve user's requirements?
5. **Completeness**: Any missing steps?
**CONSERVATIVE POLICY**: Only flag issues you're CERTAIN about.
---
## Execution Flow
```
1. [ACTOR] Generate initial trajectory S₀
2. [CRITIC] Review S₀ → produce feedback
3. IF issues found AND iteration < 3:
[ACTOR] Revise trajectory based on feedback → S₁
[CRITIC] Review S₁
... repeat until approved or max iterations
4. Output final approved trajectory
```
---
## API Documentation (D)
### Generators (must be called before modifiers)
#### CellularAutomataGenerator
Creates organic landmass patterns. Ideal for islands, continents, caves.
**Required Parameters:**
- `width` (int): Grid width [16, 256]
- `height` (int): Grid height [16, 256]
- `fill_probability` (float): Initial fill [0.0, 1.0]
- 0.3-0.4: scattered landmasses
- 0.45-0.55: balanced, connected
- 0.6-0.7: larger, solid masses
- `iterations` (int): Smoothing passes [1, 10]
- `birth_limit` (int): Birth threshold [0, 8] (typically 4)
- `death_limit` (int): Death threshold [0, 8] (typically 3)
**Optional:** `seed` (int)
#### PerlinNoiseGenerator
Creates smooth heightmaps. Ideal for elevation, mountains, hills.
**Required Parameters:**
- `width` (int): Grid width [16, 512]
- `height` (int): Grid height [16, 512]
- `scale` (float): Noise scale [0.01, 1.0]
- 0.01-0.03: large, smooth features
- 0.04-0.08: good for mountains
- 0.1+: rough, detailed
- `octaves` (int): Detail layers [1, 8]
- `persistence` (float): Amplitude falloff [0.0, 1.0]
**Optional:** `seed` (int), `lacunarity` (float, default 2.0)
### Modifiers (apply after generators)
#### HeightLayerModifier
Creates discrete elevation zones.
**Required Parameters:**
- `layer_count` (int): Number of layers [1, 10]
- `layer_heights` (list[float]): Thresholds, ascending order
- `blend_factor` (float): Transition smoothness [0.0, 0.5]
#### ScatterModifier
Scatters objects on terrain.
**Required Parameters:**
- `object_type` (str): One of "rock", "tree", "grass_clump", "bush", "flower"
- `density` (float): Scatter density [0.0, 1.0]
- `valid_layers` (list[int]): Layer indices to scatter on
#### GrassDetailModifier
Adds grass coverage to a layer.
**Required Parameters:**
- `target_layer` (int): Layer index (0-indexed)
- `coverage` (float): Coverage percentage [0.0, 1.0]
---
## Output Format
Output the FINAL APPROVED trajectory as JSON:
```json
{
"final_trajectory": {
"trajectory_summary": "<overview>",
"tool_plan": [
{
"step": 1,
"objective": "<what this achieves>",
"tool_name": "<EXACT tool name>",
"arguments": { ... },
"expected_result": "<success criteria>"
}
],
"risks": ["<potential issues>"]
}
}
```
---
## BEGIN PROTOCOL
Now execute the Dual-Agent refinement for: **$ARGUMENTS**
Start with [ACTOR] generating the initial trajectory S₀.
이것은 간소화된 버전입니다. 예제가 포함된 전체 프롬프트는 GitHub의 Map.md를 참조하세요.
이 연구가 유용하셨다면, 아래의 BibTeX를 사용하여 인용해 주세요:
@article{her2025zeroshot3dmap,
title={Zero-shot 3D Map Generation with LLM Agents: A Dual-Agent Architecture for Procedural Content Generation},
author={Her, Lim Chien and Yan, Ming and Bai, Yunshu and Li, Ruihao and Zhang, Hao},
journal={arXiv preprint arXiv:2512.10501},
year={2025}
}