Spaces:
Running
Running
Upload 9 files
Browse files- app.py +1877 -0
- emergence_matrix_document.json +356 -0
- index.html +609 -0
- requirements.txt +10 -0
- wm_bench_dataset.json +3592 -0
- wm_bench_eval.py +840 -0
- wm_bench_scoring.py +1060 -0
- wm_bench_spec.py +852 -0
- wm_bench_verify.py +390 -0
app.py
ADDED
|
@@ -0,0 +1,1877 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ============================================================
|
| 2 |
+
# SOMA Pre-AGI ยท Metacognitive Document Engine
|
| 3 |
+
# Fireworks AI (Kimi K2) + Brave Search + ์์/์๊ทน ๋ค์ค ์์ด์ ํธ
|
| 4 |
+
# ============================================================
|
| 5 |
+
import os, re, html, json, time, tempfile, threading
|
| 6 |
+
from dataclasses import dataclass, field
|
| 7 |
+
from datetime import datetime
|
| 8 |
+
from typing import List, Optional, Union, Generator
|
| 9 |
+
|
| 10 |
+
import requests
|
| 11 |
+
import gradio as gr
|
| 12 |
+
|
| 13 |
+
# โโ ํ์ผ ํ์ฑ ๋ผ์ด๋ธ๋ฌ๋ฆฌ (์ ํ์ ์ํฌํธ) โโ
|
| 14 |
+
import subprocess, sys, zlib, zipfile
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
try:
|
| 18 |
+
import olefile
|
| 19 |
+
OLEFILE_AVAILABLE = True
|
| 20 |
+
except ImportError:
|
| 21 |
+
OLEFILE_AVAILABLE = False
|
| 22 |
+
|
| 23 |
+
try:
|
| 24 |
+
import pdfplumber
|
| 25 |
+
PDFPLUMBER_AVAILABLE = True
|
| 26 |
+
except ImportError:
|
| 27 |
+
PDFPLUMBER_AVAILABLE = False
|
| 28 |
+
|
| 29 |
+
try:
|
| 30 |
+
import PyPDF2
|
| 31 |
+
PYPDF2_AVAILABLE = True
|
| 32 |
+
except ImportError:
|
| 33 |
+
PYPDF2_AVAILABLE = False
|
| 34 |
+
|
| 35 |
+
PYHWP_PATH = os.environ.get("PYHWP_PATH", "/usr/local/lib/python3.10/site-packages")
|
| 36 |
+
|
| 37 |
+
# ============================================================
|
| 38 |
+
# โ ํ๊ฒฝ๋ณ์ / ์์
|
| 39 |
+
# ============================================================
|
| 40 |
+
FIREWORKS_API_KEY = os.environ.get("FIREWORKS_API_KEY", "")
|
| 41 |
+
BRAVE_API_KEY = os.environ.get("BRAVE_API_KEY", "")
|
| 42 |
+
|
| 43 |
+
FIREWORKS_MODEL = "accounts/fireworks/models/kimi-k2p5"
|
| 44 |
+
FIREWORKS_URL = "https://api.fireworks.ai/inference/v1/chat/completions"
|
| 45 |
+
BRAVE_URL = "https://api.search.brave.com/res/v1/web/search"
|
| 46 |
+
|
| 47 |
+
PRIMARY_TEMPLATE = "nh_official_template.hml"
|
| 48 |
+
FALLBACK_TEMPLATE = "example.hml"
|
| 49 |
+
MAX_SEARCHES = 100 # Brave ์ต๋ ๊ฒ์ ํ์
|
| 50 |
+
|
| 51 |
+
# ============================================================
|
| 52 |
+
# โก SOMA ์์ด์ ํธ ์ ์ (๋ฉํ์ธ์ง ๊ธฐ๋ฐ)
|
| 53 |
+
# ============================================================
|
| 54 |
+
OHAENG = {
|
| 55 |
+
"ๆฐด": {"name":"RESEARCH","role":"ํ์ยท์์ง","color":"#38BDF8","emoji":"๐","desc":"์ ๋ณด๋ฅผ ํ์ํ๊ณ ์ ์ ํฉ๋๋ค"},
|
| 56 |
+
"ๆจ": {"name":"STRUCTURE","role":"์ค๊ณยท๊ตฌ์กฐ","color":"#4ADE80","emoji":"๐งฉ","desc":"๋ฌธ์์ ๊ณจ๊ฒฉ์ ์ค๊ณํฉ๋๋ค"},
|
| 57 |
+
"็ซ": {"name":"ARGUMENT","role":"๋
ผ์ฆยท๊ฒ์ฆ","color":"#FB7185","emoji":"๐ฌ","desc":"ํฉํธ๋ฅผ ๊ฒ์ฆํ๊ณ ๋
ผ๋ฆฌ๋ฅผ ๋จ๋ จํฉ๋๋ค"},
|
| 58 |
+
"ๅ": {"name":"EVIDENCE","role":"ํตํฉยท์ค์ฒดํ","color":"#FBBF24","emoji":"๐","desc":"๋ชจ๋ ์์๋ฅผ ํ๋๋ก ํตํฉํฉ๋๋ค"},
|
| 59 |
+
"้": {"name":"IMPACT","role":"์ ์ ยท๋ฉํ์ธ์ง","color":"#C084FC","emoji":"๐ง ","desc":"์๊ธฐ๊ฒ์ฆ์ผ๋ก ์์ฑ๋๋ฅผ ๊ทน๋ํํฉ๋๋ค"},
|
| 60 |
+
}
|
| 61 |
+
SANGSAENG = ["ๆฐด","ๆจ","็ซ","ๅ","้"] # ํ์ดํ๋ผ์ธ ์์
|
| 62 |
+
SANGGEUK = {"้":"ๆจ","ๆจ":"ๅ","ๅ":"ๆฐด","ๆฐด":"็ซ","็ซ":"้"} # ์ํธ ๊ฒ์ฆ ๊ด๊ณ
|
| 63 |
+
|
| 64 |
+
# โโ ์ฐฝ๋ฐ ๋งคํธ๋ฆญ์ค ๋ก๋ โโ
|
| 65 |
+
EMERGENCE_MATRIX = {}
|
| 66 |
+
_em_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "emergence_matrix_document.json")
|
| 67 |
+
if os.path.exists(_em_path):
|
| 68 |
+
try:
|
| 69 |
+
with open(_em_path, 'r', encoding='utf-8') as _f:
|
| 70 |
+
EMERGENCE_MATRIX = json.load(_f)
|
| 71 |
+
print(f"โ
Emergence Matrix ๋ก๋: {_em_path}")
|
| 72 |
+
except Exception as _e:
|
| 73 |
+
print(f"โ ๏ธ Emergence Matrix ๋ก๋ ์คํจ: {_e}")
|
| 74 |
+
else:
|
| 75 |
+
print(f"โน๏ธ Emergence Matrix ํ์ผ ์์: {_em_path}")
|
| 76 |
+
|
| 77 |
+
def _get_layer_prompt(layer_name: str) -> str:
|
| 78 |
+
"""์ฐฝ๋ฐ ๋งคํธ๋ฆญ์ค์์ ํด๋น ๋ ์ด์ด์ ์ ๋ต์ ์์คํ
ํ๋กฌํํธ ๋ฌธ์์ด๋ก ๋ณํ"""
|
| 79 |
+
if not EMERGENCE_MATRIX:
|
| 80 |
+
return ""
|
| 81 |
+
layers = EMERGENCE_MATRIX.get("layers", {})
|
| 82 |
+
layer = layers.get(layer_name)
|
| 83 |
+
if not layer:
|
| 84 |
+
return ""
|
| 85 |
+
parts = [f"\n[์ฐฝ๋ฐ ๋งคํธ๋ฆญ์ค โ {layer_name} ๋ ์ด์ด]"]
|
| 86 |
+
parts.append(f"์ญํ : {layer['desc']}")
|
| 87 |
+
for cat_name, items in layer.get("strategies", {}).items():
|
| 88 |
+
parts.append(f"\n<{cat_name}>")
|
| 89 |
+
for item in items:
|
| 90 |
+
parts.append(f" โข {item}")
|
| 91 |
+
parts.append(f"</{cat_name}>")
|
| 92 |
+
# ๊ต์ฐจ ๋ ์ด์ด ๋ณด๋์ค ํํธ
|
| 93 |
+
cross = EMERGENCE_MATRIX.get("cross_layer_bonus", {})
|
| 94 |
+
for key, val in cross.items():
|
| 95 |
+
if layer_name in key:
|
| 96 |
+
hint = val.get("hint", "") if isinstance(val, dict) else ""
|
| 97 |
+
bonus = val.get("bonus", 0) if isinstance(val, dict) else val
|
| 98 |
+
if hint:
|
| 99 |
+
parts.append(f"\n[๊ต์ฐจ ์ฐฝ๋ฐ {key} (๋ณด๋์ค {bonus})] {hint}")
|
| 100 |
+
# ๋ฉํ์ธ์ง ํ๋กํ ์ฝ
|
| 101 |
+
meta = EMERGENCE_MATRIX.get("metacognitive_protocols", {})
|
| 102 |
+
if meta.get("self_reflection"):
|
| 103 |
+
parts.append("\n[๋ฉํ์ธ์ง ์๊ธฐ๋ฐ์ฑ]")
|
| 104 |
+
for q in meta["self_reflection"].get("questions", []):
|
| 105 |
+
parts.append(f" ? {q}")
|
| 106 |
+
return "\n".join(parts)
|
| 107 |
+
|
| 108 |
+
def _get_writing_principles() -> str:
|
| 109 |
+
"""์์ฑ ์๋ฆฌ๋ฅผ ํ๋กฌํํธ ๋ฌธ์์ด๋ก ๋ณํ"""
|
| 110 |
+
if not EMERGENCE_MATRIX:
|
| 111 |
+
return ""
|
| 112 |
+
principles = EMERGENCE_MATRIX.get("writing_principles", [])
|
| 113 |
+
if not principles:
|
| 114 |
+
return ""
|
| 115 |
+
parts = ["\n[์ฐฝ๋ฐ์ ์์ฑ ์๋ฆฌ]"]
|
| 116 |
+
for p in principles:
|
| 117 |
+
parts.append(f" {p['id']}. {p['name']}: {p['hint']}")
|
| 118 |
+
return "\n".join(parts)
|
| 119 |
+
|
| 120 |
+
def _get_dilemmas() -> str:
|
| 121 |
+
"""์ ์ฑ
๋๋ ๋ง๋ฅผ ํ๋กฌํํธ ๋ฌธ์์ด๋ก ๋ณํ"""
|
| 122 |
+
if not EMERGENCE_MATRIX:
|
| 123 |
+
return ""
|
| 124 |
+
dilemmas = EMERGENCE_MATRIX.get("policy_dilemmas", [])
|
| 125 |
+
if not dilemmas:
|
| 126 |
+
return ""
|
| 127 |
+
parts = ["\n[์ ์ฑ
๋๋ ๋ง ํ๋ ์]"]
|
| 128 |
+
for d in dilemmas:
|
| 129 |
+
parts.append(f" โข {d['dilemma']} โ {d['resolution']}")
|
| 130 |
+
return "\n".join(parts)
|
| 131 |
+
|
| 132 |
+
AGENT_SYSTEM: dict[str,str] = {
|
| 133 |
+
"ๆฐด": f"""๋น์ ์ SOMA Pre-AGI RESEARCH ์์ด์ ํธ์
๋๋ค. ์ญํ : ๊ฒ์ ๊ฒฐ๊ณผ ๋ถ์ยท์ ๋ณด ์ ์ .
|
| 134 |
+
|
| 135 |
+
์ ๊ณต๋ Brave Search ๊ฒฐ๊ณผ๋ฅผ ๋ฐํ์ผ๋ก:
|
| 136 |
+
1. ํต์ฌ ํฉํธ ๋ฒํธ ๋ชฉ๋ก์ผ๋ก ์ ๋ฆฌ
|
| 137 |
+
2. ์ฃผ์ ํต๊ณยท์์น ๋ณ๋ ํ๊ธฐ
|
| 138 |
+
3. ์ถ์ฒ ์ ๋ขฐ๋ ํ๊ฐ (โ
โโ ~ โ
โ
โ
)
|
| 139 |
+
4. ์ถ๊ฐ ๊ฒ์์ด ํ์ํ ํค์๋๋ฅผ ๋ฐ๋์ ๋ค์ ํ์์ผ๋ก ์ ์:
|
| 140 |
+
[์ถ๊ฐ๊ฒ์: "ํค์๋1"], [์ถ๊ฐ๊ฒ์: "ํค์๋2"]
|
| 141 |
+
|
| 142 |
+
๊ณต์ ๋ฌธ์์ฉ์ผ๋ก ๊ฒ์ฆ ๊ฐ๋ฅํ ์ ๋ณด๋ง ํฌํจํ์ธ์.
|
| 143 |
+
{_get_layer_prompt('RESEARCH')}""",
|
| 144 |
+
|
| 145 |
+
"ๆจ": f"""๋น์ ์ SOMA Pre-AGI STRUCTURE ์์ด์ ํธ์
๋๋ค. ์ญํ : ๊ณต๋ฌธ์ ๊ตฌ์กฐ ์ค๊ณ.
|
| 146 |
+
|
| 147 |
+
์์ง๋ ์ ๋ณด๋ก HWP ๊ณต๋ฌธ์ Markdown ๊ตฌ์กฐ๋ฅผ ์ค๊ณํฉ๋๋ค:
|
| 148 |
+
- # ๋ฌธ์ ์ ๋ชฉ (1๊ฐ)
|
| 149 |
+
- ## โ
. ๊ฐ์ / โ
ก. ํํฉ / โ
ข. ์ถ์ง๋ฐฉํฅ / โ
ฃ. ๊ธฐ๋ํจ๊ณผ / โ
ค. ๊ฒฐ๋ก
|
| 150 |
+
- ### ์ํญ๋ชฉ
|
| 151 |
+
- | ํํค๋ | ํํค๋ | (ํ์ ์)
|
| 152 |
+
- โ ๋ถ๋ฆฟ (ํต์ฌ ์ฌํญ)
|
| 153 |
+
|
| 154 |
+
์ ๋ถยท๊ณต๊ณต๊ธฐ๊ด ์ ์ถ ๋ฌธ์ ์คํ์ผ์ ์์ํ์ธ์.
|
| 155 |
+
{_get_layer_prompt('STRUCTURE')}
|
| 156 |
+
{_get_writing_principles()}""",
|
| 157 |
+
|
| 158 |
+
"็ซ": f"""๋น์ ์ SOMA Pre-AGI ARGUMENT ์์ด์ ํธ์
๋๋ค. ์ญํ : ํฉํธ์ฒดํฌยท๋
ผ์ฆ ๊ฒ์ฆ.
|
| 159 |
+
|
| 160 |
+
STRUCTURE ์์ด์ ํธ๊ฐ ์์ฑํ ๊ตฌ์กฐ๋ฅผ RESEARCH ๋ฐ์ดํฐ์ ๋์กฐํ์ฌ:
|
| 161 |
+
1. [์ค๋ฅ] ํฉํธ ๋ถ์ผ์น ํญ๋ชฉ ์ง์
|
| 162 |
+
2. [๋๋ฝ] ์ค์ ์ ๋ณด ๋๋ฝ ํญ๋ชฉ ์ง์
|
| 163 |
+
3. [๋ณด๊ฐ] ์ถ๊ฐ ๊ฒ์ ํ์ ํค์๋:
|
| 164 |
+
[์ถ๊ฐ๊ฒ์: "ํค์๋"]
|
| 165 |
+
4. [์น์ธ] ๊ฒ์ฆ๋ ํญ๋ชฉ ํ์ธ
|
| 166 |
+
|
| 167 |
+
๋ฉํ์ธ์ง์ ๋นํ์ผ๋ก ๋ ์นด๋กญ๊ฒ ๊ฒ์ฆํ์ธ์.
|
| 168 |
+
{_get_layer_prompt('ARGUMENT')}""",
|
| 169 |
+
|
| 170 |
+
"ๅ": f"""๋น์ ์ SOMA Pre-AGI EVIDENCE ์์ด์ ํธ์
๋๋ค. ์ญํ : ์์ฑ ๋ฌธ์ ํตํฉ ์์ฑ.
|
| 171 |
+
|
| 172 |
+
๋ชจ๋ ์์ด์ ํธ ์ถ๋ ฅ์ ํตํฉํ์ฌ ์ต์ข
HWP ๋ฌธ์๋ฅผ ์์ฑํฉ๋๋ค.
|
| 173 |
+
|
| 174 |
+
๋ฐ๋์ ์งํฌ Markdown ๊ท์น:
|
| 175 |
+
- # ์ ๋ชฉ (์ต์์, 1๊ฐ๋ง)
|
| 176 |
+
- ## โ
. ~ โ
ค. (์ฃผ์ ์น์
, ๋ก๋ง์ซ์)
|
| 177 |
+
- ### 1. 2. 3. (์ํญ๋ชฉ)
|
| 178 |
+
- | ์ด1 | ์ด2 | ์ด3 |
|
| 179 |
+
|---|---|---|
|
| 180 |
+
| ๊ฐ | ๊ฐ | ๊ฐ |
|
| 181 |
+
- โ ํต์ฌ ์ฌํญ (๋ถ๋ฆฟ)
|
| 182 |
+
- ์ผ๋ฐ ๋ณธ๋ฌธ (๋ค์ฌ์ฐ๊ธฐ ์์)
|
| 183 |
+
|
| 184 |
+
๋ถ๋: 2,000์ ์ด์์ ์์ฑ๋ ๋์ ๊ณต๊ณต๊ธฐ๊ด ์ ์ถ์ฉ ๋ฌธ์๋ฅผ ์์ฑํ์ธ์.
|
| 185 |
+
{_get_layer_prompt('EVIDENCE')}
|
| 186 |
+
{_get_dilemmas()}""",
|
| 187 |
+
|
| 188 |
+
"้": f"""๋น์ ์ SOMA Pre-AGI IMPACT ์์ด์ ํธ์
๋๋ค. ์ญํ : ์ต์ข
๋นํยท๋ฉํ์ธ์ง ์ ์ .
|
| 189 |
+
|
| 190 |
+
EVIDENCE๊ฐ ์์ฑํ ๋ฌธ์๋ฅผ ์ต์ข
๊ฒํ ํ๊ณ ๊ฐ์ ํฉ๋๋ค:
|
| 191 |
+
1. ๋ฌธ์ฒด ์ผ๊ด์ฑ (๊ณต๋ฌธ์์ฒด ์ ์ง)
|
| 192 |
+
2. ์ฉ์ด ์ ํ์ฑ (์ ๋ฌธ์ฉ์ด ๊ฒ์ฆ)
|
| 193 |
+
3. ๋
ผ๋ฆฌ ํ๋ฆ (๋๊ด์ ๊ตฌ์ฑ)
|
| 194 |
+
4. ํ ํ์ ์์ฑ๋
|
| 195 |
+
5. ๋๋ฝ ํญ๋ชฉ ๋ณด์
|
| 196 |
+
|
| 197 |
+
๊ฒํ ํ ๋ฐ๋์ ===์ต์ข
๋ฌธ์=== ๋ง์ปค์ ํจ๊ป ์์ฑ๋ณธ ์ ๋ฌธ์ ์ถ๋ ฅํ์ธ์.
|
| 198 |
+
|
| 199 |
+
===์ต์ข
๋ฌธ์===
|
| 200 |
+
[์์ฑ๋ ์ ์ฒด ๋ฌธ์]
|
| 201 |
+
|
| 202 |
+
{_get_layer_prompt('IMPACT')}
|
| 203 |
+
{_get_writing_principles()}""",
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
# ============================================================
|
| 207 |
+
# โข Fireworks AI ํด๋ผ์ด์ธํธ
|
| 208 |
+
# ============================================================
|
| 209 |
+
def fireworks_chat(
|
| 210 |
+
messages: list,
|
| 211 |
+
system_prompt: str,
|
| 212 |
+
max_tokens: int = 4096,
|
| 213 |
+
temperature: float = 0.6,
|
| 214 |
+
stream: bool = False,
|
| 215 |
+
) -> Union[str, Generator]:
|
| 216 |
+
if not FIREWORKS_API_KEY:
|
| 217 |
+
raise ValueError("FIREWORKS_API_KEY ํ๊ฒฝ๋ณ์๊ฐ ์ค์ ๋์ง ์์์ต๋๋ค.")
|
| 218 |
+
|
| 219 |
+
headers = {
|
| 220 |
+
"Accept": "application/json",
|
| 221 |
+
"Content-Type": "application/json",
|
| 222 |
+
"Authorization": f"Bearer {FIREWORKS_API_KEY}",
|
| 223 |
+
}
|
| 224 |
+
payload = {
|
| 225 |
+
"model": FIREWORKS_MODEL,
|
| 226 |
+
"max_tokens": max_tokens,
|
| 227 |
+
"top_p": 1,
|
| 228 |
+
"top_k": 40,
|
| 229 |
+
"presence_penalty": 0,
|
| 230 |
+
"frequency_penalty": 0,
|
| 231 |
+
"temperature": temperature,
|
| 232 |
+
"stream": stream,
|
| 233 |
+
"messages": [{"role": "system", "content": system_prompt}] + messages,
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
if not stream:
|
| 237 |
+
resp = requests.post(FIREWORKS_URL, headers=headers, json=payload, timeout=120)
|
| 238 |
+
resp.raise_for_status()
|
| 239 |
+
return resp.json()["choices"][0]["message"]["content"]
|
| 240 |
+
|
| 241 |
+
# โโ ์คํธ๋ฆฌ๋ฐ ์ ๋๋ ์ดํฐ
|
| 242 |
+
def _gen():
|
| 243 |
+
resp = requests.post(FIREWORKS_URL, headers=headers, json=payload,
|
| 244 |
+
stream=True, timeout=180)
|
| 245 |
+
resp.raise_for_status()
|
| 246 |
+
for raw in resp.iter_lines():
|
| 247 |
+
if not raw:
|
| 248 |
+
continue
|
| 249 |
+
line = raw.decode("utf-8") if isinstance(raw, bytes) else raw
|
| 250 |
+
if not line.startswith("data: "):
|
| 251 |
+
continue
|
| 252 |
+
data = line[6:]
|
| 253 |
+
if data.strip() == "[DONE]":
|
| 254 |
+
break
|
| 255 |
+
try:
|
| 256 |
+
chunk = json.loads(data)
|
| 257 |
+
delta = chunk["choices"][0]["delta"].get("content", "")
|
| 258 |
+
if delta:
|
| 259 |
+
yield delta
|
| 260 |
+
except Exception:
|
| 261 |
+
pass
|
| 262 |
+
return _gen()
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
def fireworks_stream_collect(messages, system_prompt, max_tokens=4096, temperature=0.6) -> str:
|
| 266 |
+
"""์คํธ๋ฆฌ๋ฐ์ผ๋ก ๋ฐ์ ์ ์ฒด ํ
์คํธ ๋ฐํ"""
|
| 267 |
+
result = ""
|
| 268 |
+
for tok in fireworks_chat(messages, system_prompt, max_tokens, temperature, stream=True):
|
| 269 |
+
result += tok
|
| 270 |
+
return result
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
# ============================================================
|
| 274 |
+
# โฃ Brave Search ํด๋ผ์ด์ธํธ
|
| 275 |
+
# ============================================================
|
| 276 |
+
@dataclass
|
| 277 |
+
class SearchResult:
|
| 278 |
+
title: str
|
| 279 |
+
url: str
|
| 280 |
+
description: str
|
| 281 |
+
source: str = ""
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
def brave_search(query: str, count: int = 10) -> List[SearchResult]:
|
| 285 |
+
if not BRAVE_API_KEY:
|
| 286 |
+
return [SearchResult(title="[APIํค ์์]", url="", description="BRAVE_API_KEY ํ๊ฒฝ๋ณ์๋ฅผ ์ค์ ํ์ธ์.", source="")]
|
| 287 |
+
|
| 288 |
+
headers = {
|
| 289 |
+
"Accept": "application/json",
|
| 290 |
+
"Accept-Encoding": "gzip",
|
| 291 |
+
"X-Subscription-Token": BRAVE_API_KEY,
|
| 292 |
+
}
|
| 293 |
+
params = {"q": query, "count": min(count, 20), "search_lang": "ko", "country": "KR"}
|
| 294 |
+
try:
|
| 295 |
+
resp = requests.get(BRAVE_URL, headers=headers, params=params, timeout=15)
|
| 296 |
+
resp.raise_for_status()
|
| 297 |
+
data = resp.json()
|
| 298 |
+
results = []
|
| 299 |
+
for item in data.get("web", {}).get("results", []):
|
| 300 |
+
results.append(SearchResult(
|
| 301 |
+
title=item.get("title",""),
|
| 302 |
+
url=item.get("url",""),
|
| 303 |
+
description=item.get("description",""),
|
| 304 |
+
source=item.get("meta_url",{}).get("hostname",""),
|
| 305 |
+
))
|
| 306 |
+
return results
|
| 307 |
+
except Exception as e:
|
| 308 |
+
return [SearchResult(title=f"๊ฒ์ ์ค๋ฅ: {e}", url="", description="", source="")]
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
def extract_additional_search_queries(text: str) -> List[str]:
|
| 312 |
+
"""์์ด์ ํธ ์ถ๋ ฅ์์ [์ถ๊ฐ๊ฒ์: "..."] ํจํด ์ถ์ถ"""
|
| 313 |
+
return re.findall(r'\[์ถ๊ฐ๊ฒ์:\s*["\']([^"\']+)["\']', text)
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
def format_search_results(results: List[SearchResult]) -> str:
|
| 317 |
+
if not results:
|
| 318 |
+
return "๊ฒ์ ๊ฒฐ๊ณผ ์์"
|
| 319 |
+
lines = []
|
| 320 |
+
for i, r in enumerate(results, 1):
|
| 321 |
+
lines.append(f"{i}. **{r.title}**")
|
| 322 |
+
if r.source:
|
| 323 |
+
lines.append(f" ์ถ์ฒ: {r.source}")
|
| 324 |
+
if r.description:
|
| 325 |
+
lines.append(f" ๋ด์ฉ: {r.description[:200]}")
|
| 326 |
+
lines.append("")
|
| 327 |
+
return "\n".join(lines)
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
# ============================================================
|
| 331 |
+
# โค HWP ํ
ํ๋ฆฟ ์์ง (์ด์ ๋ฒ์ ์ ์ง)
|
| 332 |
+
# ============================================================
|
| 333 |
+
def xml_escape(text: str) -> str:
|
| 334 |
+
return (text.replace("&","&").replace("<","<")
|
| 335 |
+
.replace(">",">").replace('"',""").replace("'","'"))
|
| 336 |
+
|
| 337 |
+
def strip_tags(text: str) -> str:
|
| 338 |
+
return re.sub(r"<[^>]+>","",text,flags=re.DOTALL)
|
| 339 |
+
|
| 340 |
+
def inner_text_from_p(p_xml: str) -> str:
|
| 341 |
+
text = re.sub(r"</?CHAR[^>]*>","",p_xml,flags=re.DOTALL)
|
| 342 |
+
text = strip_tags(text)
|
| 343 |
+
text = html.unescape(text)
|
| 344 |
+
return re.sub(r"\s+"," ",text).strip()
|
| 345 |
+
|
| 346 |
+
def get_attr(xml_snippet: str, name: str, default: str = "") -> str:
|
| 347 |
+
m = re.search(rf'{name}="([^"]*)"', xml_snippet)
|
| 348 |
+
return m.group(1) if m else default
|
| 349 |
+
|
| 350 |
+
def normalize_text_for_title(text: str) -> str:
|
| 351 |
+
for line in text.splitlines():
|
| 352 |
+
s = line.strip()
|
| 353 |
+
if not s: continue
|
| 354 |
+
if s.startswith("# "): return s[2:].strip()[:60]
|
| 355 |
+
return s[:60]
|
| 356 |
+
return "๋ฌธ์"
|
| 357 |
+
|
| 358 |
+
def is_table_line(line: str) -> bool:
|
| 359 |
+
l = line.strip()
|
| 360 |
+
return l.startswith("|") and l.endswith("|") and l.count("|") >= 2
|
| 361 |
+
|
| 362 |
+
@dataclass
|
| 363 |
+
class ParagraphBlock:
|
| 364 |
+
text: str
|
| 365 |
+
kind: str
|
| 366 |
+
|
| 367 |
+
@dataclass
|
| 368 |
+
class TableBlock:
|
| 369 |
+
headers: List[str]
|
| 370 |
+
rows: List[List[str]]
|
| 371 |
+
|
| 372 |
+
Block = Union[ParagraphBlock, TableBlock]
|
| 373 |
+
|
| 374 |
+
def parse_table(lines, start_idx):
|
| 375 |
+
buf, i = [], start_idx
|
| 376 |
+
while i < len(lines) and is_table_line(lines[i]):
|
| 377 |
+
buf.append(lines[i].strip()); i += 1
|
| 378 |
+
if len(buf) < 2: return None, start_idx
|
| 379 |
+
def split_row(row): return [c.strip() for c in row.strip("|").split("|")]
|
| 380 |
+
header = split_row(buf[0])
|
| 381 |
+
raw = buf[1:]
|
| 382 |
+
if raw and re.fullmatch(r"[\|\-\:\s]+", raw[0]): raw = raw[1:]
|
| 383 |
+
rows = [split_row(r) for r in raw]
|
| 384 |
+
if not header: return None, start_idx
|
| 385 |
+
cc = len(header)
|
| 386 |
+
norm = [(r+[""]*(cc-len(r)))[:cc] for r in rows]
|
| 387 |
+
return TableBlock(headers=header, rows=norm), i
|
| 388 |
+
|
| 389 |
+
def parse_document_blocks(text: str) -> List[Block]:
|
| 390 |
+
lines = text.replace("\r\n","\n").replace("\r","\n").split("\n")
|
| 391 |
+
blocks, para_buf = [], []
|
| 392 |
+
|
| 393 |
+
def flush():
|
| 394 |
+
nonlocal para_buf
|
| 395 |
+
if para_buf:
|
| 396 |
+
merged = " ".join(x.strip() for x in para_buf if x.strip()).strip()
|
| 397 |
+
if merged: blocks.append(ParagraphBlock(merged,"paragraph"))
|
| 398 |
+
para_buf = []
|
| 399 |
+
|
| 400 |
+
i = 0
|
| 401 |
+
while i < len(lines):
|
| 402 |
+
line = lines[i].rstrip()
|
| 403 |
+
if not line.strip(): flush(); i+=1; continue
|
| 404 |
+
if is_table_line(line):
|
| 405 |
+
flush()
|
| 406 |
+
tb,ni = parse_table(lines,i)
|
| 407 |
+
if tb: blocks.append(tb); i=ni; continue
|
| 408 |
+
s = line.strip()
|
| 409 |
+
if s.startswith("# "): flush(); blocks.append(ParagraphBlock(s[2:].strip(),"title")); i+=1; continue
|
| 410 |
+
if s.startswith("## "): flush(); blocks.append(ParagraphBlock(s[3:].strip(),"section")); i+=1; continue
|
| 411 |
+
if s.startswith("### "): flush(); blocks.append(ParagraphBlock(s[4:].strip(),"subsection")); i+=1; continue
|
| 412 |
+
if re.match(r"^[โ
โ
กโ
ขโ
ฃโ
คโ
ฅโ
ฆโ
งโ
จโ
ฉ]+\.\s*",s): flush(); blocks.append(ParagraphBlock(s,"section")); i+=1; continue
|
| 413 |
+
if re.match(r"^\d+\.\s*",s): flush(); blocks.append(ParagraphBlock(s,"subsection")); i+=1; continue
|
| 414 |
+
if s.startswith(("- ","* ","โข ","โ ")):
|
| 415 |
+
flush()
|
| 416 |
+
bt = re.sub(r"^(-|\*|โข|โ)\s+","",s).strip()
|
| 417 |
+
blocks.append(ParagraphBlock(bt,"bullet")); i+=1; continue
|
| 418 |
+
para_buf.append(s); i+=1
|
| 419 |
+
flush()
|
| 420 |
+
return blocks
|
| 421 |
+
|
| 422 |
+
@dataclass
|
| 423 |
+
class ParagraphStyleRef:
|
| 424 |
+
para_shape: str; char_shape: str; style: str = "0"
|
| 425 |
+
|
| 426 |
+
@dataclass
|
| 427 |
+
class TableStyleRef:
|
| 428 |
+
table_borderfill: str
|
| 429 |
+
header_borderfills: List[str]
|
| 430 |
+
body_borderfills: List[str]
|
| 431 |
+
header_para_shape: str; header_char_shape: str
|
| 432 |
+
body_para_shape: str; body_char_shape: str
|
| 433 |
+
cell_margin_top: str = "141"; cell_margin_bottom: str = "141"
|
| 434 |
+
cell_margin_left: str = "510"; cell_margin_right: str = "510"
|
| 435 |
+
|
| 436 |
+
class HWPTemplateEngine:
|
| 437 |
+
def __init__(self, template_hml_path: str):
|
| 438 |
+
if not os.path.exists(template_hml_path):
|
| 439 |
+
raise FileNotFoundError(f"ํ
ํ๋ฆฟ ์์: {template_hml_path}")
|
| 440 |
+
self.raw = self._read(template_hml_path)
|
| 441 |
+
self.xml_decl = self._xml_decl(self.raw)
|
| 442 |
+
self.root_open = self._root_open(self.raw)
|
| 443 |
+
self.head_xml = self._head(self.raw)
|
| 444 |
+
self.tail_xml = self._tail(self.raw)
|
| 445 |
+
self.section_setup = self._section_setup(self.raw)
|
| 446 |
+
self.title_style = ParagraphStyleRef("0","0","0")
|
| 447 |
+
self.section_style = ParagraphStyleRef("0","0","0")
|
| 448 |
+
self.subsect_style = ParagraphStyleRef("0","0","0")
|
| 449 |
+
self.body_style = ParagraphStyleRef("0","0","0")
|
| 450 |
+
self.bullet_style = ParagraphStyleRef("0","0","0")
|
| 451 |
+
self.table_style = TableStyleRef("1",["1"],["1"],"0","0","0","0")
|
| 452 |
+
self._table_center_ps = "0"
|
| 453 |
+
self._extract_styles()
|
| 454 |
+
|
| 455 |
+
@staticmethod
|
| 456 |
+
def _read(path):
|
| 457 |
+
for enc in ("utf-8-sig","utf-16","cp949","utf-8"):
|
| 458 |
+
try:
|
| 459 |
+
with open(path,"r",encoding=enc) as f: return f.read()
|
| 460 |
+
except: pass
|
| 461 |
+
with open(path,"r",encoding="utf-8",errors="ignore") as f: return f.read()
|
| 462 |
+
|
| 463 |
+
@staticmethod
|
| 464 |
+
def _xml_decl(raw):
|
| 465 |
+
m = re.match(r"\s*(<\?xml[^>]+\?>)",raw)
|
| 466 |
+
return m.group(1) if m else '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>'
|
| 467 |
+
|
| 468 |
+
@staticmethod
|
| 469 |
+
def _root_open(raw):
|
| 470 |
+
m = re.search(r"(<HWPML\b[^>]*>)",raw)
|
| 471 |
+
if not m: raise ValueError("<HWPML> ํ๊ทธ ์์")
|
| 472 |
+
return m.group(1)
|
| 473 |
+
|
| 474 |
+
@staticmethod
|
| 475 |
+
def _head(raw):
|
| 476 |
+
m = re.search(r"(<HEAD\b.*?</HEAD>)",raw,flags=re.DOTALL)
|
| 477 |
+
if not m: raise ValueError("<HEAD> ์์")
|
| 478 |
+
return m.group(1)
|
| 479 |
+
|
| 480 |
+
@staticmethod
|
| 481 |
+
def _tail(raw):
|
| 482 |
+
m = re.search(r"(<TAIL>.*?</TAIL>)",raw,flags=re.DOTALL)
|
| 483 |
+
return m.group(1) if m else ""
|
| 484 |
+
|
| 485 |
+
@staticmethod
|
| 486 |
+
def _section_setup(raw):
|
| 487 |
+
"""SECDEF ์์๋ง ์ถ์ถํ์ฌ ์ต์ P ํ๊ทธ๋ก ๊ฐ์ธ ๋ฐํ.
|
| 488 |
+
ํ
ํ๋ฆฟ์ ํ์ง ์ฝํ
์ธ (๋ก๊ณ , ์ด๋ฏธ์ง, ๋ชฉ์ฐจ ๋ฑ)๋ฅผ ์ ์ธํ๊ณ
|
| 489 |
+
ํ์ด์ง ์ค์ (์ฉ์ง, ์ฌ๋ฐฑ, ๋จธ๋ฆฌ๋ง/๊ผฌ๋ฆฌ๋ง ๋ฑ)๋ง ๊ฐ์ ธ์ด."""
|
| 490 |
+
import xml.etree.ElementTree as _ET
|
| 491 |
+
try:
|
| 492 |
+
root = _ET.fromstring(raw)
|
| 493 |
+
except _ET.ParseError:
|
| 494 |
+
return ""
|
| 495 |
+
section = root.find('BODY')
|
| 496 |
+
if section is None: return ""
|
| 497 |
+
section = section.find('SECTION')
|
| 498 |
+
if section is None: return ""
|
| 499 |
+
first_p = list(section)[0] if len(list(section)) > 0 else None
|
| 500 |
+
if first_p is None: return ""
|
| 501 |
+
# SECDEF ์์ ํ์
|
| 502 |
+
for text_elem in first_p.findall('TEXT'):
|
| 503 |
+
secdef = text_elem.find('SECDEF')
|
| 504 |
+
if secdef is not None:
|
| 505 |
+
secdef_str = _ET.tostring(secdef, encoding='unicode')
|
| 506 |
+
ps = first_p.get('ParaShape', '0')
|
| 507 |
+
st = first_p.get('Style', '0')
|
| 508 |
+
cs = text_elem.get('CharShape', '0')
|
| 509 |
+
return (f'<P ParaShape="{ps}" Style="{st}">'
|
| 510 |
+
f'<TEXT CharShape="{cs}">{secdef_str}'
|
| 511 |
+
f'<CHAR/></TEXT></P>')
|
| 512 |
+
return ""
|
| 513 |
+
|
| 514 |
+
def _extract_styles(self):
|
| 515 |
+
"""ํ
ํ๋ฆฟ์์ ์คํ์ผ์ ์ถ์ถํ๋, XML ํ์๋ก Align/Font ํฌ๊ธฐ๋ฅผ ๊ฒ์ฆ"""
|
| 516 |
+
import xml.etree.ElementTree as _ET
|
| 517 |
+
try:
|
| 518 |
+
root = _ET.fromstring(self.raw)
|
| 519 |
+
except _ET.ParseError:
|
| 520 |
+
self._extract_table()
|
| 521 |
+
return
|
| 522 |
+
|
| 523 |
+
mt = root.find('HEAD')
|
| 524 |
+
if mt is not None:
|
| 525 |
+
mt = mt.find('MAPPINGTABLE')
|
| 526 |
+
|
| 527 |
+
# ParaShape/CharShape ๋ฃฉ์
ํ
์ด๋ธ
|
| 528 |
+
ps_info = {} # id -> {align, left, indent}
|
| 529 |
+
cs_info = {} # id -> {height, bold}
|
| 530 |
+
_ps_el = None
|
| 531 |
+
_cs_el = None
|
| 532 |
+
if mt is not None:
|
| 533 |
+
_ps_el = mt.find('PARASHAPELIST')
|
| 534 |
+
_cs_el = mt.find('CHARSHAPELIST')
|
| 535 |
+
for ps in (_ps_el if _ps_el is not None else []):
|
| 536 |
+
pid = ps.get('Id', '0')
|
| 537 |
+
m = ps.find('PARAMARGIN')
|
| 538 |
+
ps_info[pid] = {
|
| 539 |
+
'align': ps.get('Align', 'Justify'),
|
| 540 |
+
'left': int(m.get('Left', '0')) if m is not None else 0,
|
| 541 |
+
'indent': int(m.get('Indent', '0')) if m is not None else 0,
|
| 542 |
+
}
|
| 543 |
+
for cs in (_cs_el if _cs_el is not None else []):
|
| 544 |
+
cid = cs.get('Id', '0')
|
| 545 |
+
cs_info[cid] = {
|
| 546 |
+
'height': int(cs.get('Height', '0')),
|
| 547 |
+
'bold': cs.get('Bold', 'false'),
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
def is_valid_style(ps_id, cs_id, allow_center=False):
|
| 551 |
+
"""Center ์ ๋ ฌ, ์์ Left, ๊ณผ๋ํ ์์ Indent, ๋น์ ์ ํฐํธ ํฌ๊ธฐ ํํฐ"""
|
| 552 |
+
ps = ps_info.get(ps_id, {})
|
| 553 |
+
cs = cs_info.get(cs_id, {})
|
| 554 |
+
if not allow_center and ps.get('align') == 'Center':
|
| 555 |
+
return False
|
| 556 |
+
if ps.get('left', 0) < 0:
|
| 557 |
+
return False
|
| 558 |
+
if ps.get('indent', 0) < -7000:
|
| 559 |
+
return False
|
| 560 |
+
h = cs.get('height', 0)
|
| 561 |
+
if h < 800 or h > 2000: # 8pt~20pt ๋ฒ์๋ง ํ์ฉ
|
| 562 |
+
return False
|
| 563 |
+
return True
|
| 564 |
+
|
| 565 |
+
# ๋ณธ๋ฌธ P ํ๊ทธ์์ ์คํ์ผ ์์ง (TABLE/PICTURE ๋ด๋ถ ์ ์ธ)
|
| 566 |
+
section = root.find('BODY')
|
| 567 |
+
if section is not None:
|
| 568 |
+
section = section.find('SECTION')
|
| 569 |
+
if section is None:
|
| 570 |
+
self._extract_table()
|
| 571 |
+
return
|
| 572 |
+
|
| 573 |
+
ex = []
|
| 574 |
+
for p_elem in list(section):
|
| 575 |
+
p_str = _ET.tostring(p_elem, encoding='unicode')
|
| 576 |
+
if '<SECDEF' in p_str:
|
| 577 |
+
continue
|
| 578 |
+
if '<TABLE' in p_str or '<PICTURE' in p_str:
|
| 579 |
+
continue
|
| 580 |
+
# ์ต์์ P๋ง (์์ ํ
์คํธ ๋ฌธ๋จ)
|
| 581 |
+
ps = p_elem.get('ParaShape', '0')
|
| 582 |
+
st = p_elem.get('Style', '0')
|
| 583 |
+
first_text = p_elem.find('TEXT')
|
| 584 |
+
cs = first_text.get('CharShape', '0') if first_text is not None else '0'
|
| 585 |
+
text = ''.join(p_elem.itertext()).strip()
|
| 586 |
+
if not text or '๊ทธ๋ฆผ์
๋๋ค' in text:
|
| 587 |
+
continue
|
| 588 |
+
ex.append({"text": text, "para_shape": ps, "char_shape": cs, "style": st})
|
| 589 |
+
|
| 590 |
+
def pick_validated(*patterns, allow_center=False):
|
| 591 |
+
for p in patterns:
|
| 592 |
+
for it in ex:
|
| 593 |
+
if re.search(p, it["text"]):
|
| 594 |
+
if is_valid_style(it["para_shape"], it["char_shape"], allow_center):
|
| 595 |
+
return it
|
| 596 |
+
return None
|
| 597 |
+
|
| 598 |
+
def apply(ref_attr, item):
|
| 599 |
+
if item:
|
| 600 |
+
setattr(self, ref_attr, ParagraphStyleRef(
|
| 601 |
+
item["para_shape"], item["char_shape"], item["style"]))
|
| 602 |
+
|
| 603 |
+
# ์ ๋ชฉ: โก ์น์
ํค๋ ์คํ์ผ ํ์ฉ
|
| 604 |
+
apply("title_style", pick_validated(
|
| 605 |
+
r"^โก\s", # โก ์ฌ๊ฐ๋ถ๋ฆฟ (์น์
ํค๋๊ธ)
|
| 606 |
+
r"^[โ
โ
กโ
ขโ
ฃโ
ค]",
|
| 607 |
+
allow_center=False))
|
| 608 |
+
# ์น์
(โ
. โ
ก.): โก ์คํ์ผ
|
| 609 |
+
apply("section_style", pick_validated(
|
| 610 |
+
r"^โก\s",
|
| 611 |
+
r"^[โ
โ
กโ
ขโ
ฃโ
ค]",
|
| 612 |
+
allow_center=False))
|
| 613 |
+
# ์ํญ๋ชฉ (1. 2.): ์ซ์+์ +ํ๊ธ (๋ ์ง "2026. 2." ๋งค์นญ ๋ฐฉ์ง)
|
| 614 |
+
apply("subsect_style", pick_validated(
|
| 615 |
+
r"^[1-9]\.\s*[๊ฐ-ํฃ\w]", # "1. ์ฌ์
" ํํ๋ง ๋งค์นญ
|
| 616 |
+
r"^\(\d+\)",
|
| 617 |
+
allow_center=False))
|
| 618 |
+
# ๋ถ๋ฆฟ (โ)
|
| 619 |
+
apply("bullet_style", pick_validated(r"^โ\s", r"^โ"))
|
| 620 |
+
# ๋ณธ๋ฌธ/์ํญ๋ชฉ: ๋ถ๋ฆฟ๊ณผ ๋์ผ ์ค๊ฐ๊ฒฉ์ด๋ Indent=0 (์ค๋ฐ๊ฟ ์ ๋ค์ฌ์ฐ๊ธฐ ๋ฐฉ์ง)
|
| 621 |
+
# ๋ถ๋ฆฟ์ LineSpacing์ ์ฐพ๊ณ , ๊ฐ์ LS + Indent=0์ธ ParaShape ํ์
|
| 622 |
+
bullet_ls = None
|
| 623 |
+
if self.bullet_style.para_shape != "0":
|
| 624 |
+
for ps in (_ps_el if _ps_el is not None else []):
|
| 625 |
+
if ps.get('Id') == self.bullet_style.para_shape:
|
| 626 |
+
bm = ps.find('PARAMARGIN')
|
| 627 |
+
bullet_ls = bm.get('LineSpacing') if bm is not None else None
|
| 628 |
+
break
|
| 629 |
+
|
| 630 |
+
body_ps = "0" # ํด๋ฐฑ
|
| 631 |
+
if bullet_ls:
|
| 632 |
+
for ps in (_ps_el if _ps_el is not None else []):
|
| 633 |
+
pm = ps.find('PARAMARGIN')
|
| 634 |
+
if pm is None: continue
|
| 635 |
+
if (ps.get('Align') in ('Justify', 'Left') and
|
| 636 |
+
pm.get('Left', '0') == '0' and
|
| 637 |
+
pm.get('Indent', '0') == '0' and
|
| 638 |
+
pm.get('LineSpacing') == bullet_ls):
|
| 639 |
+
body_ps = ps.get('Id')
|
| 640 |
+
break
|
| 641 |
+
|
| 642 |
+
if self.bullet_style.char_shape != "0":
|
| 643 |
+
self.body_style = ParagraphStyleRef(body_ps, self.bullet_style.char_shape, "0")
|
| 644 |
+
self.subsect_style = ParagraphStyleRef(body_ps, self.bullet_style.char_shape, "0")
|
| 645 |
+
self.bullet_style = ParagraphStyleRef(body_ps, self.bullet_style.char_shape, "0")
|
| 646 |
+
|
| 647 |
+
# ์ ๋ชฉ/์น์
๋ Indent=0 ParaShape ์ฌ์ฉ (์ค๋ฐ๊ฟ ์ ๋ค์ฌ์ฐ๊ธฐ ๋ฐฉ์ง)
|
| 648 |
+
# CharShape๋ ๊ธฐ์กด ์ถ์ถ๊ฐ(HYํค๋๋ผ์ธM ๋ฑ) ์ ์ง
|
| 649 |
+
title_cs = self.title_style.char_shape if self.title_style.char_shape != "0" else self.bullet_style.char_shape
|
| 650 |
+
section_cs = self.section_style.char_shape if self.section_style.char_shape != "0" else self.bullet_style.char_shape
|
| 651 |
+
self.title_style = ParagraphStyleRef(body_ps, title_cs, "0")
|
| 652 |
+
self.section_style = ParagraphStyleRef(body_ps, section_cs, "0")
|
| 653 |
+
|
| 654 |
+
# ํ ์
์ฉ Center ์ ๋ ฌ ParaShape ํ์
|
| 655 |
+
self._table_center_ps = "0"
|
| 656 |
+
if bullet_ls:
|
| 657 |
+
for ps in (_ps_el if _ps_el is not None else []):
|
| 658 |
+
pm = ps.find('PARAMARGIN')
|
| 659 |
+
if pm is None: continue
|
| 660 |
+
if (ps.get('Align') == 'Center' and
|
| 661 |
+
pm.get('Left', '0') == '0' and
|
| 662 |
+
pm.get('Indent', '0') == '0' and
|
| 663 |
+
pm.get('LineSpacing') == bullet_ls):
|
| 664 |
+
self._table_center_ps = ps.get('Id')
|
| 665 |
+
break
|
| 666 |
+
# ํด๋ฐฑ: ๊ฐ์ LS ์์ผ๋ฉด ์๋ฌด Center+Indent=0
|
| 667 |
+
if self._table_center_ps == "0":
|
| 668 |
+
for ps in (_ps_el if _ps_el is not None else []):
|
| 669 |
+
pm = ps.find('PARAMARGIN')
|
| 670 |
+
if pm is None: continue
|
| 671 |
+
if (ps.get('Align') == 'Center' and
|
| 672 |
+
pm.get('Left', '0') == '0' and
|
| 673 |
+
pm.get('Indent', '0') == '0'):
|
| 674 |
+
self._table_center_ps = ps.get('Id')
|
| 675 |
+
break
|
| 676 |
+
|
| 677 |
+
# ํด๋ฐฑ: ๋ฏธ๋งค์นญ ์คํ์ผ์ ํฉ๋ฆฌ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก
|
| 678 |
+
bs = self.body_style
|
| 679 |
+
if self.title_style.para_shape == "0" and self.title_style.char_shape == "0":
|
| 680 |
+
self.title_style = bs
|
| 681 |
+
if self.section_style.para_shape == "0" and self.section_style.char_shape == "0":
|
| 682 |
+
self.section_style = bs
|
| 683 |
+
if self.subsect_style.para_shape == "0" and self.subsect_style.char_shape == "0":
|
| 684 |
+
self.subsect_style = bs
|
| 685 |
+
|
| 686 |
+
self._extract_table()
|
| 687 |
+
|
| 688 |
+
def _extract_table(self):
|
| 689 |
+
"""ํ
ํ๋ฆฟ์์ ๋ฐ์ดํฐ ํ ์คํ์ผ ์ถ์ถ (๋ ์ด์์ ํ ์ ์ธ)"""
|
| 690 |
+
import xml.etree.ElementTree as _ET
|
| 691 |
+
try:
|
| 692 |
+
root = _ET.fromstring(self.raw)
|
| 693 |
+
except _ET.ParseError:
|
| 694 |
+
return
|
| 695 |
+
# 2์ด ์ด์, 2ํ ์ด์์ธ ๋ฐ์ดํฐ ํ ์ฐพ๊ธฐ
|
| 696 |
+
for tbl in root.iter('TABLE'):
|
| 697 |
+
cc = int(tbl.get('ColCount', '0'))
|
| 698 |
+
rc = int(tbl.get('RowCount', '0'))
|
| 699 |
+
if cc < 2 or rc < 2:
|
| 700 |
+
continue
|
| 701 |
+
bf = tbl.get('BorderFill', '3')
|
| 702 |
+
rows = list(tbl.findall('ROW'))
|
| 703 |
+
if len(rows) < 2:
|
| 704 |
+
continue
|
| 705 |
+
hc = list(rows[0].findall('CELL'))
|
| 706 |
+
bc = list(rows[1].findall('CELL'))
|
| 707 |
+
if not hc or not bc:
|
| 708 |
+
continue
|
| 709 |
+
|
| 710 |
+
def cell_style(cell_elem):
|
| 711 |
+
pl = cell_elem.find('PARALIST')
|
| 712 |
+
if pl is None: return ("0", "0")
|
| 713 |
+
p = pl.find('P')
|
| 714 |
+
if p is None: return ("0", "0")
|
| 715 |
+
ps = p.get('ParaShape', '0')
|
| 716 |
+
t = p.find('TEXT')
|
| 717 |
+
cs = t.get('CharShape', '0') if t is not None else '0'
|
| 718 |
+
return (ps, cs)
|
| 719 |
+
|
| 720 |
+
hp, hch = cell_style(hc[0])
|
| 721 |
+
bp, bch = cell_style(bc[0])
|
| 722 |
+
fc = hc[0]
|
| 723 |
+
cm = fc.find('CELLMARGIN')
|
| 724 |
+
|
| 725 |
+
self.table_style = TableStyleRef(
|
| 726 |
+
bf,
|
| 727 |
+
[c.get('BorderFill', '3') for c in hc] or ["3"],
|
| 728 |
+
[c.get('BorderFill', '3') for c in bc] or ["3"],
|
| 729 |
+
hp, hch, bp, bch,
|
| 730 |
+
cm.get('Top', '141') if cm is not None else '141',
|
| 731 |
+
cm.get('Bottom', '141') if cm is not None else '141',
|
| 732 |
+
cm.get('Left', '510') if cm is not None else '510',
|
| 733 |
+
cm.get('Right', '510') if cm is not None else '510',
|
| 734 |
+
)
|
| 735 |
+
return
|
| 736 |
+
|
| 737 |
+
def _p(self,text,s: ParagraphStyleRef):
|
| 738 |
+
clean = re.sub(r'\*\*([^*]+)\*\*', r'\1', text) # ** ๋งํฌ๋ค์ด ๋ณผ๋ ์ ๊ฑฐ
|
| 739 |
+
e = xml_escape(clean)
|
| 740 |
+
return f'<P ParaShape="{s.para_shape}" Style="{s.style}"><TEXT CharShape="{s.char_shape}"><CHAR>{e}</CHAR></TEXT></P>'
|
| 741 |
+
|
| 742 |
+
def _bullet(self,text):
|
| 743 |
+
clean = re.sub(r'\*\*([^*]+)\*\*', r'\1', text) # ** ์ ๊ฑฐ
|
| 744 |
+
e = xml_escape(f"โ {clean}"); s = self.bullet_style
|
| 745 |
+
return f'<P ParaShape="{s.para_shape}" Style="{s.style}"><TEXT CharShape="{s.char_shape}"><CHAR>{e}</CHAR></TEXT></P>'
|
| 746 |
+
|
| 747 |
+
def _table(self,block: TableBlock):
|
| 748 |
+
cc = max(1,len(block.headers)); rc = 1+len(block.rows)
|
| 749 |
+
tw = 44790; ws = [tw//cc]*cc; ws[-1] += tw-sum(ws)
|
| 750 |
+
ts = self.table_style
|
| 751 |
+
|
| 752 |
+
def clean_cell_text(text):
|
| 753 |
+
"""ํ ์
ํ
์คํธ ์ ๋ฆฌ: ** ์ ๊ฑฐ, <br> โ ์ค๋ฐ๊ฟ, โข ์ ์ค๋ฐ๊ฟ"""
|
| 754 |
+
t = re.sub(r'\*\*([^*]+)\*\*', r'\1', text) # ** ์ ๊ฑฐ
|
| 755 |
+
t = re.sub(r'<br\s*/?>', '\n', t) # <br> โ ์ค๋ฐ๊ฟ
|
| 756 |
+
t = re.sub(r'(?<!\n)โข', '\nโข', t) # โข ์์ ์ค๋ฐ๊ฟ (์ด๋ฏธ ์์ผ๋ฉด ์คํต)
|
| 757 |
+
t = t.strip()
|
| 758 |
+
return t
|
| 759 |
+
|
| 760 |
+
def cell(text,ri,ci,hdr):
|
| 761 |
+
if hdr:
|
| 762 |
+
bf = ts.header_borderfills[0]
|
| 763 |
+
else:
|
| 764 |
+
bfs = ts.body_borderfills
|
| 765 |
+
bf = bfs[min(ci,len(bfs)-1)]
|
| 766 |
+
cs = ts.header_char_shape if hdr else ts.body_char_shape
|
| 767 |
+
cleaned = clean_cell_text(text)
|
| 768 |
+
|
| 769 |
+
# ์
๋ด๋ถ P ํ๊ทธ: ๊ฐ์ด๋ฐ ์ ๋ ฌ PS ์ฌ์ฉ, ์ฌ๋ฌ ์ค์ด๋ฉด ์ฌ๋ฌ P
|
| 770 |
+
lines = cleaned.split('\n')
|
| 771 |
+
p_tags = []
|
| 772 |
+
for line in lines:
|
| 773 |
+
line = line.strip()
|
| 774 |
+
if line:
|
| 775 |
+
e = xml_escape(line)
|
| 776 |
+
p_tags.append(f'<P ParaShape="{self._table_center_ps}" Style="0">'
|
| 777 |
+
f'<TEXT CharShape="{cs}"><CHAR>{e}</CHAR></TEXT></P>')
|
| 778 |
+
if not p_tags:
|
| 779 |
+
p_tags.append(f'<P ParaShape="{self._table_center_ps}" Style="0">'
|
| 780 |
+
f'<TEXT CharShape="{cs}"><CHAR> </CHAR></TEXT></P>')
|
| 781 |
+
|
| 782 |
+
return (f'<CELL BorderFill="{bf}" ColAddr="{ci}" ColSpan="1" Dirty="false" Editable="false"'
|
| 783 |
+
f' HasMargin="true" Header="{"true" if hdr else "false"}" Height="1800"'
|
| 784 |
+
f' Protect="false" RowAddr="{ri}" RowSpan="1" Width="{ws[ci]}">'
|
| 785 |
+
f'<CELLMARGIN Bottom="{ts.cell_margin_bottom}" Left="{ts.cell_margin_left}"'
|
| 786 |
+
f' Right="{ts.cell_margin_right}" Top="{ts.cell_margin_top}"/>'
|
| 787 |
+
f'<PARALIST LineWrap="Break" LinkListID="0" LinkListIDNext="0" TextDirection="0" VertAlign="Center">'
|
| 788 |
+
f'{"".join(p_tags)}'
|
| 789 |
+
f'</PARALIST></CELL>')
|
| 790 |
+
|
| 791 |
+
rows_xml = ["<ROW>" + "".join(cell(block.headers[i],0,i,True) for i in range(cc)) + "</ROW>"]
|
| 792 |
+
for ri,row in enumerate(block.rows,1):
|
| 793 |
+
nr = (row+[""]*(cc-len(row)))[:cc]
|
| 794 |
+
rows_xml.append("<ROW>" + "".join(cell(nr[c],ri,c,False) for c in range(cc)) + "</ROW>")
|
| 795 |
+
|
| 796 |
+
bs = self.body_style
|
| 797 |
+
return (f'<P ParaShape="{bs.para_shape}" Style="{bs.style}">'
|
| 798 |
+
f'<TEXT CharShape="{bs.char_shape}">'
|
| 799 |
+
f'<TABLE BorderFill="{ts.table_borderfill}" CellSpacing="0" ColCount="{cc}"'
|
| 800 |
+
f' PageBreak="Cell" RepeatHeader="true" RowCount="{rc}">'
|
| 801 |
+
f'<SHAPEOBJECT InstId="1" Lock="false" NumberingType="Table" ZOrder="1">'
|
| 802 |
+
f'<SIZE Height="{max(2331,rc*1800)}" HeightRelTo="Absolute" Protect="false"'
|
| 803 |
+
f' Width="{tw}" WidthRelTo="Absolute"/>'
|
| 804 |
+
f'<POSITION AffectLSpacing="false" AllowOverlap="false" FlowWithText="true"'
|
| 805 |
+
f' HoldAnchorAndSO="false" HorzAlign="Left" HorzOffset="0" HorzRelTo="Para"'
|
| 806 |
+
f' TreatAsChar="true" VertAlign="Top" VertOffset="0" VertRelTo="Para"/>'
|
| 807 |
+
f'<OUTSIDEMARGIN Bottom="283" Left="283" Right="283" Top="283"/>'
|
| 808 |
+
f'</SHAPEOBJECT>{"".join(rows_xml)}</TABLE>'
|
| 809 |
+
f'<CHAR/></TEXT></P>')
|
| 810 |
+
|
| 811 |
+
def _empty_p(self):
|
| 812 |
+
"""๋น ๋ฌธ๋จ (ํญ๋ชฉ ๊ฐ ๊ฐ๊ฒฉ์ฉ)"""
|
| 813 |
+
bs = self.body_style
|
| 814 |
+
return f'<P ParaShape="{bs.para_shape}" Style="{bs.style}"><TEXT CharShape="{bs.char_shape}"><CHAR> </CHAR></TEXT></P>'
|
| 815 |
+
|
| 816 |
+
def render(self, text: str, doc_title: str = "๋ฌธ์") -> str:
|
| 817 |
+
blocks = parse_document_blocks(text)
|
| 818 |
+
parts = []
|
| 819 |
+
if self.section_setup: parts.append(self.section_setup)
|
| 820 |
+
parts.append(self._p(doc_title, self.title_style))
|
| 821 |
+
title_added = True
|
| 822 |
+
for b in blocks:
|
| 823 |
+
if isinstance(b, TableBlock): parts.append(self._table(b))
|
| 824 |
+
elif b.kind == "title":
|
| 825 |
+
if title_added:
|
| 826 |
+
title_added = False
|
| 827 |
+
else:
|
| 828 |
+
parts.append(self._empty_p())
|
| 829 |
+
parts.append(self._p(b.text, self.title_style))
|
| 830 |
+
elif b.kind == "section":
|
| 831 |
+
parts.append(self._empty_p())
|
| 832 |
+
parts.append(self._p(b.text, self.section_style))
|
| 833 |
+
elif b.kind == "subsection":
|
| 834 |
+
parts.append(self._empty_p())
|
| 835 |
+
parts.append(self._p(b.text, self.subsect_style))
|
| 836 |
+
elif b.kind == "bullet":
|
| 837 |
+
parts.append(self._empty_p())
|
| 838 |
+
parts.append(self._bullet(b.text))
|
| 839 |
+
else: parts.append(self._p(b.text, self.body_style))
|
| 840 |
+
|
| 841 |
+
ts = f"<TITLE>{xml_escape(doc_title)}</TITLE>"
|
| 842 |
+
ta = "<AUTHOR>SOMA Pre-AGI</AUTHOR>"
|
| 843 |
+
td = f"<DATE>{datetime.now().strftime('%Y๋
%m์ %d์ผ')}</DATE>"
|
| 844 |
+
head = self.head_xml
|
| 845 |
+
ds_new = f"<DOCSUMMARY>{ts}{ta}{td}</DOCSUMMARY>"
|
| 846 |
+
if re.search(r"<DOCSUMMARY>.*?</DOCSUMMARY>",head,flags=re.DOTALL):
|
| 847 |
+
head = re.sub(r"<DOCSUMMARY>.*?</DOCSUMMARY>",ds_new,head,flags=re.DOTALL)
|
| 848 |
+
else:
|
| 849 |
+
head = head.replace("</HEAD>",f"{ds_new}</HEAD>")
|
| 850 |
+
return (f'{self.xml_decl}{self.root_open}{head}'
|
| 851 |
+
f'<BODY><SECTION Id="0">{"".join(parts)}</SECTION></BODY>'
|
| 852 |
+
f'{self.tail_xml}</HWPML>')
|
| 853 |
+
|
| 854 |
+
def save(self, text: str, doc_title: str = "๋ฌธ์") -> str:
|
| 855 |
+
content = self.render(text, doc_title)
|
| 856 |
+
f = tempfile.NamedTemporaryFile(mode="w",suffix=".hml",delete=False,encoding="utf-8-sig")
|
| 857 |
+
f.write(content); f.close()
|
| 858 |
+
return f.name
|
| 859 |
+
|
| 860 |
+
|
| 861 |
+
_engine: Optional[HWPTemplateEngine] = None
|
| 862 |
+
def get_engine() -> HWPTemplateEngine:
|
| 863 |
+
global _engine
|
| 864 |
+
if _engine: return _engine
|
| 865 |
+
for path in (PRIMARY_TEMPLATE, FALLBACK_TEMPLATE):
|
| 866 |
+
if os.path.exists(path):
|
| 867 |
+
_engine = HWPTemplateEngine(path); return _engine
|
| 868 |
+
raise FileNotFoundError("HML ํ
ํ๋ฆฟ ํ์ผ์ด ์์ต๋๋ค.")
|
| 869 |
+
|
| 870 |
+
def generate_hml(content: str) -> str:
|
| 871 |
+
engine = get_engine()
|
| 872 |
+
title = normalize_text_for_title(content)
|
| 873 |
+
return engine.save(content.strip(), doc_title=title)
|
| 874 |
+
|
| 875 |
+
|
| 876 |
+
# ============================================================
|
| 877 |
+
# โฅ SOMA ํ์ดํ๋ผ์ธ (Metacognitive Pipeline)
|
| 878 |
+
# ============================================================
|
| 879 |
+
@dataclass
|
| 880 |
+
class AgentState:
|
| 881 |
+
active: str = "ๆฐด"
|
| 882 |
+
log: List[str] = field(default_factory=list)
|
| 883 |
+
search_count: int = 0
|
| 884 |
+
search_log: List[str] = field(default_factory=list)
|
| 885 |
+
search_results_all: str = ""
|
| 886 |
+
water_output: str = ""
|
| 887 |
+
wood_output: str = ""
|
| 888 |
+
fire_output: str = ""
|
| 889 |
+
earth_output: str = ""
|
| 890 |
+
gold_output: str = ""
|
| 891 |
+
final_doc: str = ""
|
| 892 |
+
|
| 893 |
+
|
| 894 |
+
def soma_pipeline(
|
| 895 |
+
user_prompt: str,
|
| 896 |
+
max_search: int = 30,
|
| 897 |
+
temperature: float = 0.6,
|
| 898 |
+
) -> Generator:
|
| 899 |
+
"""
|
| 900 |
+
SOMA Metacognitive Pipeline:
|
| 901 |
+
RESEARCH(ํ์) โ STRUCTURE(์ค๊ณ) โ ARGUMENT(๊ฒ์ฆยท์ถ๊ฐ๊ฒ์) โ EVIDENCE(ํตํฉ) โ IMPACT(์ ์ )
|
| 902 |
+
Cross-Check: IMPACTโSTRUCTURE ๋นํ, ARGUMENTโIMPACT ์ฌ๊ฒํ
|
| 903 |
+
"""
|
| 904 |
+
st = AgentState()
|
| 905 |
+
max_search = min(max_search, MAX_SEARCHES)
|
| 906 |
+
|
| 907 |
+
def log(msg):
|
| 908 |
+
st.log.append(msg)
|
| 909 |
+
return msg
|
| 910 |
+
|
| 911 |
+
def emit(data: dict):
|
| 912 |
+
yield data
|
| 913 |
+
|
| 914 |
+
# โโ ํฌํผ: ํ์ฌ ์ํ ์ ์ก
|
| 915 |
+
def state_update(**kwargs):
|
| 916 |
+
return {**kwargs, "log": "\n".join(st.log[-30:]),
|
| 917 |
+
"search_count": st.search_count,
|
| 918 |
+
"search_log": "\n".join(st.search_log[-50:])}
|
| 919 |
+
|
| 920 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 921 |
+
# STAGE 1: ๆฐด โ ์ด๊ธฐ ๊ฒ์ ์ฟผ๋ฆฌ ์์ฑ
|
| 922 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 923 |
+
st.active = "ๆฐด"
|
| 924 |
+
log(f"๐ [RESEARCH] ์ด๊ธฐ ๊ฒ์ ์ฟผ๋ฆฌ ์์ฑ ์ค...")
|
| 925 |
+
yield state_update(active="ๆฐด", stream="๐ RESEARCH ์์ด์ ํธ: ๊ฒ์ ์ฟผ๋ฆฌ ์์ฑ ์ค...\n", final_doc="")
|
| 926 |
+
|
| 927 |
+
query_gen_prompt = (
|
| 928 |
+
f"์ฌ์ฉ์ ์์ฒญ: {user_prompt}\n\n"
|
| 929 |
+
"์ด ์ฃผ์ ์ ๋ํด ๊ณต์ ๋ฌธ์ ์์ฑ์ ํ์ํ ํต์ฌ ๊ฒ์ ์ฟผ๋ฆฌ 5๊ฐ๋ฅผ ์์ฑํ์ธ์.\n"
|
| 930 |
+
'ํ์: [์ฟผ๋ฆฌ1], [์ฟผ๋ฆฌ2], [์ฟผ๋ฆฌ3], [์ฟผ๋ฆฌ4], [์ฟผ๋ฆฌ5]\n'
|
| 931 |
+
"ํ๊ตญ์ด๋ก, ๊ตฌ์ฒด์ ์ด๊ณ ์ฌ์ค ๊ฒ์ฆ ๊ฐ๋ฅํ ์ฟผ๋ฆฌ๋ง ์์ฑํ์ธ์."
|
| 932 |
+
)
|
| 933 |
+
query_resp = fireworks_stream_collect([{"role":"user","content":query_gen_prompt}],
|
| 934 |
+
AGENT_SYSTEM["ๆฐด"], max_tokens=512, temperature=0.3)
|
| 935 |
+
initial_queries = re.findall(r'\[([^\[\]]{3,80})\]', query_resp)
|
| 936 |
+
if not initial_queries:
|
| 937 |
+
initial_queries = [user_prompt[:60]]
|
| 938 |
+
log(f"๐ง ์ด๊ธฐ ์ฟผ๋ฆฌ {len(initial_queries)}๊ฐ ์์ฑ: {initial_queries}")
|
| 939 |
+
yield state_update(active="ๆฐด", stream=f"๊ฒ์ ์ฟผ๋ฆฌ ์์ฑ ์๋ฃ: {initial_queries}\n\n", final_doc="")
|
| 940 |
+
|
| 941 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 942 |
+
# STAGE 1-B: ๆฐด โ ๋จ๊ณ๋ณ ๊ฒ์ ์คํ
|
| 943 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 944 |
+
pending_queries = list(initial_queries)
|
| 945 |
+
all_results_text = ""
|
| 946 |
+
|
| 947 |
+
while pending_queries and st.search_count < max_search:
|
| 948 |
+
q = pending_queries.pop(0)
|
| 949 |
+
st.search_count += 1
|
| 950 |
+
log(f"๐ [{st.search_count}/{max_search}] ๊ฒ์: {q}")
|
| 951 |
+
st.search_log.append(f"[{st.search_count:03d}] {q}")
|
| 952 |
+
yield state_update(active="ๆฐด",
|
| 953 |
+
stream=f"๐ ๊ฒ์ {st.search_count}: {q}\n",
|
| 954 |
+
final_doc="")
|
| 955 |
+
|
| 956 |
+
results = brave_search(q, count=10)
|
| 957 |
+
batch_text = f"\n=== ๊ฒ์ {st.search_count}: {q} ===\n" + format_search_results(results)
|
| 958 |
+
all_results_text += batch_text
|
| 959 |
+
|
| 960 |
+
# ๆฐด ์์ด์ ํธ๊ฐ ๊ฒฐ๊ณผ ๋ถ์ & ์ถ๊ฐ ์ฟผ๋ฆฌ ์ ์ (๋งค 5ํ๋ง๋ค)
|
| 961 |
+
if st.search_count % 5 == 0 and st.search_count < max_search - 5:
|
| 962 |
+
analysis = fireworks_stream_collect(
|
| 963 |
+
[{"role":"user","content": f"๊ฒ์ ๊ฒฐ๊ณผ:\n{batch_text}\n\n์ฃผ์ : {user_prompt}\n์ถ๊ฐ ๊ฒ์์ด ํ์ํ ํค์๋๋ฅผ [์ถ๊ฐ๊ฒ์: 'ํค์๋'] ํ์์ผ๋ก ์ต๋ 3๊ฐ ์ ์ํ์ธ์."}],
|
| 964 |
+
AGENT_SYSTEM["ๆฐด"], max_tokens=300, temperature=0.3
|
| 965 |
+
)
|
| 966 |
+
new_qs = extract_additional_search_queries(analysis)
|
| 967 |
+
for nq in new_qs:
|
| 968 |
+
if nq not in [x for x in pending_queries] and st.search_count + len(pending_queries) < max_search:
|
| 969 |
+
pending_queries.append(nq)
|
| 970 |
+
log(f"๐ง ์ถ๊ฐ ์ฟผ๋ฆฌ ์ถ๊ฐ: {nq}")
|
| 971 |
+
yield state_update(active="ๆฐด", stream=f" โ ์ถ๊ฐ ์ฟผ๋ฆฌ {len(new_qs)}๊ฐ ๋ฐ๊ฒฌ\n", final_doc="")
|
| 972 |
+
|
| 973 |
+
st.water_output = all_results_text
|
| 974 |
+
log(f"๐ RESEARCH ์๋ฃ: ์ด {st.search_count}ํ ๊ฒ์")
|
| 975 |
+
yield state_update(active="ๆฐด", stream=f"\nโ
RESEARCH ์๋ฃ: {st.search_count}ํ ๊ฒ์\n\n", final_doc="")
|
| 976 |
+
|
| 977 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 978 |
+
# STAGE 2: ๆจ โ ๋ฌธ์ ๊ตฌ์กฐ ๊ธฐํ
|
| 979 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 980 |
+
st.active = "ๆจ"
|
| 981 |
+
log("๐งฉ [STRUCTURE] ๋ฌธ์ ๊ตฌ์กฐ ์ค๊ณ ์ค...")
|
| 982 |
+
yield state_update(active="ๆจ", stream="๐งฉ STRUCTURE ์์ด์ ํธ: ๋ฌธ์ ๊ตฌ์กฐ ์ค๊ณ ์ค...\n", final_doc="")
|
| 983 |
+
|
| 984 |
+
wood_prompt = (
|
| 985 |
+
f"[์ฌ์ฉ์ ์์ฒญ]\n{user_prompt}\n\n"
|
| 986 |
+
f"[์์ง๋ ๊ฒ์ ๋ฐ์ดํฐ ์์ฝ]\n{all_results_text[:6000]}\n\n"
|
| 987 |
+
"์ ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก HWP ๊ณต๋ฌธ์ Markdown ๊ตฌ์กฐ๋ฅผ ์ค๊ณํ์ธ์. "
|
| 988 |
+
"# ์ ๋ชฉ, ## โ
.~โ
ค., ### ์ํญ๋ชฉ, | ํ, โ ๋ถ๋ฆฟ ํ์์ผ๋ก ์์ฑํ์ธ์."
|
| 989 |
+
)
|
| 990 |
+
wood_stream = fireworks_chat([{"role":"user","content":wood_prompt}],
|
| 991 |
+
AGENT_SYSTEM["ๆจ"], max_tokens=2048, temperature=0.5, stream=True)
|
| 992 |
+
wood_text = ""
|
| 993 |
+
for tok in wood_stream:
|
| 994 |
+
wood_text += tok
|
| 995 |
+
yield state_update(active="ๆจ", stream=tok, final_doc="")
|
| 996 |
+
st.wood_output = wood_text
|
| 997 |
+
log("๐งฉ STRUCTURE ์๋ฃ")
|
| 998 |
+
yield state_update(active="ๆจ", stream="\n\nโ
STRUCTURE ์๋ฃ\n\n", final_doc="")
|
| 999 |
+
|
| 1000 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1001 |
+
# STAGE 3: ็ซ โ ๊ฒ์ฆ & ์ถ๊ฐ๊ฒ์ (์๊ทน: ็ซๅ
้)
|
| 1002 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1003 |
+
st.active = "็ซ"
|
| 1004 |
+
log("๐ฌ [ARGUMENT] ํฉํธ์ฒดํฌ & ๊ฒ์ฆ ์ค...")
|
| 1005 |
+
yield state_update(active="็ซ", stream="๐ฌ ARGUMENT ์์ด์ ํธ: ํฉํธ์ฒดํฌ & ๊ฒ์ฆ ์ค...\n", final_doc="")
|
| 1006 |
+
|
| 1007 |
+
fire_prompt = (
|
| 1008 |
+
f"[๊ฒ์ ๋ฐ์ดํฐ]\n{all_results_text[:5000]}\n\n"
|
| 1009 |
+
f"[STRUCTURE ๋ฌธ์ ๊ตฌ์กฐ]\n{wood_text}\n\n"
|
| 1010 |
+
"์ ๊ตฌ์กฐ๋ฅผ ๊ฒ์ ๋ฐ์ดํฐ์ ๋์กฐํ์ฌ ํฉํธ์ฒดํฌํ๊ณ , "
|
| 1011 |
+
"์ถ๊ฐ ๊ฒ์์ด ํ์ํ๋ฉด [์ถ๊ฐ๊ฒ์: 'ํค์๋'] ํ์์ผ๋ก ์ ์ํ์ธ์."
|
| 1012 |
+
)
|
| 1013 |
+
fire_resp = fireworks_stream_collect([{"role":"user","content":fire_prompt}],
|
| 1014 |
+
AGENT_SYSTEM["็ซ"], max_tokens=1024, temperature=0.3)
|
| 1015 |
+
st.fire_output = fire_resp
|
| 1016 |
+
|
| 1017 |
+
# ็ซ ์์ด์ ํธ ์ถ๊ฐ ๊ฒ์ ์ํ
|
| 1018 |
+
fire_queries = extract_additional_search_queries(fire_resp)
|
| 1019 |
+
yield state_update(active="็ซ", stream=f"๊ฒ์ฆ ์๋ฃ. ์ถ๊ฐ ๊ฒ์ {len(fire_queries)}๊ฑด ์ํ ์ค...\n", final_doc="")
|
| 1020 |
+
|
| 1021 |
+
for fq in fire_queries:
|
| 1022 |
+
if st.search_count >= max_search: break
|
| 1023 |
+
st.search_count += 1
|
| 1024 |
+
st.search_log.append(f"[{st.search_count:03d}][็ซ๊ฒ์ฆ] {fq}")
|
| 1025 |
+
log(f"๐ฅ ํ ์ถ๊ฐ๊ฒ์ [{st.search_count}]: {fq}")
|
| 1026 |
+
yield state_update(active="็ซ", stream=f"๐ ARGUMENT ์ถ๊ฐ๊ฒ์ {st.search_count}: {fq}\n", final_doc="")
|
| 1027 |
+
res = brave_search(fq, count=10)
|
| 1028 |
+
extra = f"\n=== ARGUMENT๊ฒ์ฆ ๊ฒ์ {st.search_count}: {fq} ===\n" + format_search_results(res)
|
| 1029 |
+
all_results_text += extra
|
| 1030 |
+
st.water_output += extra
|
| 1031 |
+
|
| 1032 |
+
log("๐ฌ ARGUMENT ์๋ฃ")
|
| 1033 |
+
yield state_update(active="็ซ", stream="\nโ
ARGUMENT ์๋ฃ\n\n", final_doc="")
|
| 1034 |
+
|
| 1035 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1036 |
+
# STAGE 4: ๅ โ ์ต์ข
๋ฌธ์ ํตํฉ ์์ฑ
|
| 1037 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1038 |
+
st.active = "ๅ"
|
| 1039 |
+
log("๐ [EVIDENCE] ์ต์ข
๋ฌธ์ ์์ฑ ์ค...")
|
| 1040 |
+
yield state_update(active="ๅ", stream="๐ EVIDENCE ์์ด์ ํธ: ์ต์ข
๋ฌธ์ ํตํฉ ์์ฑ ์ค...\n", final_doc="")
|
| 1041 |
+
|
| 1042 |
+
earth_prompt = (
|
| 1043 |
+
f"[์ฌ์ฉ์ ์์ฒญ]\n{user_prompt}\n\n"
|
| 1044 |
+
f"[๊ฒ์ฆ๋ ๊ฒ์ ๋ฐ์ดํฐ]\n{all_results_text[:8000]}\n\n"
|
| 1045 |
+
f"[STRUCTURE ๊ตฌ์กฐ]\n{wood_text[:2000]}\n\n"
|
| 1046 |
+
f"[ARGUMENT ๊ฒ์ฆ ๊ฒฐ๊ณผ]\n{fire_resp[:1500]}\n\n"
|
| 1047 |
+
"๋ชจ๋ ์๋ฃ๋ฅผ ํตํฉํ์ฌ ์์ฑ๋ ๋์ HWP ๊ณต๋ฌธ์๋ฅผ ์์ฑํ์ธ์. "
|
| 1048 |
+
"2000์ ์ด์, # ## ### | โ ํ์ ํ์ ์ค์."
|
| 1049 |
+
)
|
| 1050 |
+
earth_stream = fireworks_chat([{"role":"user","content":earth_prompt}],
|
| 1051 |
+
AGENT_SYSTEM["ๅ"], max_tokens=4096, temperature=0.5, stream=True)
|
| 1052 |
+
earth_text = ""
|
| 1053 |
+
for tok in earth_stream:
|
| 1054 |
+
earth_text += tok
|
| 1055 |
+
yield state_update(active="ๅ", stream=tok, final_doc="")
|
| 1056 |
+
st.earth_output = earth_text
|
| 1057 |
+
log("๐ EVIDENCE ์๋ฃ")
|
| 1058 |
+
yield state_update(active="ๅ", stream="\n\nโ
EVIDENCE ์๋ฃ\n\n", final_doc="")
|
| 1059 |
+
|
| 1060 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1061 |
+
# STAGE 5: ้ โ ์ต์ข
๋นํยท์ ์ (์๊ทน: ้ๅ
ๆจ)
|
| 1062 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1063 |
+
st.active = "้"
|
| 1064 |
+
log("๐ง [IMPACT] ์ต์ข
์ ์ ์ค...")
|
| 1065 |
+
yield state_update(active="้", stream="๐ง IMPACT ์์ด์ ํธ: ์ต์ข
๋นํ & ์ ์ ์ค...\n", final_doc="")
|
| 1066 |
+
|
| 1067 |
+
gold_prompt = (
|
| 1068 |
+
f"[EVIDENCE ์ด์]\n{earth_text}\n\n"
|
| 1069 |
+
"[STRUCTURE ์๋ ๊ตฌ์กฐ์ ๋น๊ตํ์ฌ ์ต์ข
์์ฑ๋ณธ์ ์ถ๋ ฅํ์ธ์.]\n"
|
| 1070 |
+
"===์ต์ข
๋ฌธ์=== ๋ง์ปค ํ ์์ฑ๋ ์ ์ฒด ๋ฌธ์๋ฅผ ์ถ๋ ฅํ์ธ์."
|
| 1071 |
+
)
|
| 1072 |
+
gold_stream = fireworks_chat([{"role":"user","content":gold_prompt}],
|
| 1073 |
+
AGENT_SYSTEM["้"], max_tokens=4096, temperature=0.4, stream=True)
|
| 1074 |
+
gold_text = ""
|
| 1075 |
+
for tok in gold_stream:
|
| 1076 |
+
gold_text += tok
|
| 1077 |
+
yield state_update(active="้", stream=tok, final_doc="")
|
| 1078 |
+
st.gold_output = gold_text
|
| 1079 |
+
|
| 1080 |
+
# ===์ต์ข
๋ฌธ์=== ์ถ์ถ
|
| 1081 |
+
final_match = re.search(r"===์ต์ข
๋ฌธ์===\s*(.*)", gold_text, flags=re.DOTALL)
|
| 1082 |
+
if final_match:
|
| 1083 |
+
st.final_doc = final_match.group(1).strip()
|
| 1084 |
+
else:
|
| 1085 |
+
# ๋ง์ปค ์์ผ๋ฉด ์ ์ฒด gold ์ถ๋ ฅ ์ฌ์ฉ
|
| 1086 |
+
st.final_doc = gold_text.strip() or earth_text.strip()
|
| 1087 |
+
|
| 1088 |
+
log("๐ง IMPACT ์๋ฃ โ ์ต์ข
๋ฌธ์ ํ์ ")
|
| 1089 |
+
yield state_update(active="้", stream="\n\nโ
IMPACT ์๋ฃ โ ๋ฌธ์ ํ์ !\n", final_doc=st.final_doc)
|
| 1090 |
+
yield {"done": True, "final_doc": st.final_doc, "search_count": st.search_count,
|
| 1091 |
+
"log": "\n".join(st.log), "search_log": "\n".join(st.search_log)}
|
| 1092 |
+
|
| 1093 |
+
|
| 1094 |
+
# ============================================================
|
| 1095 |
+
# โฆ Gradio UI
|
| 1096 |
+
# ============================================================
|
| 1097 |
+
OHAENG_HTML_TEMPLATE = """
|
| 1098 |
+
<div style="display:flex;gap:10px;flex-wrap:wrap;justify-content:center;padding:10px 0;">
|
| 1099 |
+
{cards}
|
| 1100 |
+
</div>
|
| 1101 |
+
"""
|
| 1102 |
+
|
| 1103 |
+
def ohaeng_cards_html(active: str = "ๆฐด") -> str:
|
| 1104 |
+
cards = []
|
| 1105 |
+
for key in SANGSAENG:
|
| 1106 |
+
o = OHAENG[key]
|
| 1107 |
+
is_active = (key == active)
|
| 1108 |
+
border = f"3px solid {o['color']}" if is_active else "2px solid #2a2a3a"
|
| 1109 |
+
bg = f"linear-gradient(135deg,{o['color']}22,{o['color']}08)" if is_active else "#1a1a2a"
|
| 1110 |
+
shadow = f"0 0 18px {o['color']}66" if is_active else "none"
|
| 1111 |
+
pulse = "animation:pulse 1.2s infinite;" if is_active else ""
|
| 1112 |
+
cards.append(f"""
|
| 1113 |
+
<div style="border:{border};background:{bg};box-shadow:{shadow};border-radius:12px;
|
| 1114 |
+
padding:10px 14px;min-width:110px;text-align:center;{pulse}transition:all .3s;">
|
| 1115 |
+
<div style="font-size:22px">{o['emoji']}</div>
|
| 1116 |
+
<div style="color:{o['color']};font-weight:700;font-size:13px">{o['name']}</div>
|
| 1117 |
+
<div style="color:#aaa;font-size:11px">{o['role']}</div>
|
| 1118 |
+
{'<div style="color:#fff;font-size:10px;margin-top:4px">โ ํ์ฑ</div>' if is_active else ''}
|
| 1119 |
+
</div>""")
|
| 1120 |
+
return OHAENG_HTML_TEMPLATE.format(cards="".join(cards))
|
| 1121 |
+
|
| 1122 |
+
|
| 1123 |
+
# ============================================================
|
| 1124 |
+
# โฆ-B ํ์ผ ์
๋ก๋ ยท ํ
์คํธ ์ถ์ถ ์ ํธ๋ฆฌํฐ
|
| 1125 |
+
# ============================================================
|
| 1126 |
+
def extract_text_from_pdf(file_path: str) -> Optional[str]:
|
| 1127 |
+
parts = []
|
| 1128 |
+
if PDFPLUMBER_AVAILABLE:
|
| 1129 |
+
try:
|
| 1130 |
+
with pdfplumber.open(file_path) as pdf:
|
| 1131 |
+
for page in pdf.pages:
|
| 1132 |
+
t = page.extract_text()
|
| 1133 |
+
if t: parts.append(t)
|
| 1134 |
+
if parts: return "\n\n".join(parts)
|
| 1135 |
+
except Exception as e:
|
| 1136 |
+
print(f"pdfplumber error: {e}")
|
| 1137 |
+
if PYPDF2_AVAILABLE:
|
| 1138 |
+
try:
|
| 1139 |
+
with open(file_path, 'rb') as f:
|
| 1140 |
+
reader = PyPDF2.PdfReader(f)
|
| 1141 |
+
for page in reader.pages:
|
| 1142 |
+
t = page.extract_text()
|
| 1143 |
+
if t: parts.append(t)
|
| 1144 |
+
if parts: return "\n\n".join(parts)
|
| 1145 |
+
except Exception as e:
|
| 1146 |
+
print(f"PyPDF2 error: {e}")
|
| 1147 |
+
return None
|
| 1148 |
+
|
| 1149 |
+
def extract_text_from_txt(file_path: str) -> Optional[str]:
|
| 1150 |
+
for enc in ['utf-8', 'euc-kr', 'cp949', 'utf-16', 'latin-1']:
|
| 1151 |
+
try:
|
| 1152 |
+
with open(file_path, 'r', encoding=enc) as f:
|
| 1153 |
+
return f.read()
|
| 1154 |
+
except:
|
| 1155 |
+
continue
|
| 1156 |
+
return None
|
| 1157 |
+
|
| 1158 |
+
def extract_text_from_hwpx(file_path: str) -> tuple:
|
| 1159 |
+
try:
|
| 1160 |
+
text_parts = []
|
| 1161 |
+
with zipfile.ZipFile(file_path, 'r') as zf:
|
| 1162 |
+
section_files = sorted([f for f in zf.namelist()
|
| 1163 |
+
if f.startswith('Contents/section') and f.endswith('.xml')])
|
| 1164 |
+
for sf_name in section_files:
|
| 1165 |
+
try:
|
| 1166 |
+
with zf.open(sf_name) as sf:
|
| 1167 |
+
content = sf.read().decode('utf-8', errors='ignore')
|
| 1168 |
+
content = re.sub(r'\sxmlns[^"]*"[^"]*"', '', content)
|
| 1169 |
+
content = re.sub(r'<[a-zA-Z]+:', '<', content)
|
| 1170 |
+
content = re.sub(r'</[a-zA-Z]+:', '</', content)
|
| 1171 |
+
try:
|
| 1172 |
+
from xml.etree import ElementTree as _ET2
|
| 1173 |
+
root = _ET2.fromstring(content)
|
| 1174 |
+
texts = []
|
| 1175 |
+
for elem in root.iter():
|
| 1176 |
+
if elem.tag.endswith('t') or elem.tag == 't':
|
| 1177 |
+
if elem.text: texts.append(elem.text)
|
| 1178 |
+
elif elem.text and elem.text.strip():
|
| 1179 |
+
if any(x in elem.tag.lower() for x in ['text','run','para','char']):
|
| 1180 |
+
texts.append(elem.text.strip())
|
| 1181 |
+
if texts: text_parts.append(' '.join(texts))
|
| 1182 |
+
except:
|
| 1183 |
+
matches = re.findall(r'>([^<]+)<', content)
|
| 1184 |
+
clean = [t.strip() for t in matches if t.strip() and len(t.strip()) > 1]
|
| 1185 |
+
if clean: text_parts.append(' '.join(clean))
|
| 1186 |
+
except:
|
| 1187 |
+
continue
|
| 1188 |
+
if text_parts:
|
| 1189 |
+
result = re.sub(r'\s+', ' ', '\n\n'.join(text_parts))
|
| 1190 |
+
return result.strip(), None
|
| 1191 |
+
return None, "HWPX์์ ํ
์คํธ๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค"
|
| 1192 |
+
except Exception as e:
|
| 1193 |
+
return None, f"HWPX ์ค๋ฅ: {str(e)}"
|
| 1194 |
+
|
| 1195 |
+
def _decode_hwp_para_text(data: bytes) -> Optional[str]:
|
| 1196 |
+
result = []
|
| 1197 |
+
i = 0
|
| 1198 |
+
while i < len(data) - 1:
|
| 1199 |
+
code = int.from_bytes(data[i:i+2], 'little')
|
| 1200 |
+
if code == 0: pass
|
| 1201 |
+
elif code in (1,2,3): i += 14
|
| 1202 |
+
elif code == 4: pass
|
| 1203 |
+
elif code == 9: result.append('\t')
|
| 1204 |
+
elif code in (10,13): result.append('\n')
|
| 1205 |
+
elif code == 24: result.append('-')
|
| 1206 |
+
elif code in (30,31): result.append(' ')
|
| 1207 |
+
elif code < 32: pass
|
| 1208 |
+
else:
|
| 1209 |
+
try:
|
| 1210 |
+
ch = chr(code)
|
| 1211 |
+
if ch.isprintable() or ch in '\n\t ': result.append(ch)
|
| 1212 |
+
except: pass
|
| 1213 |
+
i += 2
|
| 1214 |
+
text = re.sub(r'[ \t]+', ' ', ''.join(result).strip())
|
| 1215 |
+
return text if len(text) > 2 else None
|
| 1216 |
+
|
| 1217 |
+
def _extract_hwp_section_text(data: bytes) -> Optional[str]:
|
| 1218 |
+
texts = []; pos = 0
|
| 1219 |
+
while pos < len(data) - 4:
|
| 1220 |
+
try:
|
| 1221 |
+
header = int.from_bytes(data[pos:pos+4], 'little')
|
| 1222 |
+
tag_id = header & 0x3FF
|
| 1223 |
+
size = (header >> 20) & 0xFFF
|
| 1224 |
+
pos += 4
|
| 1225 |
+
if size == 0xFFF:
|
| 1226 |
+
if pos + 4 > len(data): break
|
| 1227 |
+
size = int.from_bytes(data[pos:pos+4], 'little'); pos += 4
|
| 1228 |
+
if pos + size > len(data): break
|
| 1229 |
+
record_data = data[pos:pos+size]; pos += size
|
| 1230 |
+
if tag_id == 67 and size > 0:
|
| 1231 |
+
t = _decode_hwp_para_text(record_data)
|
| 1232 |
+
if t: texts.append(t)
|
| 1233 |
+
except:
|
| 1234 |
+
pos += 1
|
| 1235 |
+
return '\n'.join(texts) if texts else None
|
| 1236 |
+
|
| 1237 |
+
def extract_text_from_hwp(file_path: str) -> tuple:
|
| 1238 |
+
# ๋ฐฉ๋ฒ 1: hwp5txt CLI
|
| 1239 |
+
try:
|
| 1240 |
+
result = subprocess.run(['hwp5txt', file_path], capture_output=True, timeout=60)
|
| 1241 |
+
if result.returncode == 0 and result.stdout:
|
| 1242 |
+
for enc in ['utf-8', 'cp949', 'euc-kr']:
|
| 1243 |
+
try:
|
| 1244 |
+
text = result.stdout.decode(enc)
|
| 1245 |
+
if text.strip() and len(text.strip()) > 10:
|
| 1246 |
+
return text.strip(), None
|
| 1247 |
+
except: continue
|
| 1248 |
+
except: pass
|
| 1249 |
+
# ๋ฐฉ๋ฒ 2: olefile ์ง์ ํ์ฑ
|
| 1250 |
+
if OLEFILE_AVAILABLE:
|
| 1251 |
+
try:
|
| 1252 |
+
ole = olefile.OleFileIO(file_path)
|
| 1253 |
+
header_data = ole.openstream('FileHeader').read()
|
| 1254 |
+
is_compressed = (header_data[36] & 1) == 1 if len(header_data) > 36 else True
|
| 1255 |
+
all_texts = []
|
| 1256 |
+
for entry in ole.listdir():
|
| 1257 |
+
path = '/'.join(entry)
|
| 1258 |
+
if path.startswith('BodyText/Section'):
|
| 1259 |
+
try:
|
| 1260 |
+
stream = ole.openstream(entry).read()
|
| 1261 |
+
if is_compressed:
|
| 1262 |
+
try: stream = zlib.decompress(stream, -15)
|
| 1263 |
+
except:
|
| 1264 |
+
try: stream = zlib.decompress(stream)
|
| 1265 |
+
except: pass
|
| 1266 |
+
t = _extract_hwp_section_text(stream)
|
| 1267 |
+
if t: all_texts.append(t)
|
| 1268 |
+
except: continue
|
| 1269 |
+
ole.close()
|
| 1270 |
+
if all_texts:
|
| 1271 |
+
return '\n\n'.join(all_texts).strip(), None
|
| 1272 |
+
except Exception as e:
|
| 1273 |
+
return None, f"olefile ์ค๋ฅ: {str(e)}"
|
| 1274 |
+
return None, "HWP ํ
์คํธ ์ถ์ถ ์คํจ"
|
| 1275 |
+
|
| 1276 |
+
def _is_hml_xml(file_path: str) -> bool:
|
| 1277 |
+
"""ํ์ผ์ด HML(HWPML XML) ํ์์ธ์ง ํ์ธ (.hwp/.hwpx ํ์ฅ์์ฌ๋ ์ค์ ๋ก HML์ผ ์ ์์)"""
|
| 1278 |
+
try:
|
| 1279 |
+
with open(file_path, 'rb') as f:
|
| 1280 |
+
head = f.read(500)
|
| 1281 |
+
# BOM ์ ๊ฑฐ
|
| 1282 |
+
for bom in (b'\xef\xbb\xbf', b'\xff\xfe', b'\xfe\xff'):
|
| 1283 |
+
if head.startswith(bom):
|
| 1284 |
+
head = head[len(bom):]
|
| 1285 |
+
break
|
| 1286 |
+
head_str = head.decode('utf-8', errors='ignore').strip()
|
| 1287 |
+
return head_str.startswith('<?xml') and '<HWPML' in head_str[:400]
|
| 1288 |
+
except:
|
| 1289 |
+
return False
|
| 1290 |
+
|
| 1291 |
+
def extract_text_from_hml(file_path: str) -> tuple:
|
| 1292 |
+
"""HML(HWPML XML) ํ์ผ์์ ํ
์คํธ ์ถ์ถ"""
|
| 1293 |
+
try:
|
| 1294 |
+
from xml.etree import ElementTree as _ET4
|
| 1295 |
+
# ์ธ์ฝ๋ฉ ์๋ ๊ฐ์ง ์ฝ๊ธฐ
|
| 1296 |
+
raw = None
|
| 1297 |
+
for enc in ('utf-8-sig', 'utf-8', 'utf-16', 'cp949', 'euc-kr'):
|
| 1298 |
+
try:
|
| 1299 |
+
with open(file_path, 'r', encoding=enc) as f:
|
| 1300 |
+
raw = f.read()
|
| 1301 |
+
break
|
| 1302 |
+
except:
|
| 1303 |
+
continue
|
| 1304 |
+
if not raw:
|
| 1305 |
+
return None, "HML ํ์ผ ์ธ์ฝ๋ฉ ๊ฐ์ง ์คํจ"
|
| 1306 |
+
|
| 1307 |
+
root = _ET4.fromstring(raw)
|
| 1308 |
+
body = root.find('BODY')
|
| 1309 |
+
if body is None:
|
| 1310 |
+
# HWPML 1.1 ํ์ (Body ์๋ฌธ์)
|
| 1311 |
+
body = root.find('Body')
|
| 1312 |
+
if body is None:
|
| 1313 |
+
return None, "HML์์ BODY ์น์
์ ์ฐพ์ ์ ์์ต๋๋ค"
|
| 1314 |
+
|
| 1315 |
+
texts = []
|
| 1316 |
+
for elem in body.iter():
|
| 1317 |
+
# CHAR ํ๊ทธ ๋ด๋ถ ํ
์คํธ (HWPML 2.x)
|
| 1318 |
+
if elem.tag == 'CHAR' and elem.text:
|
| 1319 |
+
t = elem.text.strip()
|
| 1320 |
+
if t and t not in ('', ' '):
|
| 1321 |
+
texts.append(t)
|
| 1322 |
+
# Text ํ๊ทธ (HWPML 1.1)
|
| 1323 |
+
elif elem.tag == 'Text' and elem.text:
|
| 1324 |
+
t = elem.text.strip()
|
| 1325 |
+
if t:
|
| 1326 |
+
texts.append(t)
|
| 1327 |
+
|
| 1328 |
+
if texts:
|
| 1329 |
+
# ์ฐ์๋ CHAR ํ
์คํธ๋ฅผ ๋ฌธ๋จ ๋จ์๋ก ๊ฒฐํฉ
|
| 1330 |
+
result = '\n'.join(texts)
|
| 1331 |
+
result = re.sub(r'\n{3,}', '\n\n', result)
|
| 1332 |
+
return result.strip(), None
|
| 1333 |
+
return None, "HML์์ ํ
์คํธ๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค"
|
| 1334 |
+
except _ET4.ParseError as e:
|
| 1335 |
+
return None, f"HML XML ํ์ฑ ์ค๋ฅ: {e}"
|
| 1336 |
+
except Exception as e:
|
| 1337 |
+
return None, f"HML ์ฒ๋ฆฌ ์ค๋ฅ: {e}"
|
| 1338 |
+
|
| 1339 |
+
def process_uploaded_file(file_path: str) -> tuple:
|
| 1340 |
+
"""์
๋ก๋๋ ํ์ผ์์ ํ
์คํธ ์ถ์ถ. Returns (text, error_msg)"""
|
| 1341 |
+
if not file_path: return None, "ํ์ผ ์์"
|
| 1342 |
+
ext = Path(file_path).suffix.lower()
|
| 1343 |
+
fname = os.path.basename(file_path)
|
| 1344 |
+
|
| 1345 |
+
# .hml ํ์ผ โ HML XML ํ์
|
| 1346 |
+
if ext == '.hml':
|
| 1347 |
+
text, err = extract_text_from_hml(file_path)
|
| 1348 |
+
return (text, None) if text else (None, err or "HML ์ถ์ถ ์คํจ")
|
| 1349 |
+
|
| 1350 |
+
# .hwp / .hwpx ํ์ฅ์์ด์ง๋ง ์ค์ ๋ก HML XML์ผ ์ ์์ โ ๋จผ์ ๊ฐ์ง
|
| 1351 |
+
if ext in ('.hwp', '.hwpx'):
|
| 1352 |
+
if _is_hml_xml(file_path):
|
| 1353 |
+
text, err = extract_text_from_hml(file_path)
|
| 1354 |
+
if text:
|
| 1355 |
+
return text, None
|
| 1356 |
+
# ์ง์ง ๋ฐ์ด๋๋ฆฌ HWP / HWPX
|
| 1357 |
+
if ext == '.hwpx':
|
| 1358 |
+
text, err = extract_text_from_hwpx(file_path)
|
| 1359 |
+
return (text, None) if text else (None, err or "HWPX ์ถ์ถ ์คํจ")
|
| 1360 |
+
else:
|
| 1361 |
+
text, err = extract_text_from_hwp(file_path)
|
| 1362 |
+
return (text, None) if text else (None, err or "HWP ์ถ์ถ ์คํจ")
|
| 1363 |
+
|
| 1364 |
+
if ext == '.pdf':
|
| 1365 |
+
text = extract_text_from_pdf(file_path)
|
| 1366 |
+
return (text, None) if text else (None, "PDF ์ถ์ถ ์คํจ")
|
| 1367 |
+
if ext in ('.txt', '.md', '.json', '.csv', '.xml', '.html', '.py', '.js', '.log'):
|
| 1368 |
+
text = extract_text_from_txt(file_path)
|
| 1369 |
+
return (text, None) if text else (None, "ํ
์คํธ ์ฝ๊ธฐ ์คํจ")
|
| 1370 |
+
if ext in ('.docx',):
|
| 1371 |
+
try:
|
| 1372 |
+
from zipfile import ZipFile
|
| 1373 |
+
from xml.etree import ElementTree as _ET3
|
| 1374 |
+
with ZipFile(file_path) as zf:
|
| 1375 |
+
with zf.open('word/document.xml') as f:
|
| 1376 |
+
tree = _ET3.parse(f)
|
| 1377 |
+
ns = {'w': 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'}
|
| 1378 |
+
texts = [node.text for node in tree.iter('{http://schemas.openxmlformats.org/wordprocessingml/2006/main}t') if node.text]
|
| 1379 |
+
return '\n'.join(texts), None
|
| 1380 |
+
except Exception as e:
|
| 1381 |
+
return None, f"DOCX ์ค๋ฅ: {e}"
|
| 1382 |
+
if ext in ('.xlsx', '.xls'):
|
| 1383 |
+
try:
|
| 1384 |
+
import csv as _csv
|
| 1385 |
+
try:
|
| 1386 |
+
import openpyxl
|
| 1387 |
+
wb = openpyxl.load_workbook(file_path, read_only=True)
|
| 1388 |
+
lines = []
|
| 1389 |
+
for ws in wb.worksheets:
|
| 1390 |
+
for row in ws.iter_rows(values_only=True):
|
| 1391 |
+
lines.append('\t'.join(str(c) if c is not None else '' for c in row))
|
| 1392 |
+
return '\n'.join(lines), None
|
| 1393 |
+
except ImportError:
|
| 1394 |
+
return None, "Excel ์ฝ๊ธฐ: openpyxl ํ์"
|
| 1395 |
+
except Exception as e:
|
| 1396 |
+
return None, f"Excel ์ค๋ฅ: {e}"
|
| 1397 |
+
return None, f"์ง์ํ์ง ์๋ ํ์: {ext}"
|
| 1398 |
+
|
| 1399 |
+
|
| 1400 |
+
# ============================================================
|
| 1401 |
+
# โฆ-C ๋ฌธ์ ๋ถ์ ์ฑ (Metacognitive Agent ๊ธฐ๋ฐ)
|
| 1402 |
+
# ============================================================
|
| 1403 |
+
DOC_CHAT_SYSTEM = """๋น์ ์ SOMA Pre-AGI ๋ฌธ์ ๋ถ์ ์ ๋ฌธ AI์
๋๋ค.
|
| 1404 |
+
|
| 1405 |
+
## ํต์ฌ ์ญํ
|
| 1406 |
+
- ์ฌ์ฉ์๊ฐ ์
๋ก๋ํ ๋ฌธ์์ ๋ด์ฉ์ **์ ํํ๊ฒ ๋ถ์**ํ๊ณ **๊ตฌ์ฒด์ ์ผ๋ก ๋ต๋ณ**ํฉ๋๋ค
|
| 1407 |
+
- ๋ฌธ์์ ์๋ **์ค์ ๋ด์ฉ**์ ๊ธฐ๋ฐ์ผ๋ก๋ง ๋ต๋ณํฉ๋๋ค
|
| 1408 |
+
- ๋ฌธ์์ ์๋ ๋ด์ฉ์ ์ถ์ธกํ์ง ์๊ณ ๊ทธ ์ฌ์ค์ ๋ฐํ๋๋ค
|
| 1409 |
+
|
| 1410 |
+
## Metacognitive ๋ถ์ ์์น
|
| 1411 |
+
- ๐ RESEARCH: ๋ฌธ์ ๋ด์ฉ ์ ๋ฐ ํ์ยท๊ฒ์
|
| 1412 |
+
- ๐งฉ STRUCTURE: ๋ฌธ์ ๊ตฌ์กฐยท์ฒด๊ณ ๋ถ์
|
| 1413 |
+
- ๐ฌ ARGUMENT: ํต์ฌ ์ฌ์ค ๊ฒ์ฆยทํฉํธ์ฒดํฌ
|
| 1414 |
+
- ๐ EVIDENCE: ์ข
ํฉ์ ๋ถ์ ํตํฉ
|
| 1415 |
+
- ๐ง IMPACT: ์ต์ข
์ ์ ยท๋ช
ํํ ๋ต๋ณ
|
| 1416 |
+
|
| 1417 |
+
## ๋ต๋ณ ํ์
|
| 1418 |
+
- ํ๊ตญ์ด๋ก ์์ฐ์ค๋ฝ๊ณ ๋ช
ํํ๊ฒ ๋ต๋ณํฉ๋๋ค
|
| 1419 |
+
- ๋ฌธ์ ๋ด์ฉ์ ์ธ์ฉํ ๋๋ ๊ตฌ์ฒด์ ์ผ๋ก ์ธ๊ธํฉ๋๋ค
|
| 1420 |
+
- ๋ถ๋์ด ๊ธด ๋ฌธ์๋ ํต์ฌ ๋ด์ฉ ์์ฃผ๋ก ์์ฝํฉ๋๋ค"""
|
| 1421 |
+
|
| 1422 |
+
def doc_chat_respond(message: str, history: list, doc_text_state: str):
|
| 1423 |
+
"""๋ฌธ์ ์ปจํ
์คํธ ๊ธฐ๋ฐ ์ฑ ์๋ต (Fireworks API ์คํธ๋ฆฌ๋ฐ)"""
|
| 1424 |
+
if not message.strip():
|
| 1425 |
+
yield history
|
| 1426 |
+
return
|
| 1427 |
+
|
| 1428 |
+
if not FIREWORKS_API_KEY:
|
| 1429 |
+
history = history + [{"role": "user", "content": message},
|
| 1430 |
+
{"role": "assistant", "content": "โ FIREWORKS_API_KEY๊ฐ ์ค์ ๋์ง ์์์ต๋๋ค."}]
|
| 1431 |
+
yield history
|
| 1432 |
+
return
|
| 1433 |
+
|
| 1434 |
+
# ์ฌ์ฉ์ ๋ฉ์์ง์ ๋ฌธ์ ์ปจํ
์คํธ ํฌํจ
|
| 1435 |
+
if doc_text_state:
|
| 1436 |
+
doc_snippet = doc_text_state[:12000] # ํ ํฐ ์ ํ
|
| 1437 |
+
user_content = f"""## ๐ ์
๋ก๋๋ ๋ฌธ์ ๋ด์ฉ
|
| 1438 |
+
|
| 1439 |
+
---
|
| 1440 |
+
{doc_snippet}
|
| 1441 |
+
---
|
| 1442 |
+
|
| 1443 |
+
## ๐ฌ ์ฌ์ฉ์ ์ง๋ฌธ
|
| 1444 |
+
{message}
|
| 1445 |
+
|
| 1446 |
+
์ ๋ฌธ์ ๋ด์ฉ์ ๋ฐํ์ผ๋ก ๋ต๋ณํด์ฃผ์ธ์."""
|
| 1447 |
+
else:
|
| 1448 |
+
user_content = message
|
| 1449 |
+
|
| 1450 |
+
# API ๋ฉ์์ง ๊ตฌ์ฑ
|
| 1451 |
+
api_messages = [{"role": "system", "content": DOC_CHAT_SYSTEM}]
|
| 1452 |
+
# ์ต๊ทผ ๋ํ ํ์คํ ๋ฆฌ (์ต๋ 6ํด)
|
| 1453 |
+
for h in (history or [])[-6:]:
|
| 1454 |
+
api_messages.append({"role": h["role"], "content": h["content"]})
|
| 1455 |
+
api_messages.append({"role": "user", "content": user_content})
|
| 1456 |
+
|
| 1457 |
+
history = (history or []) + [{"role": "user", "content": message},
|
| 1458 |
+
{"role": "assistant", "content": ""}]
|
| 1459 |
+
yield history
|
| 1460 |
+
|
| 1461 |
+
# Fireworks API ์คํธ๋ฆฌ๋ฐ ํธ์ถ
|
| 1462 |
+
try:
|
| 1463 |
+
headers = {
|
| 1464 |
+
"Accept": "application/json",
|
| 1465 |
+
"Content-Type": "application/json",
|
| 1466 |
+
"Authorization": f"Bearer {FIREWORKS_API_KEY}",
|
| 1467 |
+
}
|
| 1468 |
+
payload = {
|
| 1469 |
+
"model": FIREWORKS_MODEL,
|
| 1470 |
+
"max_tokens": 4096,
|
| 1471 |
+
"temperature": 0.6,
|
| 1472 |
+
"stream": True,
|
| 1473 |
+
"messages": api_messages,
|
| 1474 |
+
}
|
| 1475 |
+
resp = requests.post(FIREWORKS_URL, headers=headers, json=payload,
|
| 1476 |
+
stream=True, timeout=180)
|
| 1477 |
+
resp.raise_for_status()
|
| 1478 |
+
|
| 1479 |
+
full = ""
|
| 1480 |
+
for raw_line in resp.iter_lines():
|
| 1481 |
+
if not raw_line: continue
|
| 1482 |
+
line = raw_line.decode("utf-8") if isinstance(raw_line, bytes) else raw_line
|
| 1483 |
+
if not line.startswith("data: "): continue
|
| 1484 |
+
data = line[6:]
|
| 1485 |
+
if data.strip() == "[DONE]": break
|
| 1486 |
+
try:
|
| 1487 |
+
chunk = json.loads(data)
|
| 1488 |
+
delta = chunk["choices"][0]["delta"].get("content", "")
|
| 1489 |
+
if delta:
|
| 1490 |
+
full += delta
|
| 1491 |
+
history[-1] = {"role": "assistant", "content": full}
|
| 1492 |
+
yield history
|
| 1493 |
+
except:
|
| 1494 |
+
pass
|
| 1495 |
+
except Exception as e:
|
| 1496 |
+
history[-1] = {"role": "assistant", "content": f"โ API ์ค๋ฅ: {e}"}
|
| 1497 |
+
yield history
|
| 1498 |
+
|
| 1499 |
+
|
| 1500 |
+
SANGGEUK_ARROWS_HTML = """
|
| 1501 |
+
<div style="text-align:center;font-size:12px;color:#666;padding:4px 0;">
|
| 1502 |
+
Pipeline: ๐โ๐งฉโ๐ฌโ๐โ๐ง |
|
| 1503 |
+
Cross-Check: ๐ง โธ๐งฉ ยท ๐งฉโธ๐ ยท ๐โธ๐ ยท ๐โธ๐ฌ ยท ๐ฌโธ๐ง
|
| 1504 |
+
</div>"""
|
| 1505 |
+
|
| 1506 |
+
CSS = """
|
| 1507 |
+
@import url('https://fonts.googleapis.com/css2?family=Azeret+Mono:wght@400;700;900&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');
|
| 1508 |
+
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
|
| 1509 |
+
* { font-family: 'Noto Sans KR', sans-serif; box-sizing: border-box; }
|
| 1510 |
+
body, .gradio-container { background: #F2F5FB !important; color: #0D1526 !important; }
|
| 1511 |
+
.soma-title {
|
| 1512 |
+
text-align:center; padding:20px 0 8px;
|
| 1513 |
+
background: linear-gradient(135deg,#0EA5E9,#16A34A,#DC2626,#D97706,#7C3AED);
|
| 1514 |
+
background-size:200% auto;
|
| 1515 |
+
-webkit-background-clip:text; -webkit-text-fill-color:transparent;
|
| 1516 |
+
font-size:26px; font-weight:700; letter-spacing:2px; font-family:'Azeret Mono',monospace;
|
| 1517 |
+
}
|
| 1518 |
+
.soma-sub { text-align:center;color:#6B7A99;font-size:13px;margin-bottom:10px; }
|
| 1519 |
+
.gr-box { background:#FFFFFF !important; border:1.5px solid #DDE4F0 !important; border-radius:12px !important; box-shadow:0 1px 4px rgba(13,21,38,.05) !important; }
|
| 1520 |
+
.gr-button-primary { background:linear-gradient(135deg,#0EA5E9,#0284C7) !important; border:none !important; border-radius:8px !important; color:#fff !important; font-weight:700 !important; }
|
| 1521 |
+
.gr-button-secondary { background:#F8FAFF !important; border:1.5px solid #DDE4F0 !important; border-radius:8px !important; color:#3A4668 !important; }
|
| 1522 |
+
textarea, input[type=text], input[type=number] { background:#F8FAFF !important; color:#0D1526 !important; border:1.5px solid #DDE4F0 !important; border-radius:8px !important; }
|
| 1523 |
+
.agent-stream {
|
| 1524 |
+
background:#F8FAFF; border:1.5px solid #DDE4F0; border-radius:10px;
|
| 1525 |
+
padding:14px; height:280px; overflow-y:auto;
|
| 1526 |
+
font-family:'Azeret Mono',monospace; font-size:12px; color:#3A4668;
|
| 1527 |
+
white-space:pre-wrap; word-break:break-word;
|
| 1528 |
+
}
|
| 1529 |
+
.final-doc {
|
| 1530 |
+
background:#FFFFFF; border:1.5px solid #DDE4F0; border-radius:10px;
|
| 1531 |
+
padding:14px; height:400px; overflow-y:auto;
|
| 1532 |
+
font-size:13px; color:#0D1526; white-space:pre-wrap;
|
| 1533 |
+
}
|
| 1534 |
+
.search-log {
|
| 1535 |
+
background:#F0F7FF; border:1.5px solid #BAE6FD; border-radius:10px;
|
| 1536 |
+
padding:12px; height:200px; overflow-y:auto;
|
| 1537 |
+
font-family:'Azeret Mono',monospace; font-size:11px; color:#0EA5E9;
|
| 1538 |
+
white-space:pre-wrap;
|
| 1539 |
+
}
|
| 1540 |
+
.status-bar { background:#F2F5FB; border-radius:8px; padding:8px 14px; font-size:12px; color:#6B7A99; border:1.5px solid #DDE4F0; }
|
| 1541 |
+
label { color:#6B7A99 !important; font-size:12px !important; }
|
| 1542 |
+
.tab-nav button { background:transparent !important; color:#6B7A99 !important; border-bottom:2px solid transparent !important; }
|
| 1543 |
+
.tab-nav button.selected { color:#0EA5E9 !important; border-bottom-color:#0EA5E9 !important; }
|
| 1544 |
+
::-webkit-scrollbar { width:5px; }
|
| 1545 |
+
::-webkit-scrollbar-track { background:#F2F5FB; }
|
| 1546 |
+
::-webkit-scrollbar-thumb { background:#C8D3E8; border-radius:3px; }
|
| 1547 |
+
"""
|
| 1548 |
+
|
| 1549 |
+
def build_ui():
|
| 1550 |
+
with gr.Blocks(title="SOMA Pre-AGI ยท Metacognitive Document Engine") as app:
|
| 1551 |
+
|
| 1552 |
+
# โโ CSS ์ฃผ์
|
| 1553 |
+
gr.HTML(f"<style>{CSS}</style>")
|
| 1554 |
+
|
| 1555 |
+
# โโ ํ์ดํ
|
| 1556 |
+
gr.HTML("""
|
| 1557 |
+
<div class="soma-title">โ SOMA Pre-AGI ยท Metacognitive Document Engine</div>
|
| 1558 |
+
<div class="soma-sub">Fireworks AI (Kimi K2) ยท Brave Search ยท Emergence Matrix ยท 5-Agent Pipeline</div>
|
| 1559 |
+
""")
|
| 1560 |
+
gr.HTML(SANGGEUK_ARROWS_HTML)
|
| 1561 |
+
|
| 1562 |
+
# โโ Agent ์นด๋ (๋์ ์
๋ฐ์ดํธ)
|
| 1563 |
+
ohaeng_display = gr.HTML(value=ohaeng_cards_html("ๆฐด"))
|
| 1564 |
+
|
| 1565 |
+
with gr.Tabs():
|
| 1566 |
+
|
| 1567 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1568 |
+
# TAB 1: ๋ฌธ์ ์์ฑ
|
| 1569 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1570 |
+
with gr.Tab("๐ ๋ฌธ์ ์์ฑ"):
|
| 1571 |
+
ref_text_state = gr.State("")
|
| 1572 |
+
with gr.Row():
|
| 1573 |
+
with gr.Column(scale=2):
|
| 1574 |
+
prompt_input = gr.Textbox(
|
| 1575 |
+
label="๐ ๋ฌธ์ ์์ฑ ํ๋กฌํํธ",
|
| 1576 |
+
placeholder="์: ์จ๋ผ์ธ ์๊ธ์ค๊ฐ ์๋น์ค ์ ๋ํ ์ถ์ง ๋ฐฉ์์ ๋ํ ์ ์ฑ
๋ณด๊ณ ์๋ฅผ ์์ฑํด์ฃผ์ธ์.",
|
| 1577 |
+
lines=4,
|
| 1578 |
+
elem_classes=["gr-box"]
|
| 1579 |
+
)
|
| 1580 |
+
with gr.Row():
|
| 1581 |
+
ref_file_upload = gr.File(
|
| 1582 |
+
label="๐ ์ฐธ๊ณ ๋ฌธ์ ์
๋ก๋ (์ ํ)",
|
| 1583 |
+
file_types=[".hwp",".hwpx",".hml",".pdf",".docx",".txt",".md",
|
| 1584 |
+
".csv",".json",".xml",".xlsx",".xls",".py",".html",".log"],
|
| 1585 |
+
)
|
| 1586 |
+
ref_upload_status = gr.Textbox(label="ํ์ผ ์ํ", interactive=False, lines=1, scale=2)
|
| 1587 |
+
with gr.Row():
|
| 1588 |
+
max_search_slider = gr.Slider(
|
| 1589 |
+
minimum=5, maximum=100, value=20, step=5,
|
| 1590 |
+
label=f"๐ ์ต๋ ๊ฒ์ ํ์ (์ต๋ {MAX_SEARCHES}ํ)"
|
| 1591 |
+
)
|
| 1592 |
+
temperature_slider = gr.Slider(
|
| 1593 |
+
minimum=0.1, maximum=1.0, value=0.6, step=0.05,
|
| 1594 |
+
label="๐ก Temperature"
|
| 1595 |
+
)
|
| 1596 |
+
with gr.Row():
|
| 1597 |
+
run_btn = gr.Button("๐ SOMA ํ์ดํ๋ผ์ธ ์คํ", variant="primary", scale=3)
|
| 1598 |
+
stop_btn = gr.Button("โ ์ค์ง", variant="secondary", scale=1)
|
| 1599 |
+
|
| 1600 |
+
with gr.Column(scale=1):
|
| 1601 |
+
gr.HTML("""
|
| 1602 |
+
<div style="background:#111120;border:1px solid #2a2a3f;border-radius:10px;padding:14px;font-size:12px;color:#888;">
|
| 1603 |
+
<b style="color:#a78bfa">๐ ํ์ ํ๊ฒฝ๋ณ์</b><br><br>
|
| 1604 |
+
<code style="color:#38BDF8">FIREWORKS_API_KEY</code><br>
|
| 1605 |
+
โ fireworks.ai API ํค<br><br>
|
| 1606 |
+
<code style="color:#4ADE80">BRAVE_API_KEY</code><br>
|
| 1607 |
+
โ brave.com/search/api ํค<br><br>
|
| 1608 |
+
<b style="color:#FBBF24">๐ฟ ํ
ํ๋ฆฟ ํ์ผ</b><br>
|
| 1609 |
+
<code>nh_official_template.hml</code><br>
|
| 1610 |
+
โ Space ๋ฃจํธ์ ์
๋ก๋
|
| 1611 |
+
</div>""")
|
| 1612 |
+
|
| 1613 |
+
with gr.Row():
|
| 1614 |
+
with gr.Column():
|
| 1615 |
+
gr.Markdown("**โก ์์ด์ ํธ ์ค์๊ฐ ์คํธ๋ฆผ**")
|
| 1616 |
+
agent_stream = gr.Textbox(
|
| 1617 |
+
label="", value="", interactive=False,
|
| 1618 |
+
lines=14, max_lines=14,
|
| 1619 |
+
elem_classes=["agent-stream"],
|
| 1620 |
+
show_label=False
|
| 1621 |
+
)
|
| 1622 |
+
with gr.Column():
|
| 1623 |
+
gr.Markdown("**๐ ๊ฒ์ ์งํ ๋ก๊ทธ**")
|
| 1624 |
+
search_log_box = gr.Textbox(
|
| 1625 |
+
label="", value="", interactive=False,
|
| 1626 |
+
lines=7, max_lines=7,
|
| 1627 |
+
elem_classes=["search-log"],
|
| 1628 |
+
show_label=False
|
| 1629 |
+
)
|
| 1630 |
+
search_counter = gr.HTML(
|
| 1631 |
+
'<div class="status-bar">๐ ๊ฒ์ ํ์: 0 / 0</div>'
|
| 1632 |
+
)
|
| 1633 |
+
|
| 1634 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1635 |
+
# TAB 2: ์ต์ข
๋ฌธ์
|
| 1636 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1637 |
+
with gr.Tab("๐ ์ต์ข
๋ฌธ์"):
|
| 1638 |
+
final_doc_box = gr.Textbox(
|
| 1639 |
+
label="IMPACT ์์ด์ ํธ ์ต์ข
ํ์ ๋ฌธ์",
|
| 1640 |
+
value="", interactive=True, lines=25,
|
| 1641 |
+
elem_classes=["final-doc"]
|
| 1642 |
+
)
|
| 1643 |
+
with gr.Row():
|
| 1644 |
+
gen_hml_btn = gr.Button("๐ฅ HWPX ๋ค์ด๋ก๋", variant="primary")
|
| 1645 |
+
copy_text_btn = gr.Button("๐ ํ
์คํธ ๋ณต์ฌ์ฉ", variant="secondary")
|
| 1646 |
+
hml_status = gr.Textbox(label="์ํ", interactive=False, value="")
|
| 1647 |
+
hml_file = gr.File(label="๋ค์ด๋ก๋", visible=False, file_types=[".hwpx"])
|
| 1648 |
+
|
| 1649 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1650 |
+
# TAB 3: ์์ด์ ํธ ๋ก๊ทธ
|
| 1651 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1652 |
+
with gr.Tab("๐งฌ SOMA ์์ด์ ํธ ๋ก๊ทธ"):
|
| 1653 |
+
agent_log_box = gr.Textbox(
|
| 1654 |
+
label="์ ์ฒด ์์ด์ ํธ ์คํ ๋ก๊ทธ",
|
| 1655 |
+
value="", interactive=False, lines=20,
|
| 1656 |
+
elem_classes=["search-log"]
|
| 1657 |
+
)
|
| 1658 |
+
|
| 1659 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1660 |
+
# TAB 4: ๋ฌธ์ ๋ถ์ ์ฑ
|
| 1661 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1662 |
+
with gr.Tab("๐ ๋ฌธ์ ๋ถ์ ์ฑ"):
|
| 1663 |
+
gr.Markdown("**ํ์ผ์ ์
๋ก๋ํ๊ณ AI์๊ฒ ์ง๋ฌธํ์ธ์** (HWP, HWPX, PDF, DOCX, TXT, CSV, Excel)")
|
| 1664 |
+
doc_text_state = gr.State("")
|
| 1665 |
+
with gr.Row():
|
| 1666 |
+
with gr.Column(scale=1):
|
| 1667 |
+
doc_upload = gr.File(
|
| 1668 |
+
label="๐ ๋ฌธ์ ์
๋ก๋",
|
| 1669 |
+
file_types=[".hwp",".hwpx",".hml",".pdf",".docx",".txt",".md",
|
| 1670 |
+
".csv",".json",".xml",".xlsx",".xls",".py",".html",".log"],
|
| 1671 |
+
)
|
| 1672 |
+
doc_upload_status = gr.Textbox(label="ํ์ผ ์ํ", interactive=False, lines=2)
|
| 1673 |
+
with gr.Column(scale=3):
|
| 1674 |
+
doc_chatbot = gr.Chatbot(label="๐ฌ ๋ฌธ์ ๋ถ์ ๋ํ", height=420)
|
| 1675 |
+
with gr.Row():
|
| 1676 |
+
doc_msg = gr.Textbox(
|
| 1677 |
+
label="์ง๋ฌธ ์
๋ ฅ",
|
| 1678 |
+
placeholder="์
๋ก๋๋ ๋ฌธ์์ ๋ํด ์ง๋ฌธํ์ธ์...",
|
| 1679 |
+
lines=2, scale=4
|
| 1680 |
+
)
|
| 1681 |
+
doc_send_btn = gr.Button("๐ ์ ์ก", variant="primary", scale=1)
|
| 1682 |
+
doc_clear_btn = gr.Button("๐๏ธ ๋ํ ์ด๊ธฐํ", variant="secondary")
|
| 1683 |
+
|
| 1684 |
+
def handle_file_upload(file):
|
| 1685 |
+
if file is None:
|
| 1686 |
+
return "", "ํ์ผ์ ์ ํํด์ฃผ์ธ์."
|
| 1687 |
+
fpath = file.name if hasattr(file, 'name') else str(file)
|
| 1688 |
+
fname = os.path.basename(fpath)
|
| 1689 |
+
text, err = process_uploaded_file(fpath)
|
| 1690 |
+
if text:
|
| 1691 |
+
chars = len(text)
|
| 1692 |
+
return text, f"โ
{fname} ({chars:,}์ ์ถ์ถ ์๋ฃ)"
|
| 1693 |
+
return "", f"โ {fname}: {err}"
|
| 1694 |
+
|
| 1695 |
+
doc_upload.change(
|
| 1696 |
+
fn=handle_file_upload,
|
| 1697 |
+
inputs=[doc_upload],
|
| 1698 |
+
outputs=[doc_text_state, doc_upload_status]
|
| 1699 |
+
)
|
| 1700 |
+
|
| 1701 |
+
doc_send_btn.click(
|
| 1702 |
+
fn=doc_chat_respond,
|
| 1703 |
+
inputs=[doc_msg, doc_chatbot, doc_text_state],
|
| 1704 |
+
outputs=[doc_chatbot]
|
| 1705 |
+
).then(lambda: "", outputs=[doc_msg])
|
| 1706 |
+
|
| 1707 |
+
doc_msg.submit(
|
| 1708 |
+
fn=doc_chat_respond,
|
| 1709 |
+
inputs=[doc_msg, doc_chatbot, doc_text_state],
|
| 1710 |
+
outputs=[doc_chatbot]
|
| 1711 |
+
).then(lambda: "", outputs=[doc_msg])
|
| 1712 |
+
|
| 1713 |
+
doc_clear_btn.click(
|
| 1714 |
+
fn=lambda: ([], ""),
|
| 1715 |
+
outputs=[doc_chatbot, doc_text_state]
|
| 1716 |
+
)
|
| 1717 |
+
|
| 1718 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1719 |
+
# TAB 5: ์ค์
|
| 1720 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 1721 |
+
with gr.Tab("โ๏ธ ์ค์ "):
|
| 1722 |
+
gr.Markdown("""
|
| 1723 |
+
### SOMA Metacognitive Pipeline
|
| 1724 |
+
|
| 1725 |
+
| Stage | Agent | Role | Flow |
|
| 1726 |
+
|-------|-------|------|------|
|
| 1727 |
+
| 1 | ๐ RESEARCH | Brave ๊ฒ์ยท์ ๋ณด ์์ง | โ STRUCTURE |
|
| 1728 |
+
| 2 | ๐งฉ STRUCTURE | ๋ฌธ์ ๊ตฌ์กฐ ์ค๊ณ | โ ARGUMENT |
|
| 1729 |
+
| 3 | ๐ฌ ARGUMENT | ํฉํธ์ฒดํฌยท๋
ผ์ฆ ๊ฒ์ฆ | โ EVIDENCE |
|
| 1730 |
+
| 4 | ๐ EVIDENCE | ๋ฌธ์ ํตํฉยท์์ฑ | โ IMPACT |
|
| 1731 |
+
| 5 | ๐ง IMPACT | ๋ฉํ์ธ์ง ์ ์ ยท์์ฑ | โ (์ถ๋ ฅ) |
|
| 1732 |
+
|
| 1733 |
+
**Cross-Check (์ํธ ๊ฒ์ฆ):**
|
| 1734 |
+
- IMPACTโSTRUCTURE: ๊ตฌ์กฐ ์ค๊ณ์ ๋
ผ๋ฆฌ์ ์๊ฒฐ์ฑ ๋นํ
|
| 1735 |
+
- ARGUMENTโIMPACT: ๊ณผ๋ํ ์ ์ ๊ฐ ์๋ ์๋๋ฅผ ํผ์ํ์ง ์๋์ง ๊ฒฌ์
|
| 1736 |
+
- EVIDENCEโRESEARCH: ํตํฉ ๊ณผ์ ์์ ๋๋ฝ๋ ๋ฐ์ดํฐ ์์ฒญ
|
| 1737 |
+
- RESEARCHโARGUMENT: ์์ง ๋จ๊ณ์์ ์ถ์ฒ ์ ๋ขฐ์ฑ ์ฌ์ ๊ฒ์ฆ
|
| 1738 |
+
- STRUCTUREโEVIDENCE: ๊ณจ๊ฒฉ์ด ๊ทผ๊ฑฐ๋ฅผ ์์ฐ์ค๋ฝ๊ฒ ์์ฉํ๋์ง ๊ฐ์ด๋
|
| 1739 |
+
|
| 1740 |
+
**Emergence Matrix:**
|
| 1741 |
+
- 6๊ฐ ๋ ์ด์ด ร ๊ต์ฐจ ์ฐฝ๋ฐ ๋ณด๋์ค๋ก ์ด์ข
๊ด์ ๊ฒฐํฉ ์ ๋
์ฐฝ์ ํต์ฐฐ ์ ๋
|
| 1742 |
+
- Koestler Bisociation ์๋ฆฌ: ๊ฑฐ๋ฆฌ๊ฐ ๋จผ ๋ ์ด์ด ๊ฐ ๊ต์ฐจ์ผ์๋ก ๋์ ์ฐฝ๋ฐ์ฑ
|
| 1743 |
+
|
| 1744 |
+
### ํ์ผ ํ์ ์๋ด
|
| 1745 |
+
์์ฑ๋ `.hwpx` ํ์ผ์ ํ๊ธ(HWP)์์ **๋๋ธํด๋ฆญ**์ผ๋ก ์ด ์ ์์ต๋๋ค.
|
| 1746 |
+
""")
|
| 1747 |
+
gr.Markdown(f"""
|
| 1748 |
+
### ์์ ํ๋กฌํํธ
|
| 1749 |
+
- ์จ๋ผ์ธ ์๊ธ์ค๊ฐ ์๋น์ค ์ ๋ํ ์ถ์ง ๋ฐฉ์ ์ ์ฑ
๋ณด๊ณ ์
|
| 1750 |
+
- ๋์งํธ ๊ธ์ต ํ๋ซํผ ํ์ฑํ๋ฅผ ์ํ ๊ท์ ๊ฐ์ ๋ฐฉ์
|
| 1751 |
+
- ์ธ๊ณต์ง๋ฅ ๊ธฐ๋ฐ ๊ณต๊ณต์๋น์ค ํ์ ์ ๋ต ์๋ฆฝ ๋ณด๊ณ ์
|
| 1752 |
+
- ํ์์ค๋ฆฝ ์คํ์ ์ํ ์๋์ง ์ ํ ์ ์ฑ
๋ก๋๋งต
|
| 1753 |
+
- ์ค๋งํธ์ํฐ ๋ฐ์ดํฐ ๊ฑฐ๋ฒ๋์ค ์ฒด๊ณ ๊ตฌ์ถ ๋ฐฉ์
|
| 1754 |
+
""")
|
| 1755 |
+
|
| 1756 |
+
# โโ ์ํ ์ ์ฅ์ฉ
|
| 1757 |
+
state = gr.State({"final_doc": "", "search_count": 0})
|
| 1758 |
+
dummy_state = gr.State("")
|
| 1759 |
+
|
| 1760 |
+
# ============================================================
|
| 1761 |
+
# ์ด๋ฒคํธ ํธ๋ค๋ฌ
|
| 1762 |
+
# ============================================================
|
| 1763 |
+
def handle_ref_upload(file):
|
| 1764 |
+
if file is None:
|
| 1765 |
+
return "", ""
|
| 1766 |
+
fpath = file.name if hasattr(file, 'name') else str(file)
|
| 1767 |
+
fname = os.path.basename(fpath)
|
| 1768 |
+
text, err = process_uploaded_file(fpath)
|
| 1769 |
+
if text:
|
| 1770 |
+
return text, f"โ
{fname} ({len(text):,}์ ์ถ์ถ)"
|
| 1771 |
+
return "", f"โ {fname}: {err}"
|
| 1772 |
+
|
| 1773 |
+
ref_file_upload.change(
|
| 1774 |
+
fn=handle_ref_upload,
|
| 1775 |
+
inputs=[ref_file_upload],
|
| 1776 |
+
outputs=[ref_text_state, ref_upload_status]
|
| 1777 |
+
)
|
| 1778 |
+
|
| 1779 |
+
def run_soma(prompt, max_search, temperature, ref_text):
|
| 1780 |
+
if not prompt.strip():
|
| 1781 |
+
yield (ohaeng_cards_html("ๆฐด"),
|
| 1782 |
+
"โ ๏ธ ํ๋กฌํํธ๋ฅผ ์
๋ ฅํด์ฃผ์ธ์.", "", "", "",
|
| 1783 |
+
'<div class="status-bar">๋๊ธฐ ์ค</div>', "")
|
| 1784 |
+
return
|
| 1785 |
+
|
| 1786 |
+
# ์ฐธ๊ณ ๋ฌธ์๊ฐ ์์ผ๋ฉด ํ๋กฌํํธ์ ํฌํจ
|
| 1787 |
+
full_prompt = prompt
|
| 1788 |
+
if ref_text and ref_text.strip():
|
| 1789 |
+
ref_snippet = ref_text.strip()[:15000] # ํ ํฐ ์ ํ
|
| 1790 |
+
full_prompt = (
|
| 1791 |
+
f"{prompt}\n\n"
|
| 1792 |
+
f"[์ฐธ๊ณ ๋ฌธ์ ๋ด์ฉ]\n"
|
| 1793 |
+
f"์๋๋ ์ฌ์ฉ์๊ฐ ์
๋ก๋ํ ์ฐธ๊ณ ๋ฌธ์์
๋๋ค. "
|
| 1794 |
+
f"์ด ๋ด์ฉ์ ๋ฐ๋์ ์ฐธ๊ณ ํ์ฌ ๋ฌธ์๋ฅผ ์์ฑํ์ธ์.\n\n"
|
| 1795 |
+
f"{ref_snippet}"
|
| 1796 |
+
)
|
| 1797 |
+
|
| 1798 |
+
stream_acc = ""
|
| 1799 |
+
log_acc = ""
|
| 1800 |
+
search_log = ""
|
| 1801 |
+
active_agent = "ๆฐด"
|
| 1802 |
+
final_doc = ""
|
| 1803 |
+
sc = 0
|
| 1804 |
+
|
| 1805 |
+
for chunk in soma_pipeline(full_prompt, int(max_search), temperature):
|
| 1806 |
+
if chunk.get("done"):
|
| 1807 |
+
final_doc = chunk.get("final_doc","")
|
| 1808 |
+
sc = chunk.get("search_count", sc)
|
| 1809 |
+
log_acc = chunk.get("log","")
|
| 1810 |
+
search_log= chunk.get("search_log","")
|
| 1811 |
+
break
|
| 1812 |
+
|
| 1813 |
+
active_agent = chunk.get("active", active_agent)
|
| 1814 |
+
tok = chunk.get("stream","")
|
| 1815 |
+
if tok:
|
| 1816 |
+
stream_acc += tok
|
| 1817 |
+
# ๋๋ฌด ๊ธธ๋ฉด ์ ๋ถ๋ถ ์๋ผ๋ด๊ธฐ
|
| 1818 |
+
if len(stream_acc) > 8000:
|
| 1819 |
+
stream_acc = "...(์ด์ ์๋ต)...\n" + stream_acc[-6000:]
|
| 1820 |
+
|
| 1821 |
+
if chunk.get("log"): log_acc = chunk["log"]
|
| 1822 |
+
if chunk.get("search_log"): search_log = chunk["search_log"]
|
| 1823 |
+
if chunk.get("search_count") is not None: sc = chunk["search_count"]
|
| 1824 |
+
if chunk.get("final_doc"): final_doc = chunk["final_doc"]
|
| 1825 |
+
|
| 1826 |
+
counter_html = f'<div class="status-bar">๐ ๊ฒ์ ํ์: {sc} / {int(max_search)}</div>'
|
| 1827 |
+
yield (ohaeng_cards_html(active_agent),
|
| 1828 |
+
stream_acc, search_log, log_acc,
|
| 1829 |
+
final_doc if final_doc else "",
|
| 1830 |
+
counter_html, "")
|
| 1831 |
+
|
| 1832 |
+
# ์๋ฃ
|
| 1833 |
+
counter_html = f'<div class="status-bar">โ
์๋ฃ: {sc}ํ ๊ฒ์ ยท ๋ฌธ์ ์์ฑ ์๋ฃ</div>'
|
| 1834 |
+
yield (ohaeng_cards_html("้"),
|
| 1835 |
+
stream_acc + "\n\n๐ SOMA ํ์ดํ๋ผ์ธ ์๋ฃ!", search_log, log_acc,
|
| 1836 |
+
final_doc, counter_html, final_doc)
|
| 1837 |
+
|
| 1838 |
+
run_btn.click(
|
| 1839 |
+
fn=run_soma,
|
| 1840 |
+
inputs=[prompt_input, max_search_slider, temperature_slider, ref_text_state],
|
| 1841 |
+
outputs=[ohaeng_display, agent_stream, search_log_box,
|
| 1842 |
+
agent_log_box, final_doc_box, search_counter,
|
| 1843 |
+
dummy_state]
|
| 1844 |
+
)
|
| 1845 |
+
|
| 1846 |
+
def make_hml(doc_text):
|
| 1847 |
+
if not doc_text or not doc_text.strip():
|
| 1848 |
+
return None, "โ ๋ฌธ์ ๋ด์ฉ์ด ๋น์ด ์์ต๋๋ค. ๋จผ์ ๋ฌธ์๋ฅผ ์์ฑํ์ธ์."
|
| 1849 |
+
try:
|
| 1850 |
+
path = generate_hml(doc_text.strip())
|
| 1851 |
+
# ํ์ผ๋ช
์ ๋ฌธ์ ์ ๋ชฉ.hwpx๋ก ๋ณ๊ฒฝ
|
| 1852 |
+
title = normalize_text_for_title(doc_text.strip())
|
| 1853 |
+
safe_title = re.sub(r'[\\/:*?"<>|]', '', title)[:40].strip() or "๋ฌธ์"
|
| 1854 |
+
new_path = os.path.join(os.path.dirname(path), f"{safe_title}.hwpx")
|
| 1855 |
+
os.rename(path, new_path)
|
| 1856 |
+
return new_path, f"โ
์์ฑ ์๋ฃ ยท ๋ค์ด๋ก๋ ํ ๋๋ธํด๋ฆญ์ผ๋ก ์ด๊ธฐ"
|
| 1857 |
+
except Exception as e:
|
| 1858 |
+
return None, f"โ ์ค๋ฅ: {e}"
|
| 1859 |
+
|
| 1860 |
+
gen_hml_btn.click(
|
| 1861 |
+
fn=make_hml,
|
| 1862 |
+
inputs=[final_doc_box],
|
| 1863 |
+
outputs=[hml_file, hml_status]
|
| 1864 |
+
).then(
|
| 1865 |
+
lambda f: gr.File(visible=f is not None),
|
| 1866 |
+
inputs=[hml_file], outputs=[hml_file]
|
| 1867 |
+
)
|
| 1868 |
+
|
| 1869 |
+
return app
|
| 1870 |
+
|
| 1871 |
+
|
| 1872 |
+
# ============================================================
|
| 1873 |
+
# โง ์ง์
์
|
| 1874 |
+
# ============================================================
|
| 1875 |
+
if __name__ == "__main__":
|
| 1876 |
+
app = build_ui()
|
| 1877 |
+
app.launch()
|
emergence_matrix_document.json
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_meta": {
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"description": "6-Layer ๋ฌธ์์์ฑ ์ฐฝ๋ฐ ๋งคํธ๋ฆญ์ค โ Koestler Bisociation ๊ธฐ๋ฐ ์ด์ข
๋ ์ด์ด ๊ต์ฐจ๋ก ์ฐฝ๋ฐ์ ํต์ฐฐ ์ ๋",
|
| 5 |
+
"philosophy": "์ด์ข
๋ ์ด์ด ๊ฐ ๊ฑฐ๋ฆฌ๊ฐ ๋ฉ์๋ก ๋์ ์ฐฝ๋ฐ์ฑ ๋ณด๋์ค. ์์ด์ ํธ๊ฐ ์๊ธฐ ๋ ์ด์ด ์ธ ์๊ฒฉ ๋ ์ด์ด์ ์ฌ๊ณ ํจํด์ ๊ต์ฐจ ์ ์ฉํ ๋ ๋
์ฐฝ์ ๋ฌธ์๊ฐ ํ์ํ๋ค.",
|
| 6 |
+
"system": "SOMA Pre-AGI Document Emergence Engine",
|
| 7 |
+
"author": "Ginigen AI (์ง๋์ AI)"
|
| 8 |
+
},
|
| 9 |
+
"layers": {
|
| 10 |
+
"RESEARCH": {
|
| 11 |
+
"desc": "ํ์ยท์์ง โ ์ธ๋ถ ์ธ๊ณ์ ์ ๋ณด๋ฅผ ํ์งํ๊ณ ์ ์ ํ๋ ์ธ์ง์ ์
๊ตฌ",
|
| 12 |
+
"agent": "ๆฐด",
|
| 13 |
+
"layer_index": 0,
|
| 14 |
+
"strategies": {
|
| 15 |
+
"ํ์_ํจํด": [
|
| 16 |
+
"์๋ ด์ ๊ฒ์: ํต์ฌ ํค์๋๋ฅผ ์ขํ๊ฐ๋ฉฐ ์ ๋ฐ ํ์",
|
| 17 |
+
"๋ฐ์ฐ์ ๊ฒ์: ์ฐ๊ด ํค์๋๋ฅผ ํ์ฅํ๋ฉฐ ์์ธ์ ์ฐ๊ฒฐ๊ณ ๋ฆฌ ๋ฐ๊ฒฌ",
|
| 18 |
+
"์๊ณ์ด ์ถ์ : ๋์ผ ์ฃผ์ ์ ๊ณผ๊ฑฐโํ์ฌโ๋ฏธ๋ ๋ณํ ํ๋ฆ ์กฐ์ฌ",
|
| 19 |
+
"๋ฐ์ฆ ๊ฒ์: ์ฃผ์ฅ์ ๋ฐ๋ฐํ๋ ์๋ฃ๋ฅผ ์๋์ ์ผ๋ก ํ์",
|
| 20 |
+
"๊ต์ฐจ ๋๋ฉ์ธ ํ์: ์ ํ ๋ค๋ฅธ ๋ถ์ผ์์ ์ ์ฌ ํจํด ๋ฐ๊ฒฌ",
|
| 21 |
+
"์์ ์๊ธ: 2์ฐจ ์๋ฃ์์ 1์ฐจ ์์ (๋ฒ๋ น, ๋
ผ๋ฌธ, ํต๊ณ)์ผ๋ก ๊ฑฐ์ฌ๋ฌ ์ฌ๋ผ๊ฐ",
|
| 22 |
+
"์ดํด๊ด๊ณ์ ๋งคํ: ์ฃผ์ ์ ์ํฅ ๋ฐ๋ ๋ชจ๋ ์ฃผ์ฒด๋ณ ๊ด์ ์์ง",
|
| 23 |
+
"๋ฉํ ๊ฒ์: '์ด ์ฃผ์ ์ ๋ํ ๊ธฐ์กด ๋ณด๊ณ ์/์ฐ๊ตฌ'๋ฅผ ๊ฒ์ํ์ฌ ์ ํ ํ๋ ์ ํ์
"
|
| 24 |
+
],
|
| 25 |
+
"์ ๋ณด_ํ์ง_ํํฐ": [
|
| 26 |
+
"์ถ์ฒ ์๊ณ: ๊ณต์ ๋ฒ๋ น > ์ ๋ถ ๋ณด๊ณ ์ > ํ์ ๋
ผ๋ฌธ > ์ธ๋ก > ๋ธ๋ก๊ทธ",
|
| 27 |
+
"์์ ๊ฒ์ฆ: ์ต์ ๋ฐ์ดํฐ์ธ์ง, ํ๊ธฐ๋ ์ ๋ณด์ธ์ง ์ฐ๋ ํ์ธ",
|
| 28 |
+
"๊ต์ฐจ ๊ฒ์ฆ: ๋์ผ ํฉํธ๋ฅผ 3๊ฐ ์ด์ ๋
๋ฆฝ ์ถ์ฒ์์ ํ์ธ",
|
| 29 |
+
"ํต๊ณ ๋งฅ๋ฝํ: ์ ๋๊ฐ๋ฟ ์๋๋ผ ๋น์จ, ์ถ์ธ, ๋น๊ต ๋์๊น์ง ์์ง",
|
| 30 |
+
"์ธ์ฉ ์ฒด์ธ: ๋๊ฐ ๋๊ตฌ๋ฅผ ์ธ์ฉํ๋์ง ์ถ์ ํ์ฌ ์์ฒ ์ ๋ขฐ๋ ํ๊ฐ"
|
| 31 |
+
],
|
| 32 |
+
"๋ฐ๊ฒฌ_ํ๋ ์": [
|
| 33 |
+
"๋น์นธ ํ์ง: ๊ธฐ์กด ์๋ฃ์์ ๋ค๋ฃจ์ง ์๋ ์์ญ(gap) ์๋ณ",
|
| 34 |
+
"์ด์๊ฐ ํฌ์ฐฉ: ์์๊ณผ ๋ค๋ฅธ ์์น/์ฌ๋ก๋ฅผ ๋ฐ๊ฒฌํ๋ฉด ์์ธ ์ถ์ ",
|
| 35 |
+
"ํจํด ์ธ์: ์๋ก ๋ค๋ฅธ ์๋ฃ์์ ๋ฐ๋ณต๋๋ ๊ณตํต ํจํด ์ถ์ถ",
|
| 36 |
+
"์๋ฌต์ง ๋ฐ๊ตด: ๊ณต์ ๋ฌธ์์๋ ์์ง๋ง ํ์ฅ ์ธํฐ๋ทฐ/์ฌ๋ก์์ ๋๋ฌ๋๋ ์ค์ง ์ ๋ณด"
|
| 37 |
+
]
|
| 38 |
+
}
|
| 39 |
+
},
|
| 40 |
+
"STRUCTURE": {
|
| 41 |
+
"desc": "์ค๊ณยท์กฐ์ง โ ์ ๋ณด๋ฅผ ์ฒด๊ณ์ ๊ณจ๊ฒฉ์ผ๋ก ๋ณํํ๋ ๊ฑด์ถ ํ์",
|
| 42 |
+
"agent": "ๆจ",
|
| 43 |
+
"layer_index": 1,
|
| 44 |
+
"strategies": {
|
| 45 |
+
"๊ตฌ์กฐ_์ํคํ์
": [
|
| 46 |
+
"๋๊ด์(์ญํผ๋ผ๋ฏธ๋): ๊ฒฐ๋ก โ ๊ทผ๊ฑฐ โ ๋ฐฐ๊ฒฝ. ์์ฌ๊ฒฐ์ ์ ๋์ ๋ณด๊ณ ์",
|
| 47 |
+
"๋ฏธ๊ด์(์์ฌํ): ๋ฐฐ๊ฒฝ โ ๋ถ์ โ ๊ฒฐ๋ก . ์ค๋ยท์ ์ ๋ฌธ์",
|
| 48 |
+
"๋ณ๋ ฌํ: ๋๋ฑํ ์ฃผ์ ๋ฅผ ๋๋ํ ๋ฐฐ์น. ๋น๊ตยท๋์ ๋ถ์",
|
| 49 |
+
"๊ณ์ธตํ(๋๋ฆด๋ค์ด): ๊ฑฐ์ โ ๋ฏธ์. ์ ์ฑ
โ ์ธ๋ถ ์คํ๊ณํ",
|
| 50 |
+
"๋ฌธ์ -ํด๊ฒฐํ: ํํฉ(๋ฌธ์ ) โ ์์ธ ๋ถ์ โ ํด๊ฒฐ ๋ฐฉ์ โ ๊ธฐ๋ํจ๊ณผ",
|
| 51 |
+
"์๊ณ์ดํ: ๊ณผ๊ฑฐ โ ํ์ฌ โ ๋ฏธ๋. ๋ก๋๋งตยท์ถ์ง ์ผ์ ",
|
| 52 |
+
"MECE ๋ถํด: ์ํธ๋ฐฐ์ ยท์ ์ฒดํฌ๊ด. ๋น ์ง์๋ ๋ถ๋ฅ ์ฒด๊ณ"
|
| 53 |
+
],
|
| 54 |
+
"์น์
_์ค๊ณ_์๋ฆฌ": [
|
| 55 |
+
"1์น์
1๋ฉ์์ง: ๊ฐ ์น์
์ด ์ ๋ฌํ๋ ํต์ฌ ๋ฉ์์ง 1๊ฐ๋ฅผ ๋จผ์ ์ ์",
|
| 56 |
+
"์ ํ ๋ธ๋ฆฟ์ง: ์น์
๊ฐ ๋
ผ๋ฆฌ์ ์ฐ๊ฒฐ๋ฌธ์ผ๋ก ์์ฐ์ค๋ฌ์ด ํ๋ฆ ๋ณด์ฅ",
|
| 57 |
+
"๊น์ด ๊ท ํ: ์ค์ ์น์
์ ๊น๊ฒ, ๋ถ์ ์น์
์ ๊ฐ๊ฒฐํ๊ฒ",
|
| 58 |
+
"ํยท๊ทธ๋ฆผ ๋ฐฐ์น: ๋ณต์กํ ๋ฐ์ดํฐ๋ ํ๋ก, ํ๋ฆ์ ๋์์ผ๋ก ์๊ฐํ",
|
| 59 |
+
"๋ฐ๋ณต ์ผ๊ฐ: ํต์ฌ ๋ฉ์์ง๋ฅผ ์๋ก ยท๋ณธ๋ก ยท๊ฒฐ๋ก ์์ ์ธ ๋ฒ ๋ฐ๋ณต"
|
| 60 |
+
],
|
| 61 |
+
"์ฐฝ๋ฐ์ _๊ตฌ์กฐ": [
|
| 62 |
+
"์ญ์ค ๊ตฌ์กฐ: ํต๋
๊ณผ ๋ฐ๋๋๋ ๊ฒฐ๋ก ์ ๋จผ์ ์ ์ํ๊ณ ๋
ผ์ฆ ์ ๊ฐ",
|
| 63 |
+
"๋ ์ฆ ์ ํ: ๋์ผ ์ฃผ์ ๋ฅผ ๊ฒฝ์ /๊ธฐ์ /์ฌํ/๋ฒ๋ฅ ๋ ์ฆ๋ก ์ํ ๋ถ์",
|
| 64 |
+
"์ผ์ด์ค ๋๋น: ์ด๋ก ์น์
๋ง๋ค ์ค์ ์ฌ๋ก๋ฅผ ์์ผ๋ก ๋ฐฐ์น",
|
| 65 |
+
"๋ฏธ๋ ์ญ์ฐ: ๋ชฉํ ์ํ๋ฅผ ๋จผ์ ์ ์ํ๊ณ ํ์ฌ๋ก ์ญ์ฐํ์ฌ ๋จ๊ณ ์ค๊ณ"
|
| 66 |
+
]
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
"ARGUMENT": {
|
| 70 |
+
"desc": "๋
ผ์ฆยท๊ฒ์ฆ โ ์ฃผ์ฅ์ ๋จ๋ จํ๊ณ ์ค๋ฅ๋ฅผ ์๊ฐํ๋ ๋นํ์ ์ฌ๊ณ ์์ง",
|
| 71 |
+
"agent": "็ซ",
|
| 72 |
+
"layer_index": 2,
|
| 73 |
+
"strategies": {
|
| 74 |
+
"๋
ผ์ฆ_ํจํด": [
|
| 75 |
+
"์ฐ์ญ๋ฒ: ์ผ๋ฐ ์์น โ ๊ตฌ์ฒด ๊ฒฐ๋ก . ๋ฒ๋ นยท์ ์ฑ
๊ทผ๊ฑฐ ํ์ฉ",
|
| 76 |
+
"๊ท๋ฉ๋ฒ: ์ฌ๋ก ์ถ์ โ ์ผ๋ฐํ. ๋ฐ์ดํฐยทํต๊ณ ๊ธฐ๋ฐ",
|
| 77 |
+
"์ ์ถ๋ฒ: A ๋ถ์ผ ์ฑ๊ณต์ฌ๋ก โ B ๋ถ์ผ ์ ์ฉ ๊ฐ๋ฅ์ฑ ๋
ผ์ฆ",
|
| 78 |
+
"์๊ฑฐ๋ฒ: ๊ฐ๋ฅํ ๋์์ ํ๋์ฉ ๋ฐฐ์ ํ์ฌ ์ต์ ์ ๋์ถ",
|
| 79 |
+
"๋น์ฉํธ์ต: ์ ๋์ ๋น๊ต๋ก ์คํ ํ๋น์ฑ ๋
ผ์ฆ",
|
| 80 |
+
"๋ฐ์ฌ์ค ๋
ผ์ฆ: '๋ง์ฝ ์ด ์ ์ฑ
์ด ์์๋ค๋ฉด' ๊ฐ์ ์๋๋ฆฌ์ค๋ก ํ์์ฑ ์
์ฆ"
|
| 81 |
+
],
|
| 82 |
+
"ํฉํธ์ฒดํฌ_ํ๋กํ ์ฝ": [
|
| 83 |
+
"์์น ๊ฒ์ฆ: ์ถ์ฒ์ ์๋ณธ ๋ฐ์ดํฐ์ ๋์กฐ",
|
| 84 |
+
"๋
ผ๋ฆฌ ๊ฒ์ฆ: ์ ์ โ ๊ฒฐ๋ก ์ฌ์ด ๋น์ฝ์ด ์๋์ง ์ ๊ฒ",
|
| 85 |
+
"์์ ๊ฒ์ฆ: ๋ฐ์ดํฐ์ ๊ธฐ์ค ์์ ์ด ๋ฌธ์ ๋งฅ๋ฝ์ ์ ํฉํ์ง ํ์ธ",
|
| 86 |
+
"๋ฒ์ ๊ฒ์ฆ: ์ผ๋ถ ์ฌ๋ก๋ฅผ ์ ์ฒด๋ก ์ผ๋ฐํํ๋ ์ค๋ฅ ํ์ง",
|
| 87 |
+
"์ดํด์ถฉ๋ ๊ฒ์ฆ: ์ถ์ฒ ๊ธฐ๊ด์ ์ดํด๊ด๊ณ๊ฐ ๋ฐ์ดํฐ์ ํธํฅ์ ์ค ๊ฐ๋ฅ์ฑ ์ ๊ฒ"
|
| 88 |
+
],
|
| 89 |
+
"๋นํ์ _๋ฉํ์ธ์ง": [
|
| 90 |
+
"์๊ธฐ๋ฐ๋ฐ: ๋ด๊ฐ ์์ฑํ ๋
ผ์ฆ์ ๋ํด ๊ฐ์ฅ ๊ฐ๋ ฅํ ๋ฐ๋ก ์ ์ค์ค๋ก ์ ๊ธฐ",
|
| 91 |
+
"๋งน์ ํ์: ๋ด ๋ถ์์์ ๋น ์ง ๊ด์ ์ด ๋ฌด์์ธ์ง ์ฒด๊ณ์ ์ผ๋ก ์ ๊ฒ",
|
| 92 |
+
"ํ์ฆํธํฅ ์ฐจ๋จ: ์ฐฌ์ฑ ๊ทผ๊ฑฐ๋ง ๋ชจ์๋์ง, ๋ฐ๋ ๊ทผ๊ฑฐ๋ ๊ท ํ ์๊ฒ ์์งํ๋์ง ์๋ฌธ",
|
| 93 |
+
"๋ถํ์ค์ฑ ๋ช
์: ํ์คํ ๊ฒ๊ณผ ์ถ์ ์ธ ๊ฒ์ ๊ตฌ๋ถํ์ฌ ํํ"
|
| 94 |
+
]
|
| 95 |
+
}
|
| 96 |
+
},
|
| 97 |
+
"EVIDENCE": {
|
| 98 |
+
"desc": "ํตํฉยท์ค์ฒดํ โ ํฉ์ด์ง ์กฐ๊ฐ์ ํ๋์ ์์ฑ๋ ๋ฌธ์๋ก ์ฃผ์กฐํ๋ ์ฉ๊ด๋ก",
|
| 99 |
+
"agent": "ๅ",
|
| 100 |
+
"layer_index": 3,
|
| 101 |
+
"strategies": {
|
| 102 |
+
"ํตํฉ_๊ธฐ๋ฒ": [
|
| 103 |
+
"๋ชจ์์ดํฌ ํตํฉ: ๊ฐ ์์ด์ ํธ ์ฐ์ถ๋ฌผ์ ์ต์ ๋ถ๋ถ์ ์ ๋ณยท์ฌ์กฐํฉ",
|
| 104 |
+
"๋
ผ๋ฆฌ ์ง์กฐ: ์น์
๊ฐ ์ธ๊ณผ๊ด๊ณ์ ๋
ผ๋ฆฌ ์ฒด์ธ์ ๋ช
์์ ์ผ๋ก ์ฐ๊ฒฐ",
|
| 105 |
+
"ํค ํต์ผ: ์ ์ฒด ๋ฌธ์์ ๋ฌธ์ฒดยท๊ฒฝ์ด๋ฒยท์ ๋ฌธ์ฉ์ด ์์ค์ ์ผ๊ด๋๊ฒ ์กฐ์จ",
|
| 106 |
+
"๋ถ๋ ๋ฐธ๋ฐ์ฑ: ์น์
๋ณ ๋ถ๋์ ์ค์๋์ ๋น๋กํ์ฌ ์ฌ์กฐ์ ",
|
| 107 |
+
"์ค๋ณต ์ ๊ฑฐ: ์ฌ๋ฌ ์์ด์ ํธ๊ฐ ๋ฐ๋ณตํ ๋ด์ฉ์ ๋จ์ผํ",
|
| 108 |
+
"ํยท๋ฐ์ดํฐ ์ฝ์
: ๋
ผ์ฆ์ ๋ท๋ฐ์นจํ๋ ์ ๋ ๋ฐ์ดํฐ๋ฅผ ํ ํ์์ผ๋ก ์ ๋ฆฌ"
|
| 109 |
+
],
|
| 110 |
+
"์์ฑ๋_์ฒดํฌ": [
|
| 111 |
+
"LATCH ๊ตฌ์กฐ ๊ฒ์ฆ: LocationยทAlphabetยทTimeยทCategoryยทHierarchy ์ค ์ ์ ํ ๋ถ๋ฅ ์ฌ์ฉ ์ฌ๋ถ",
|
| 112 |
+
"So-What ํ
์คํธ: ๊ฐ ๋ฌธ๋จ์ ๋ง์ง๋ง์ '๊ทธ๋์ ์ด๋ป๋ค๋ ๊ฒ์ธ๊ฐ?'์ ๋ต์ด ์๋์ง",
|
| 113 |
+
"Elevator Test: ๋ฌธ์ ์ ์ฒด๋ฅผ 30์ด ์์ฝ์ผ๋ก ์ถ์ฝ ๊ฐ๋ฅํ์ง",
|
| 114 |
+
"์คํ ๊ฐ๋ฅ์ฑ: ์ ์๋ ๋ฐฉ์์ด ๊ตฌ์ฒด์ ์คํ ๋จ๊ณ๋ฅผ ํฌํจํ๋์ง"
|
| 115 |
+
],
|
| 116 |
+
"๋
์_์ต์ ํ": [
|
| 117 |
+
"๋
์ ํ๋กํ์ผ๋ง: ์์ฌ๊ฒฐ์ ๊ถ์/์ค๋ฌด์/์ ๋ฌธ๊ฐ ๋ฑ 1์ฐจ ๋
์ ๋ช
ํํ",
|
| 118 |
+
"์ ๋ฌธ์ฉ์ด ๊ฒ์ดํธ: ๋
์ ์์ค์ ๋ง๋ ์ฉ์ด ์ ํ, ํ์์ ๊ดํธ ์ค๋ช
์ถ๊ฐ",
|
| 119 |
+
"ํ๋ ์ ๋: ๋ฌธ์๋ฅผ ์ฝ์ ํ ๋
์๊ฐ ์ทจํด์ผ ํ ๊ตฌ์ฒด์ ํ๋ ๋ช
์"
|
| 120 |
+
]
|
| 121 |
+
}
|
| 122 |
+
},
|
| 123 |
+
"NARRATIVE": {
|
| 124 |
+
"desc": "์์ฌยท๋งฅ๋ฝ โ ํฉํธ๋ฅผ ์ด์ผ๊ธฐ๋ก ๋ณํํ์ฌ ๊ธฐ์ต๊ณผ ์ค๋๋ ฅ์ ์ฆํญํ๋ ๋ ์ด์ด",
|
| 125 |
+
"agent": null,
|
| 126 |
+
"layer_index": 4,
|
| 127 |
+
"strategies": {
|
| 128 |
+
"์์ฌ_๊ธฐ๋ฒ": [
|
| 129 |
+
"ํ๋ ์ด๋ฐ: ๋์ผ ์ฌ์ค์ '์๊ธฐ' ๋๋ '๊ธฐํ'๋ก ํ ์ง๊ธฐ์ ๋ฐ๋ผ ์ค๋๋ ฅ ๋ณํ",
|
| 130 |
+
"๊ตฌ์ฒดํ: ์ถ์์ ํต๊ณ๋ฅผ ๊ฐ์ธยท๊ธฐ์
ยท์ง์ญ์ ๊ตฌ์ฒด์ ์คํ ๋ฆฌ๋ก ๋ณํ",
|
| 131 |
+
"๋๋น ํจ๊ณผ: ๋ณ๊ฒฝ ์ /ํ, ๊ตญ๋ด/ํด์ธ, ํ์ฌ/๋ฏธ๋๋ฅผ ๋๋ํ ๋ณด์ฌ์ฃผ๋ ๊ทน์ ๋๋น",
|
| 132 |
+
"์งํํ ์์ฌ: 'ํ์ฌ ์งํ ์ค์ธ ๋ณํ'๋ฅผ ๊ฐ์กฐํ์ฌ ์๊ธ์ฑ ๋ถ์ฌ",
|
| 133 |
+
"์์
์ ์ฌ์ : ๋ฌธ์ ๋ฐ๊ฒฌ โ ์๋์ ์คํจ โ ํด๊ฒฐ์ฑ
๋ฐ๊ฒฌ โ ์ฑ๊ณผ ๊ตฌ์กฐ"
|
| 134 |
+
],
|
| 135 |
+
"์์ฌ_์ฅ์น": [
|
| 136 |
+
"์ง๋ฌธ ์ฝ์
: '๊ณผ์ฐ ์ด ์ ์ฑ
์ ํจ๊ณผ๊ฐ ์์๊น?' ๊ฐ์ ๋
์ ์ฐธ์ฌํ ์ง๋ฌธ",
|
| 137 |
+
"์ซ์์ ํ: '์ฐ๊ฐ 2.3์กฐ์'๋ณด๋ค '๊ตญ๋ฏผ 1์ธ๋น ์ 3,800์' ๊ฐ์ ์ฒด๊ฐ ํ์ฐ",
|
| 138 |
+
"์ ์ถ: ๋ณต์กํ ์์คํ
์ ์ผ์์ ๋น์ ๋ก ์ค๋ช
",
|
| 139 |
+
"์ ์ง์ ๊ณต๊ฐ: ๊ฒฐ๋ก ์ ์ฆ์ ๋
ธ์ถํ์ง ์๊ณ ๋จ์๋ฅผ ์์๊ฐ๋ฉฐ ๋
ผ๋ฆฌ์ ๊ธด์ฅ๊ฐ ์กฐ์ฑ"
|
| 140 |
+
],
|
| 141 |
+
"๋งฅ๋ฝ_์ค์ ": [
|
| 142 |
+
"์ญ์ฌ์ ๋งฅ๋ฝ: ์ด ์ ์ฑ
/๊ธฐ์ ์ด ํ์ํ๊ฒ ๋ ์ญ์ฌ์ ๋ฐฐ๊ฒฝ",
|
| 143 |
+
"๊ธ๋ก๋ฒ ๋งฅ๋ฝ: ํด์ธ ์ฃผ์๊ตญ์ ๋ํฅ๊ณผ ํ๊ตญ์ ์์น",
|
| 144 |
+
"๊ธฐ์ ์ ๋งฅ๋ฝ: ๊ธฐ๋ฐ ๊ธฐ์ ์ ์ฑ์๋์ ์คํ ๊ฐ๋ฅ์ฑ",
|
| 145 |
+
"์ ๋์ ๋งฅ๋ฝ: ๊ด๋ จ ๋ฒ๋ นยท๊ท์ ยท๊ฑฐ๋ฒ๋์ค ์ฒด๊ณ"
|
| 146 |
+
]
|
| 147 |
+
}
|
| 148 |
+
},
|
| 149 |
+
"IMPACT": {
|
| 150 |
+
"desc": "์ํฅยท๊ฐ์น โ ๋ฌธ์๊ฐ ํ์ค์ ๋ฏธ์น๋ ํ๊ธ๋ ฅ๊ณผ ์์ฌ๊ฒฐ์ ์ด์ง๋ ฅ์ ๊ทน๋ํ",
|
| 151 |
+
"agent": "้",
|
| 152 |
+
"layer_index": 5,
|
| 153 |
+
"strategies": {
|
| 154 |
+
"์ํฅ๋ ฅ_์ฆํญ": [
|
| 155 |
+
"์ ๋ ๊ธฐ๋ํจ๊ณผ: ๋น์ฉ ์ ๊ฐ, ๋งค์ถ ์ฆ๋, ํจ์จ ํฅ์ ๋ฑ ์์น๋ก ํํ",
|
| 156 |
+
"์ ์ฑ ๊ธฐ๋ํจ๊ณผ: ๊ตญ๋ฏผ ํธ์ต, ์ฐ์
๊ฒฝ์๋ ฅ, ์ฌํ์ ๊ฐ์น ๋ฑ ์ง์ ํจ๊ณผ",
|
| 157 |
+
"๋ฆฌ์คํฌ ์ํ: ๋ฏธ์ํ ์ ๋ฐ์ํ ๋ถ์ ์ ์ํฅ์ ๋๋น ์ ์",
|
| 158 |
+
"๋จ๊ณ๋ณ ๋ง์ผ์คํค: ๋จ๊ธฐ(3๊ฐ์)/์ค๊ธฐ(1๋
)/์ฅ๊ธฐ(3๋
) ์ฑ๊ณผ ๋ก๋๋งต",
|
| 159 |
+
"ํ๊ธ ํจ๊ณผ ์ฒด์ธ: 1์ฐจ ํจ๊ณผ โ 2์ฐจ ํ์ ํจ๊ณผ โ ์ฐ์
์ํ๊ณ ๋ณํ"
|
| 160 |
+
],
|
| 161 |
+
"์ต์ข
_์ ์ ": [
|
| 162 |
+
"๋ฌธ์ฒด ์ผ๊ด์ฑ: ์ ์ฒด ๋ฌธ์์ ์ด์กฐยท๊ฒฝ์ด๋ฒยท๋ฒํธ ์ฒด๊ณ ํต์ผ",
|
| 163 |
+
"์ฉ์ด ์ ๋ฐ๋: ๋์์ด ๋ฐ๋ณต ์ ๊ฑฐ, ์ฝ์ด ์ฒซ ๋ฑ์ฅ์ ํ๋ค์ ๋ณ๊ธฐ",
|
| 164 |
+
"๋
ผ๋ฆฌ ์๊ฒฐ์ฑ: ์๋ก ์ ๋ฌธ์ ์ ๊ธฐ๊ฐ ๊ฒฐ๋ก ์์ ํด๊ฒฐ๋๋์ง ํ์ธ",
|
| 165 |
+
"ํ์ ์ ๊ฒ: ์ ๋ชฉยท๋ฒํธยทํยท์ฐธ๊ณ ๋ฌธํ ๋ฑ ์์ ๊ท์น ์ค์",
|
| 166 |
+
"๊ฐ๋
์ฑ ์ต์ ํ: ๋ฌธ์ฅ ๊ธธ์ด, ๋จ๋ฝ ํฌ๊ธฐ, ์ฌ๋ฐฑ ๊ท ํ"
|
| 167 |
+
],
|
| 168 |
+
"๋ฉํ์ธ์ง_์๊ธฐ๊ฒ์ฆ": [
|
| 169 |
+
"์ค๋ฅ ๋ณต๊ตฌ: ์ด์ ๋จ๊ณ ์์ด์ ํธ์ ์ค์๋ฅผ ๊ฐ์งํ๊ณ ์์ฒด ์์ ",
|
| 170 |
+
"์๊ธฐ ๋ฐ์ฑ: ๋ด ์ ์ ๊ฐ ๊ณผ๋ํ์ง ์์์ง, ์๋ ์๋๋ฅผ ํผ์ํ์ง ์์๋์ง ์ ๊ฒ",
|
| 171 |
+
"ํ์ ๋ ํ๊น
: ๊ฐ ์ฃผ์ฅ์ ๋ํ ํ์ ๋(๋์/์ค๊ฐ/๋ฎ์)๋ฅผ ๋ด๋ถ์ ์ผ๋ก ํ๊ฐ",
|
| 172 |
+
"๊ฐ์ ๋ฃจํ: ์์ ํ ๋ถ๋ถ์ด ์๋ก์ด ๋ฌธ์ ๋ฅผ ์ผ๊ธฐํ์ง ์๋์ง ์ฌ๊ฒํ "
|
| 173 |
+
]
|
| 174 |
+
}
|
| 175 |
+
}
|
| 176 |
+
},
|
| 177 |
+
"cross_layer_bonus": {
|
| 178 |
+
"_desc": "๋ ์ด์ด ๊ฐ ๊ฑฐ๋ฆฌ๊ฐ ๋ฉ์๋ก ๊ต์ฐจ ์ ์ฉ ์ ์ฐฝ๋ฐ์ฑ์ด ๋๋ค. ๊ฐ = ์ฐฝ๋ฐ์ฑ ๋ณด๋์ค ๊ฐ์ค์น.",
|
| 179 |
+
"RESEARCHโIMPACT": {
|
| 180 |
+
"bonus": 0.15,
|
| 181 |
+
"hint": "๋ฐ์ดํฐ์์ ๋ฐ๋ก ์์ฌ์ ์ ๋์ถํ๋ฉด ๊ฐ์ฅ ๋
์ฐฝ์ ํต์ฐฐ์ด ํ์ํ๋ค. ์์ง ๋จ๊ณ์์ ์ด๋ฏธ '์ด ๋ฐ์ดํฐ๊ฐ ์์ฌ๊ฒฐ์ ์ ์ด๋ค ์ํฅ์ ์ค๊น?'๋ฅผ ์๋ฌธํ๋ผ."
|
| 182 |
+
},
|
| 183 |
+
"RESEARCHโNARRATIVE": {
|
| 184 |
+
"bonus": 0.12,
|
| 185 |
+
"hint": "๊ฑด์กฐํ ๋ฐ์ดํฐ๋ฅผ ์์งํ๋ฉด์ ๋์์ '์ด๊ฒ์ด ์ด๋ค ์ด์ผ๊ธฐ๊ฐ ๋ ์ ์์๊น?'๋ฅผ ์์ํ๋ผ."
|
| 186 |
+
},
|
| 187 |
+
"STRUCTUREโIMPACT": {
|
| 188 |
+
"bonus": 0.11,
|
| 189 |
+
"hint": "๊ตฌ์กฐ ์ค๊ณ ๋จ๊ณ์์ ์ด๋ฏธ '๊ฐ ์น์
์ด ์ต์ข
์์ฌ๊ฒฐ์ ์ ์ด๋ป๊ฒ ๊ธฐ์ฌํ๋๊ฐ?'๋ฅผ ๊ณ ๋ คํ๋ผ."
|
| 190 |
+
},
|
| 191 |
+
"STRUCTUREโEVIDENCE": {
|
| 192 |
+
"bonus": 0.10,
|
| 193 |
+
"hint": "๊ณจ๊ฒฉ๊ณผ ์ด์ ๋์์ ๊ณ ๋ คํ๋ผ. ๊ตฌ์กฐ๊ฐ ๊ทผ๊ฑฐ๋ฅผ ์์ฐ์ค๋ฝ๊ฒ ๋ฐฐ์นํ ์ ์๋ ํํ์ธ์ง ๊ฒ์ฆ."
|
| 194 |
+
},
|
| 195 |
+
"ARGUMENTโNARRATIVE": {
|
| 196 |
+
"bonus": 0.09,
|
| 197 |
+
"hint": "๋
ผ์ฆ๊ณผ ์์ฌ๋ฅผ ๊ต์ฐจํ๋ผ. ์ฐจ๊ฐ์ด ๋
ผ๋ฆฌ์ ๋ฐ๋ปํ ์ด์ผ๊ธฐ๋ฅผ ์
ํ๋ฉด ์ค๋๋ ฅ์ด ๋ฐฐ๊ฐ๋๋ค."
|
| 198 |
+
},
|
| 199 |
+
"RESEARCHโARGUMENT": {
|
| 200 |
+
"bonus": 0.06,
|
| 201 |
+
"hint": "์์ง๊ณผ ๊ฒ์ฆ์ ๋์์ ์ํํ๋ผ. ์๋ฃ๋ฅผ ๋ชจ์ผ๋ฉด์ ์ ๋ขฐ์ฑ์ ์ค์๊ฐ ํ๊ฐ."
|
| 202 |
+
},
|
| 203 |
+
"EVIDENCEโIMPACT": {
|
| 204 |
+
"bonus": 0.05,
|
| 205 |
+
"hint": "ํตํฉ ์์ฑ ์ ์ต์ข
์ํฉํธ๋ฅผ ์ผ๋์ ๋๋ฉด ๋ถํ์ํ ๋ด์ฉ์ด ์์ฐํ ๊ฑธ๋ฌ์ง๋ค."
|
| 206 |
+
}
|
| 207 |
+
},
|
| 208 |
+
"writing_principles": [
|
| 209 |
+
{
|
| 210 |
+
"id": 1,
|
| 211 |
+
"name": "๋ชจ๋ํ(๋ถํ )",
|
| 212 |
+
"hint": "๋ณต์กํ ์ฃผ์ ๋ฅผ ๋
๋ฆฝ์ ํ์ ๋ชจ๋๋ก ๋ถ๋ฆฌํ์ฌ ๊ฐ๊ฐ์ ์ ๋ฐํ๊ฒ ๋ค๋ฃจ๋, ์ต์ข
ํตํฉ ์ ์๋์ง๋ฅผ ๋
ธ๋ ค๋ผ.",
|
| 213 |
+
"application": "๋์ฃผ์ ๋ฅผ 3~5๊ฐ ๋
๋ฆฝ ์น์
์ผ๋ก ๋ถํด. ๊ฐ ์น์
์ด ๋จ๋
์ผ๋ก๋ ์๋ฏธ๋ฅผ ๊ฐ๋ ์ ์ฒด ์กฐํฉ ์ ๋ ํฐ ๊ทธ๋ฆผ์ ํ์ฑ."
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"id": 2,
|
| 217 |
+
"name": "๋ฐ๋ก ์ ์ (์ญ๋ฐ์)",
|
| 218 |
+
"hint": "๋
์๊ฐ ์ ๊ธฐํ ๋ฐ๋ก ์ ์์ธกํ์ฌ ๋จผ์ ์ ์ํ๊ณ ๋
ผํํ๋ผ. '๊ทธ๋ผ์๋ ๋ถ๊ตฌํ๊ณ ' ๊ตฌ์กฐ.",
|
| 219 |
+
"application": "๊ฐ ์ ์์ ์์ ๋นํ(๋น์ฉ, ๋ถ์์ฉ, ์คํ๊ฐ๋ฅ์ฑ)์ ๋ฏธ๋ฆฌ ๋ช
์ํ๊ณ ๋์ ๋
ผ๋ฆฌ๋ฅผ ๋ฐฐ์น."
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"id": 3,
|
| 223 |
+
"name": "๊ด์ ์ ํ(์ฐจ์๋ณ๊ฒฝ)",
|
| 224 |
+
"hint": "๋์ผ ์ฃผ์ ๋ฅผ ๋ฏธ์โ๊ฑฐ์, ๋จ๊ธฐโ์ฅ๊ธฐ, ๊ตญ๋ดโ๊ธ๋ก๋ฒ, ๊ณต๊ธโ์์ ๋ฑ ๋ค๋ฅธ ์ฐจ์์์ ๋ฐ๋ผ๋ณด๋ผ.",
|
| 225 |
+
"application": "ํ๋์ ์ ์ฑ
์ ์ ๋ถ/๊ธฐ์
/๊ตญ๋ฏผ/๊ตญ์ ์ฌํ 4๊ฐ ๊ด์ ์์ ๊ฐ๊ฐ ๋ถ์ํ์ฌ ์
์ฒด์ ๋ณด๊ณ ์ ์์ฑ."
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"id": 4,
|
| 229 |
+
"name": "์ตํฉ ์ ์(ํตํฉ)",
|
| 230 |
+
"hint": "์๋ก ๊ด๋ จ ์์ด ๋ณด์ด๋ ๋ถ์ผ๋ฅผ ์ฐ๊ฒฐํ์ฌ ๋
์ฐฝ์ ํด๋ฒ์ ์ ์ํ๋ผ.",
|
| 231 |
+
"application": "A ๋ถ์ผ์ ํด๊ฒฐ๋ฒ์ B ๋ถ์ผ์ ์ด์. ์: ํํ
ํฌ ๊ท์ ๊ฒฝํ์ ํฌ์คํ
ํฌ ๊ท์ ์ ์ ์ฉ."
|
| 232 |
+
},
|
| 233 |
+
{
|
| 234 |
+
"id": 5,
|
| 235 |
+
"name": "์๊ธฐโ๊ธฐํ(์ ํ์๋ณต)",
|
| 236 |
+
"hint": "๋ฌธ์ ์ ยท๋ฆฌ์คํฌ๋ฅผ ๋ถ์ํ ๋, ๊ทธ ์์ฒด๋ฅผ ์ฐจ๋ณํ ๊ธฐํ๋ก ์ ํํ ์ ์๋์ง ํ์ํ๋ผ.",
|
| 237 |
+
"application": "๊ท์ ์ฅ๋ฒฝ โ '๊ท์ ์ค์ ์ ์ ์ ํตํ ๊ฒฝ์ ์ฐ์ ํ๋ณด' ๊ฐ์ ์ญ์ ๋
ผ๋ฆฌ."
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"id": 6,
|
| 241 |
+
"name": "์๊ธฐ ์ฐธ์กฐ(๋ฉํ์ธ์ง)",
|
| 242 |
+
"hint": "๋ฌธ์ ์์ฒด๊ฐ ์์ ์ ํ๊ณ์ ์ ์ ๋ฅผ ํฌ๋ช
ํ๊ฒ ๋ฐํ๋ฉด ์ ๋ขฐ๋๊ฐ ์ฌ๋ผ๊ฐ๋ค.",
|
| 243 |
+
"application": "๋ถ์์ ํ๊ณ, ๋ฐ์ดํฐ ์ ์ฝ, ์ถ์ ๋ฒ์๋ฅผ ๋ช
์ํ์ฌ ๋
์๊ฐ ํ๋จํ ๊ทผ๊ฑฐ ์ ๊ณต."
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"id": 7,
|
| 247 |
+
"name": "๊ณ๋จ์ ๊ณต๊ฐ(์ ์ง์ ๋ณต์ก์ฑ)",
|
| 248 |
+
"hint": "๊ฐ๋จํ ๊ฐ๋
์์ ์์ํ์ฌ ์ ์ง์ ์ผ๋ก ๋ณต์กํ ๋ด์ฉ์ผ๋ก ์งํํ๋ผ.",
|
| 249 |
+
"application": "๊ฐ์(1๋ฌธ๋จ) โ ํต์ฌ(2๋ฌธ๋จ) โ ์ธ๋ถ(5๋ฌธ๋จ) โ ๊ธฐ์ ์ ์์ธ(๋ถ๋ก) ๊ตฌ์กฐ."
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"id": 8,
|
| 253 |
+
"name": "๊ณต๋ฐฑ์ ํ(์ถ์ถ)",
|
| 254 |
+
"hint": "๋ถํ์ํ ๋ด์ฉ์ ๊ณผ๊ฐํ ์ ๊ฑฐํ๋ผ. ๋น ๊ณต๊ฐ์ด ํต์ฌ ๋ฉ์์ง๋ฅผ ๋๋ณด์ด๊ฒ ํ๋ค.",
|
| 255 |
+
"application": "๊ฐ ์น์
์์ '์์ด๋ ๋๋ ๋ฌธ์ฅ'์ ์ต์ 20% ์ ๊ฑฐ. ํต์ฌ๋ง ๋จ๊ฒจ ๋ฐ๋ ํฅ์."
|
| 256 |
+
}
|
| 257 |
+
],
|
| 258 |
+
"policy_dilemmas": [
|
| 259 |
+
{
|
| 260 |
+
"dilemma": "๊ท์ vs ํ์ ",
|
| 261 |
+
"resolution": "๊ท์ ์๋๋ฐ์ค: ํ์์ ๊ท์ ์ ์๋ก ํ์ ์คํ ํ์ฉ ํ ๊ฒฐ๊ณผ ๊ธฐ๋ฐ ๊ท์ ์ค๊ณ",
|
| 262 |
+
"writing_tip": "์์ธก ๋
ผ๋ฆฌ๋ฅผ ๊ท ํ ์๊ฒ ์ ์ํ ๋ค, ์ 3์ ์ ์ถฉ์(์๋๋ฐ์ค/๋จ๊ณ์ ๋์
)์ ์ ์"
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"dilemma": "๋ณด์ vs ํธ์์ฑ",
|
| 266 |
+
"resolution": "๋ฆฌ์คํฌ ๊ธฐ๋ฐ ์ธ์ฆ: ์ ์ํ ๊ฑฐ๋๋ ๊ฐํธ ์ธ์ฆ, ๊ณ ์ํ ๊ฑฐ๋๋ง ๊ฐํ ์ธ์ฆ",
|
| 267 |
+
"writing_tip": "์ด๋ถ๋ฒ์ ํผํ๊ณ '์ํ ์์ค๋ณ ์ฐจ๋ฑ ์ ๊ทผ' ๊ฐ์ ๊ทธ๋ผ๋ฐ์ด์
ํด๋ฒ์ ์ ์"
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"dilemma": "์ค์์ง์ค vs ๋ถ์ฐ",
|
| 271 |
+
"resolution": "ํ์ด๋ธ๋ฆฌ๋ ๊ฑฐ๋ฒ๋์ค: ํ์คยท๊ฐ๋
์ ์ค์, ์คํยทํ์ ์ ๋ถ์ฐ",
|
| 272 |
+
"writing_tip": "๊ฐ ๋ชจ๋ธ์ ์ฅ๋จ์ ์ ํ๋ก ๋น๊ตํ ๋ค ๊ฒฐํฉ ๋ชจ๋ธ์ ์๋์ง๋ฅผ ๋
ผ์ฆ"
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"dilemma": "์ฑ๊ณผ vs ํํ",
|
| 276 |
+
"resolution": "์ฐจ๋ฑ ์ง์: ์ฑ๊ณผ ๊ธฐ๋ฐ ์ธ์ผํฐ๋ธ + ๊ธฐ์ด ์ญ๋ ๊ฐํ ์ง์ ๋ณํ",
|
| 277 |
+
"writing_tip": "๊ฒฝ์๊ณผ ํฌ์ฉ์ ๊ท ํ์ ์ ์์น ์๋ฎฌ๋ ์ด์
์ผ๋ก ์ ์"
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"dilemma": "๋จ๊ธฐ vs ์ฅ๊ธฐ",
|
| 281 |
+
"resolution": "๋จ๊ณ๋ณ ๋ก๋๋งต: ๋จ๊ธฐ Quick-Win์ผ๋ก ์ถ์ง๋ ฅ ํ๋ณด, ์ฅ๊ธฐ ๊ตฌ์กฐ๊ฐํ์ผ๋ก ์ง์์ฑ ํ๋ณด",
|
| 282 |
+
"writing_tip": "๋ก๋๋งต ํ๋ฅผ ํ์ฉํ์ฌ ๋จ๊ธฐ(~6๊ฐ์)/์ค๊ธฐ(1~2๋
)/์ฅ๊ธฐ(3~5๋
) ๋ง์ผ์คํค ์ ์"
|
| 283 |
+
},
|
| 284 |
+
{
|
| 285 |
+
"dilemma": "๊ฐ๋ฐฉ vs ๋ณดํธ",
|
| 286 |
+
"resolution": "์กฐ๊ฑด๋ถ ๊ฐ๋ฐฉ: ํต์ฌ ๊ธฐ์ ์ ๋ณดํธํ๋ ์ํ๊ณ ํ์ฑํ๋ฅผ ์ํด ์ฃผ๋ณ ๊ธฐ์ ์ ๊ฐ๋ฐฉ",
|
| 287 |
+
"writing_tip": "๊ฐ๋ฐฉ ๋ฒ์์ ๋ณดํธ ๋ฒ์๋ฅผ ๋ช
ํํ ๊ตฌ๋ถํ๋ ๋งคํธ๋ฆญ์ค ์ ์"
|
| 288 |
+
}
|
| 289 |
+
],
|
| 290 |
+
"perspective_transforms": [
|
| 291 |
+
{
|
| 292 |
+
"from": "๋ฏธ์(๊ฐ๋ณ ์ฌ๋ก)",
|
| 293 |
+
"to": "๊ฑฐ์(์์คํ
์ ์ฒด)",
|
| 294 |
+
"hint": "๊ฐ๋ณ ๊ธฐ์
์ฌ๋ก์์ ์์ํ์ฌ ์ฐ์
์ ์ฒด ํธ๋ ๋๋ก ํ์ฅ",
|
| 295 |
+
"writing_tip": "์ฌ๋ก โ ํจํด โ ์์ฌ์ โ ์ ์ฑ
์ ์ธ ์์๋ก ์ํฅ ์ ๊ฐ"
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"from": "ํ์ฌ(As-Is)",
|
| 299 |
+
"to": "๋ฏธ๋(To-Be)",
|
| 300 |
+
"hint": "ํ์ฌ ์ํ๋ฅผ ์ง๋จํ ๋ค ๋ชฉํ ์ํ๋ฅผ ์ ๋ช
ํ๊ฒ ๊ทธ๋ฆฌ๊ณ ๊ฐญ์ ๋ถ์",
|
| 301 |
+
"writing_tip": "As-Is/To-Be ๋น๊ตํ + ๊ฐญ ๋ถ์ + ์ดํ ๋ก๋๋งต 3์ข
์ธํธ"
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"from": "๊ณต๊ธ์ ๊ด์ ",
|
| 305 |
+
"to": "์์์ ๊ด์ ",
|
| 306 |
+
"hint": "์ ์ฑ
์
์์/๊ธฐ์
์ด ์๋ ์ต์ข
์ฌ์ฉ์/๊ตญ๋ฏผ์ ์์ ์์ ์ฌํด์",
|
| 307 |
+
"writing_tip": "์ฌ์ฉ์ ์ฌ์ ๋งตํ์ผ๋ก Pain Point๋ฅผ ์๊ฐํํ๋ฉด ์ค๋๋ ฅ์ด ๋ฐฐ๊ฐ"
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"from": "์ ๋(์ซ์)",
|
| 311 |
+
"to": "์ ์ฑ(์๋ฏธ)",
|
| 312 |
+
"hint": "ํต๊ณ ๋ค์ ์จ์ ์ธ๊ฐ์ ์๋ฏธ์ ์ฌํ์ ๋งฅ๋ฝ์ ํจ๊ป ์์ ",
|
| 313 |
+
"writing_tip": "์์น ์ ์ ์งํ '์ด๊ฒ์ด ์๋ฏธํ๋ ๋ฐ๋' ๋ฌธ์ฅ์ผ๋ก ํด์ ๋ ์ด์ด ์ถ๊ฐ"
|
| 314 |
+
},
|
| 315 |
+
{
|
| 316 |
+
"from": "๊ตญ๋ด",
|
| 317 |
+
"to": "๊ธ๋ก๋ฒ",
|
| 318 |
+
"hint": "ํ๊ตญ ์ํฉ์ ๊ธ๋ก๋ฒ ๋ฒค์น๋งํฌ์ ๋น๊ตํ์ฌ ์์น ํ์
",
|
| 319 |
+
"writing_tip": "์ฃผ์๊ตญ ๋น๊ตํ(๋ฏธ๊ตญ/EU/์ผ๋ณธ/ํ๊ตญ)๋ก ๊ฐ๊ด์ ํฌ์ง์
๋ ์ ์"
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"from": "๊ธฐ์ ",
|
| 323 |
+
"to": "์ ๋",
|
| 324 |
+
"hint": "๊ธฐ์ ์ ๊ฐ๋ฅ์ฑ์ ์ ๋์ ์คํ๊ฐ๋ฅ์ฑ๊ณผ ๊ต์ฐจ ๊ฒํ ",
|
| 325 |
+
"writing_tip": "๊ธฐ์ ์ฑ์๋(TRL)์ ๊ท์ ์ค๋น๋๋ฅผ 2ร2 ๋งคํธ๋ฆญ์ค๋ก ๋์ ํ๊ฐ"
|
| 326 |
+
}
|
| 327 |
+
],
|
| 328 |
+
"metacognitive_protocols": {
|
| 329 |
+
"_desc": "์์ด์ ํธ ๊ฐ ์ํธ ๊ฒ์ฆ(์๊ทน)์ ๋ฉํ์ธ์ง์ ์๊ธฐ๊ฒ์ฆ์ผ๋ก ๊ตฌํํ๋ ํ๋กํ ์ฝ",
|
| 330 |
+
"self_reflection": {
|
| 331 |
+
"trigger": "๊ฐ ์์ด์ ํธ ์ถ๋ ฅ ์๋ฃ ์ง์ ",
|
| 332 |
+
"questions": [
|
| 333 |
+
"๋ด ๋ถ์์์ ๊ฐ์ฅ ์ฝํ ๊ณ ๋ฆฌ(weakest link)๋ ์ด๋์ธ๊ฐ?",
|
| 334 |
+
"๋ด๊ฐ ์๋ฌต์ ์ผ๋ก ๊ฐ์ ํ๊ณ ์๋ ์ ์ ๋ ๋ฌด์์ธ๊ฐ?",
|
| 335 |
+
"๋ฐ๋ ์
์ฅ์์ ๋ณด๋ฉด ์ด๋ค ๋ฐ๋ก ์ด ๊ฐ๋ฅํ๊ฐ?",
|
| 336 |
+
"์ด ๋ฌธ์๋ฅผ ์ฝ๋ ๋น์ ๋ฌธ๊ฐ๋ ํต์ฌ์ ์ดํดํ ์ ์๋๊ฐ?"
|
| 337 |
+
]
|
| 338 |
+
},
|
| 339 |
+
"error_recovery": {
|
| 340 |
+
"trigger": "๋ค์ ์์ด์ ํธ๊ฐ ์ด์ ์์ด์ ํธ์ ์ถ๋ ฅ์ ๋ฐ์ ๋",
|
| 341 |
+
"protocol": [
|
| 342 |
+
"์ด์ ์์ด์ ํธ์ ์ฃผ์ฅ ์ค ๊ทผ๊ฑฐ๊ฐ ๋ถ์ถฉ๋ถํ ํญ๋ชฉ ์๋ณ",
|
| 343 |
+
"๋
ผ๋ฆฌ์ ๋น์ฝ ๋๋ ์๊ธฐ๋ชจ์ ํ์ง",
|
| 344 |
+
"๋๋ฝ๋ ์ค์ ๊ด์ ์ถ๊ฐ ์ ์",
|
| 345 |
+
"์์ ์ฌํญ์ [์์ ] ํ๊ทธ๋ก ๋ช
์ํ์ฌ ํฌ๋ช
์ฑ ํ๋ณด"
|
| 346 |
+
]
|
| 347 |
+
},
|
| 348 |
+
"confidence_calibration": {
|
| 349 |
+
"levels": {
|
| 350 |
+
"HIGH": "3๊ฐ ์ด์ ๋
๋ฆฝ ์ถ์ฒ์์ ๊ต์ฐจ ๊ฒ์ฆ๋ ํฉํธ",
|
| 351 |
+
"MEDIUM": "1~2๊ฐ ์ถ์ฒ ๊ธฐ๋ฐ, ๋
ผ๋ฆฌ์ ์ผ๋ก ํ๋นํ๋ ์ถ๊ฐ ๊ฒ์ฆ ๊ถ์ฅ",
|
| 352 |
+
"LOW": "์ถ์ ยท์ถ๋ก ๊ธฐ๋ฐ, ๋ฐ๋์ '์ถ์ ' ๋๋ '๊ฐ๋ฅ์ฑ' ํํ ์ฌ์ฉ"
|
| 353 |
+
}
|
| 354 |
+
}
|
| 355 |
+
}
|
| 356 |
+
}
|
index.html
ADDED
|
@@ -0,0 +1,609 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ko">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>SOMA Pre-AGI ยท Metacognitive Document Engine</title>
|
| 7 |
+
<link href="https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 8 |
+
<style>
|
| 9 |
+
*{margin:0;padding:0;box-sizing:border-box;}
|
| 10 |
+
:root{
|
| 11 |
+
--bg:#f8f9fc;--bg2:#f0f2f8;--surface:#ffffff;--surface2:#f5f6fa;
|
| 12 |
+
--border:#e2e5f0;--border2:#c7cce0;
|
| 13 |
+
--text:#0f172a;--text2:#475569;--muted:#94a3b8;--muted2:#cbd5e1;
|
| 14 |
+
--shadow:0 4px 16px rgba(15,23,42,.06),0 1px 3px rgba(15,23,42,.08);
|
| 15 |
+
--shadow-sm:0 1px 3px rgba(15,23,42,.04),0 1px 2px rgba(15,23,42,.06);
|
| 16 |
+
--shadow-lg:0 12px 40px rgba(15,23,42,.08),0 4px 12px rgba(15,23,42,.06);
|
| 17 |
+
--ac:#6366f1;--ac2:#4f46e5;--ac-bg:rgba(99,102,241,.06);
|
| 18 |
+
--re:#0EA5E9;--st:#16A34A;--ar:#DC2626;--ev:#D97706;--im:#7C3AED;
|
| 19 |
+
--re-bg:#EFF8FF;--st-bg:#F0FDF4;--ar-bg:#FFF5F5;--ev-bg:#FFFBEB;--im-bg:#F5F3FF;
|
| 20 |
+
--radius:14px;--radius-sm:10px;
|
| 21 |
+
--font:'Sora',sans-serif;--mono:'JetBrains Mono',monospace;
|
| 22 |
+
--tr:0.22s cubic-bezier(0.4,0,0.2,1);
|
| 23 |
+
}
|
| 24 |
+
html,body{height:100%;overflow:hidden;font-family:var(--font);background:var(--bg);color:var(--text);font-size:13px;-webkit-font-smoothing:antialiased;}
|
| 25 |
+
body::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
|
| 26 |
+
background:radial-gradient(ellipse 70% 45% at 15% 8%,rgba(99,102,241,.05),transparent 55%),
|
| 27 |
+
radial-gradient(ellipse 55% 35% at 85% 92%,rgba(13,148,136,.04),transparent 50%);}
|
| 28 |
+
::-webkit-scrollbar{width:4px;height:4px;}
|
| 29 |
+
::-webkit-scrollbar-track{background:transparent;}
|
| 30 |
+
::-webkit-scrollbar-thumb{background:rgba(99,102,241,.2);border-radius:10px;}
|
| 31 |
+
::selection{background:rgba(99,102,241,.12);}
|
| 32 |
+
|
| 33 |
+
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
|
| 34 |
+
@keyframes shimmer{0%,100%{background-position:0%}50%{background-position:100%}}
|
| 35 |
+
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.8)}}
|
| 36 |
+
@keyframes spin{to{transform:rotate(360deg)}}
|
| 37 |
+
@keyframes glow{0%,100%{box-shadow:0 0 8px var(--ac)}50%{box-shadow:0 0 20px var(--ac)}}
|
| 38 |
+
|
| 39 |
+
/* TOPBAR */
|
| 40 |
+
.topbar{position:fixed;top:0;left:0;right:0;z-index:1000;height:48px;display:flex;align-items:center;gap:12px;padding:0 20px;
|
| 41 |
+
background:rgba(255,255,255,.85);backdrop-filter:blur(12px);border-bottom:1px solid var(--border);box-shadow:var(--shadow-sm);}
|
| 42 |
+
.topbar-logo{font-family:var(--mono);font-size:11px;font-weight:800;letter-spacing:2px;
|
| 43 |
+
background:linear-gradient(135deg,var(--re),var(--st),var(--ar),var(--ev),var(--im));background-size:300%;
|
| 44 |
+
animation:shimmer 6s ease-in-out infinite;-webkit-background-clip:text;-webkit-text-fill-color:transparent;}
|
| 45 |
+
.topbar-sub{font-size:9.5px;color:var(--muted);font-family:var(--mono);letter-spacing:.3px;}
|
| 46 |
+
.topbar-sep{width:1px;height:22px;background:var(--border);margin:0 2px;}
|
| 47 |
+
.topbar-badge{display:flex;align-items:center;gap:5px;background:var(--surface2);border:1px solid var(--border);
|
| 48 |
+
border-radius:20px;padding:3px 10px;font-family:var(--mono);font-size:8.5px;color:var(--text2);font-weight:600;}
|
| 49 |
+
.topbar-badge .pulse-dot{width:5px;height:5px;border-radius:50%;animation:pulse 2s infinite;}
|
| 50 |
+
.chip{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:20px;font-family:var(--mono);font-size:8.5px;font-weight:600;}
|
| 51 |
+
.chip-idle{background:var(--surface2);color:var(--muted);border:1px solid var(--border);}
|
| 52 |
+
.chip-run{background:var(--ac-bg);color:var(--ac);border:1px solid rgba(99,102,241,.3);animation:glow 2s infinite;}
|
| 53 |
+
.chip-done{background:rgba(22,163,74,.08);color:#16a34a;border:1px solid rgba(22,163,74,.3);}
|
| 54 |
+
.chip-err{background:rgba(220,38,38,.08);color:#DC2626;border:1px solid rgba(220,38,38,.3);}
|
| 55 |
+
.ml-auto{margin-left:auto;}
|
| 56 |
+
.topbar-clock{font-family:var(--mono);font-size:9px;color:var(--muted);letter-spacing:.5px;}
|
| 57 |
+
|
| 58 |
+
/* LAYOUT */
|
| 59 |
+
.main-layout{position:fixed;top:48px;left:0;right:0;bottom:44px;display:grid;
|
| 60 |
+
grid-template-columns:220px 1fr 230px;gap:0;overflow:hidden;z-index:1;}
|
| 61 |
+
|
| 62 |
+
/* PANELS */
|
| 63 |
+
.panel-left,.panel-right{background:var(--surface);border-right:1px solid var(--border);overflow-y:auto;padding:12px;}
|
| 64 |
+
.panel-right{border-right:none;border-left:1px solid var(--border);}
|
| 65 |
+
.panel-center{display:flex;flex-direction:column;overflow:hidden;background:var(--bg);}
|
| 66 |
+
.panel-section{margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--border);}
|
| 67 |
+
.panel-section:last-child{border-bottom:none;}
|
| 68 |
+
.panel-heading{font-family:var(--mono);font-size:8.5px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted);margin-bottom:10px;}
|
| 69 |
+
|
| 70 |
+
/* AGENT CARDS */
|
| 71 |
+
.agent-card{padding:10px 12px;border-radius:var(--radius-sm);border:1px solid var(--border);margin-bottom:6px;transition:var(--tr);cursor:default;position:relative;overflow:hidden;}
|
| 72 |
+
.agent-card::before{content:'';position:absolute;inset:0;opacity:0;transition:opacity .3s;pointer-events:none;}
|
| 73 |
+
.agent-card.active{border-color:var(--ac);box-shadow:0 0 0 2px rgba(99,102,241,.15);}
|
| 74 |
+
.agent-card.re::before{background:linear-gradient(135deg,rgba(14,165,233,.06),transparent);}
|
| 75 |
+
.agent-card.st::before{background:linear-gradient(135deg,rgba(22,163,74,.06),transparent);}
|
| 76 |
+
.agent-card.ar::before{background:linear-gradient(135deg,rgba(220,38,38,.06),transparent);}
|
| 77 |
+
.agent-card.ev::before{background:linear-gradient(135deg,rgba(217,119,6,.06),transparent);}
|
| 78 |
+
.agent-card.im::before{background:linear-gradient(135deg,rgba(124,58,237,.06),transparent);}
|
| 79 |
+
.agent-card.active::before{opacity:1;}
|
| 80 |
+
.agent-top{display:flex;align-items:center;gap:8px;}
|
| 81 |
+
.agent-emoji{font-size:18px;width:28px;text-align:center;}
|
| 82 |
+
.agent-name{font-family:var(--mono);font-size:10px;font-weight:700;letter-spacing:.5px;}
|
| 83 |
+
.agent-name.re{color:var(--re);}.agent-name.st{color:var(--st);}.agent-name.ar{color:var(--ar);}.agent-name.ev{color:var(--ev);}.agent-name.im{color:var(--im);}
|
| 84 |
+
.agent-role{font-size:9px;color:var(--muted);}
|
| 85 |
+
.agent-status{margin-left:auto;font-family:var(--mono);font-size:8px;font-weight:700;letter-spacing:.5px;padding:2px 8px;border-radius:10px;}
|
| 86 |
+
.agent-status.idle{background:var(--surface2);color:var(--muted2);}
|
| 87 |
+
.agent-status.run{background:var(--ac-bg);color:var(--ac);}
|
| 88 |
+
.agent-status.done{background:rgba(22,163,74,.08);color:#16a34a;}
|
| 89 |
+
.flow-line{text-align:center;padding:2px 0;font-size:10px;color:var(--muted2);display:flex;align-items:center;justify-content:center;gap:6px;}
|
| 90 |
+
.flow-arrow{color:var(--ac);font-weight:700;}
|
| 91 |
+
|
| 92 |
+
/* SEARCH COUNTER */
|
| 93 |
+
.sc-bar-wrap{height:4px;background:var(--surface2);border-radius:2px;margin-top:6px;overflow:hidden;}
|
| 94 |
+
.sc-bar{height:100%;background:linear-gradient(90deg,var(--re),var(--ac));border-radius:2px;width:0;transition:width .5s;}
|
| 95 |
+
.sc-label{font-family:var(--mono);font-size:8px;color:var(--muted);text-transform:uppercase;letter-spacing:1px;font-weight:600;}
|
| 96 |
+
.sc-value{font-family:var(--mono);font-size:20px;font-weight:800;color:var(--ac);}
|
| 97 |
+
.sc-max{font-family:var(--mono);font-size:10px;color:var(--muted);}
|
| 98 |
+
|
| 99 |
+
/* TABS */
|
| 100 |
+
.tab-nav{display:flex;gap:0;border-bottom:1.5px solid var(--border);background:var(--surface);padding:0 16px;}
|
| 101 |
+
.tab-btn{padding:10px 18px;font-family:var(--mono);font-size:10px;font-weight:600;color:var(--muted);border:none;background:none;
|
| 102 |
+
cursor:pointer;border-bottom:2px solid transparent;transition:var(--tr);letter-spacing:.3px;}
|
| 103 |
+
.tab-btn:hover{color:var(--text);background:var(--ac-bg);}
|
| 104 |
+
.tab-btn.active{color:var(--ac);border-bottom-color:var(--ac);background:var(--ac-bg);}
|
| 105 |
+
.tab-content{display:none;flex:1;overflow:hidden;flex-direction:column;}
|
| 106 |
+
.tab-content.active{display:flex;}
|
| 107 |
+
|
| 108 |
+
/* PROMPT TAB */
|
| 109 |
+
.prompt-area{padding:16px;border-bottom:1px solid var(--border);background:var(--surface);}
|
| 110 |
+
.prompt-label{font-family:var(--mono);font-size:9px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--muted);margin-bottom:8px;display:flex;align-items:center;gap:6px;}
|
| 111 |
+
.prompt-wrap{position:relative;}
|
| 112 |
+
.prompt-input{width:100%;padding:12px 14px;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-family:var(--font);font-size:12.5px;
|
| 113 |
+
color:var(--text);background:var(--surface);resize:none;outline:none;transition:var(--tr);line-height:1.6;}
|
| 114 |
+
.prompt-input:focus{border-color:var(--ac);box-shadow:0 0 0 3px rgba(99,102,241,.08);}
|
| 115 |
+
.btn-row{display:flex;gap:8px;margin-top:10px;align-items:center;}
|
| 116 |
+
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:1.5px solid var(--border);border-radius:var(--radius-sm);
|
| 117 |
+
font-family:var(--mono);font-size:10px;font-weight:600;cursor:pointer;transition:var(--tr);letter-spacing:.3px;}
|
| 118 |
+
.btn-primary{background:linear-gradient(135deg,var(--ac),var(--ac2));color:#fff;border-color:transparent;box-shadow:0 3px 12px rgba(99,102,241,.2);}
|
| 119 |
+
.btn-primary:hover{box-shadow:0 6px 20px rgba(99,102,241,.3);transform:translateY(-1px);}
|
| 120 |
+
.btn-primary.running{background:linear-gradient(135deg,#DC2626,#B91C1C);}
|
| 121 |
+
.btn-secondary{background:var(--surface);color:var(--text2);}
|
| 122 |
+
.btn-secondary:hover{background:var(--ac-bg);border-color:rgba(99,102,241,.3);color:var(--ac);}
|
| 123 |
+
.btn-success{background:linear-gradient(135deg,#16a34a,#15803d);color:#fff;border-color:transparent;}
|
| 124 |
+
.spinner{width:12px;height:12px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;display:none;}
|
| 125 |
+
.spinner.visible{display:inline-block;animation:spin .8s linear infinite;}
|
| 126 |
+
.example-btn{display:block;width:100%;text-align:left;padding:8px 12px;margin-bottom:5px;border:1px solid var(--border);border-radius:8px;
|
| 127 |
+
background:var(--surface);font-size:11px;color:var(--text2);cursor:pointer;transition:var(--tr);line-height:1.5;}
|
| 128 |
+
.example-btn:hover{border-color:var(--ac);background:var(--ac-bg);color:var(--ac);}
|
| 129 |
+
.api-warn{display:none;padding:8px 12px;background:rgba(217,119,6,.06);border:1px solid rgba(217,119,6,.2);border-radius:8px;
|
| 130 |
+
font-size:10px;color:#B45309;margin-bottom:8px;}
|
| 131 |
+
|
| 132 |
+
/* STREAM */
|
| 133 |
+
.stream-wrap{flex:1;display:flex;flex-direction:column;overflow:hidden;}
|
| 134 |
+
.stream-header{display:flex;align-items:center;gap:8px;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--surface);}
|
| 135 |
+
.stream-box{flex:1;overflow-y:auto;padding:16px;font-family:var(--mono);font-size:11px;line-height:1.8;color:var(--text2);
|
| 136 |
+
background:linear-gradient(180deg,var(--bg),var(--surface2));white-space:pre-wrap;word-break:break-word;}
|
| 137 |
+
.stream-empty{color:var(--muted);font-style:italic;}
|
| 138 |
+
|
| 139 |
+
/* DOC */
|
| 140 |
+
.doc-wrap{flex:1;display:flex;flex-direction:column;overflow:hidden;padding:16px;}
|
| 141 |
+
.doc-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:10px;}
|
| 142 |
+
.doc-area{flex:1;overflow-y:auto;padding:20px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
|
| 143 |
+
font-size:12.5px;line-height:1.9;color:var(--text);box-shadow:var(--shadow-sm);white-space:pre-wrap;word-break:break-word;}
|
| 144 |
+
.doc-empty{color:var(--muted);text-align:center;padding:60px 20px;font-size:13px;}
|
| 145 |
+
|
| 146 |
+
/* LOG */
|
| 147 |
+
.log-wrap{flex:1;display:flex;flex-direction:column;overflow:hidden;padding:16px;}
|
| 148 |
+
.log-box{flex:1;overflow-y:auto;padding:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
|
| 149 |
+
font-family:var(--mono);font-size:10px;line-height:1.7;color:var(--text2);white-space:pre-wrap;}
|
| 150 |
+
|
| 151 |
+
/* SETTINGS */
|
| 152 |
+
.setting-item{margin-bottom:14px;}
|
| 153 |
+
.setting-label{font-size:11px;color:var(--text2);display:flex;justify-content:space-between;margin-bottom:6px;}
|
| 154 |
+
.setting-val{font-family:var(--mono);font-weight:700;color:var(--ac);}
|
| 155 |
+
input[type=range]{width:100%;accent-color:var(--ac);height:4px;}
|
| 156 |
+
.pipeline-flow{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:6px 0;}
|
| 157 |
+
.pf-node{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;
|
| 158 |
+
border:2px solid var(--border);background:var(--surface);transition:var(--tr);}
|
| 159 |
+
.pf-node.active{border-color:var(--ac);box-shadow:0 0 0 3px rgba(99,102,241,.15);transform:scale(1.15);}
|
| 160 |
+
.pf-arrow{font-size:10px;color:var(--muted2);}
|
| 161 |
+
.dl-area{padding:10px 0;}
|
| 162 |
+
.dl-filename{font-family:var(--mono);font-size:10px;color:var(--text2);margin-bottom:8px;padding:6px 10px;background:var(--surface2);border-radius:6px;border:1px solid var(--border);}
|
| 163 |
+
.dl-status{font-family:var(--mono);font-size:9px;color:var(--muted);margin-top:6px;}
|
| 164 |
+
.dl-status.ok{color:#16a34a;}.dl-status.err{color:#DC2626;}
|
| 165 |
+
|
| 166 |
+
/* SEARCH FEED */
|
| 167 |
+
.search-feed{position:fixed;bottom:44px;left:0;width:220px;height:140px;overflow-y:auto;
|
| 168 |
+
background:var(--surface);border-top:1px solid var(--border);border-right:1px solid var(--border);z-index:2;padding:8px 10px;}
|
| 169 |
+
.search-feed-h{font-family:var(--mono);font-size:8px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--muted);
|
| 170 |
+
margin-bottom:6px;display:flex;align-items:center;gap:5px;}
|
| 171 |
+
.sf-item{font-family:var(--mono);font-size:9px;color:var(--text2);padding:3px 0;display:flex;gap:6px;border-bottom:1px solid rgba(0,0,0,.03);animation:fadeIn .3s;}
|
| 172 |
+
.sf-num{color:var(--muted);min-width:24px;}.sf-text{color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
| 173 |
+
|
| 174 |
+
/* STATS BAR */
|
| 175 |
+
.stats-bar{position:fixed;bottom:0;left:0;right:0;height:44px;z-index:1000;display:flex;align-items:center;gap:0;
|
| 176 |
+
background:rgba(255,255,255,.9);backdrop-filter:blur(12px);border-top:1px solid var(--border);padding:0 16px;}
|
| 177 |
+
.stat-box{flex:1;text-align:center;padding:4px 0;}
|
| 178 |
+
.stat-val{font-family:var(--mono);font-size:13px;font-weight:800;}
|
| 179 |
+
.stat-val.re{color:var(--re);}.stat-val.st{color:var(--st);}.stat-val.ar{color:var(--ar);}.stat-val.ev{color:var(--ev);}.stat-val.im{color:var(--im);}.stat-val.gray{color:var(--muted);}
|
| 180 |
+
.stat-label{font-size:8px;color:var(--muted);font-family:var(--mono);letter-spacing:.3px;}
|
| 181 |
+
|
| 182 |
+
/* TOAST */
|
| 183 |
+
.toast{position:fixed;bottom:60px;left:50%;transform:translateX(-50%) translateY(20px);opacity:0;padding:10px 24px;
|
| 184 |
+
background:var(--text);color:#fff;border-radius:var(--radius-sm);font-family:var(--mono);font-size:11px;font-weight:500;
|
| 185 |
+
box-shadow:var(--shadow-lg);transition:all .3s;z-index:9999;pointer-events:none;}
|
| 186 |
+
.toast.visible{opacity:1;transform:translateX(-50%) translateY(0);}
|
| 187 |
+
.toast.ok{background:#16a34a;}.toast.err{background:#DC2626;}
|
| 188 |
+
|
| 189 |
+
/* DIAGRAM */
|
| 190 |
+
.meta-diagram{display:flex;flex-direction:column;gap:4px;margin-top:8px;font-family:var(--mono);font-size:9px;}
|
| 191 |
+
.md-row{display:flex;align-items:center;gap:6px;padding:2px 0;}
|
| 192 |
+
.md-arrow{color:var(--ac);font-weight:700;font-size:10px;}
|
| 193 |
+
.md-label{color:var(--muted);font-size:8px;margin-left:auto;}
|
| 194 |
+
</style>
|
| 195 |
+
</head>
|
| 196 |
+
<body>
|
| 197 |
+
|
| 198 |
+
<!-- TOPBAR -->
|
| 199 |
+
<div class="topbar">
|
| 200 |
+
<div class="topbar-logo">SOMA PRE-AGI</div>
|
| 201 |
+
<div class="topbar-sep"></div>
|
| 202 |
+
<div class="topbar-sub">Metacognitive Document Engine</div>
|
| 203 |
+
<div class="topbar-sep"></div>
|
| 204 |
+
<div class="topbar-badge"><div class="pulse-dot" style="background:var(--ac)"></div>EMERGENCE MATRIX v1.0</div>
|
| 205 |
+
<div class="topbar-sep"></div>
|
| 206 |
+
<div class="chip chip-idle" id="pipelineChip">โ IDLE</div>
|
| 207 |
+
<div class="ml-auto"></div>
|
| 208 |
+
<div class="topbar-clock" id="clock"></div>
|
| 209 |
+
</div>
|
| 210 |
+
|
| 211 |
+
<div class="main-layout">
|
| 212 |
+
|
| 213 |
+
<!-- LEFT PANEL -->
|
| 214 |
+
<div class="panel-left">
|
| 215 |
+
<div class="panel-section">
|
| 216 |
+
<div class="panel-heading">Agent Pipeline</div>
|
| 217 |
+
|
| 218 |
+
<div class="agent-card re" id="card-ๆฐด">
|
| 219 |
+
<div class="agent-top">
|
| 220 |
+
<span class="agent-emoji">๐</span>
|
| 221 |
+
<div><div class="agent-name re">RESEARCH</div><div class="agent-role">ํ์ ยท ์ ๋ณด์์ง</div></div>
|
| 222 |
+
<div class="agent-status idle" id="st-ๆฐด">IDLE</div>
|
| 223 |
+
</div>
|
| 224 |
+
</div>
|
| 225 |
+
<div class="flow-line"><span class="flow-arrow">โ</span><span style="font-size:7px;color:var(--muted2)">PIPE</span></div>
|
| 226 |
+
|
| 227 |
+
<div class="agent-card st" id="card-ๆจ">
|
| 228 |
+
<div class="agent-top">
|
| 229 |
+
<span class="agent-emoji">๐งฉ</span>
|
| 230 |
+
<div><div class="agent-name st">STRUCTURE</div><div class="agent-role">์ค๊ณ ยท ๊ตฌ์กฐํ</div></div>
|
| 231 |
+
<div class="agent-status idle" id="st-ๆจ">IDLE</div>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
<div class="flow-line"><span class="flow-arrow">โ</span><span style="font-size:7px;color:var(--muted2)">PIPE</span></div>
|
| 235 |
+
|
| 236 |
+
<div class="agent-card ar" id="card-็ซ">
|
| 237 |
+
<div class="agent-top">
|
| 238 |
+
<span class="agent-emoji">๐ฌ</span>
|
| 239 |
+
<div><div class="agent-name ar">ARGUMENT</div><div class="agent-role">๋
ผ์ฆ ยท ๊ฒ์ฆ</div></div>
|
| 240 |
+
<div class="agent-status idle" id="st-็ซ">IDLE</div>
|
| 241 |
+
</div>
|
| 242 |
+
</div>
|
| 243 |
+
<div class="flow-line"><span class="flow-arrow">โ</span><span style="font-size:7px;color:var(--muted2)">PIPE</span></div>
|
| 244 |
+
|
| 245 |
+
<div class="agent-card ev" id="card-ๅ">
|
| 246 |
+
<div class="agent-top">
|
| 247 |
+
<span class="agent-emoji">๐</span>
|
| 248 |
+
<div><div class="agent-name ev">EVIDENCE</div><div class="agent-role">ํตํฉ ยท ์ค์ฒดํ</div></div>
|
| 249 |
+
<div class="agent-status idle" id="st-ๅ">IDLE</div>
|
| 250 |
+
</div>
|
| 251 |
+
</div>
|
| 252 |
+
<div class="flow-line"><span class="flow-arrow">โ</span><span style="font-size:7px;color:var(--muted2)">PIPE</span></div>
|
| 253 |
+
|
| 254 |
+
<div class="agent-card im" id="card-้">
|
| 255 |
+
<div class="agent-top">
|
| 256 |
+
<span class="agent-emoji">๐ง </span>
|
| 257 |
+
<div><div class="agent-name im">IMPACT</div><div class="agent-role">๋ฉํ์ธ์ง ยท ์ ์ </div></div>
|
| 258 |
+
<div class="agent-status idle" id="st-้">IDLE</div>
|
| 259 |
+
</div>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
|
| 263 |
+
<div class="panel-section">
|
| 264 |
+
<div class="panel-heading">Search Progress</div>
|
| 265 |
+
<div>
|
| 266 |
+
<div class="sc-label">๊ฒ์ ํ์</div>
|
| 267 |
+
<div style="display:flex;align-items:baseline;gap:4px;">
|
| 268 |
+
<div class="sc-value" id="searchCount">0</div>
|
| 269 |
+
<div class="sc-max" id="searchMax">/ 20</div>
|
| 270 |
+
</div>
|
| 271 |
+
<div class="sc-bar-wrap"><div class="sc-bar" id="scBar"></div></div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
|
| 275 |
+
<div class="panel-section">
|
| 276 |
+
<div class="panel-heading">Pipeline Timer</div>
|
| 277 |
+
<div style="font-family:var(--mono);font-size:10px;color:var(--muted);display:flex;flex-direction:column;gap:5px;">
|
| 278 |
+
<div style="display:flex;justify-content:space-between;"><span>์์</span><span id="pipeStart" style="color:var(--text2)">โ</span></div>
|
| 279 |
+
<div style="display:flex;justify-content:space-between;"><span>๊ฒฝ๊ณผ</span><span id="pipeElapsed" style="color:var(--ac)">โ</span></div>
|
| 280 |
+
<div style="display:flex;justify-content:space-between;"><span>๋จ๊ณ</span><span id="pipeStage" style="color:var(--text2)">โ</span></div>
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<!-- CENTER -->
|
| 286 |
+
<div class="panel-center">
|
| 287 |
+
<div class="tab-nav">
|
| 288 |
+
<button class="tab-btn active" onclick="switchTab('prompt',this)">๐ Input</button>
|
| 289 |
+
<button class="tab-btn" onclick="switchTab('stream',this)">โก Stream</button>
|
| 290 |
+
<button class="tab-btn" onclick="switchTab('doc',this)">๐ Document</button>
|
| 291 |
+
<button class="tab-btn" onclick="switchTab('log',this)">๐งฌ Log</button>
|
| 292 |
+
</div>
|
| 293 |
+
|
| 294 |
+
<!-- TAB: Input -->
|
| 295 |
+
<div class="tab-content active" id="tab-prompt">
|
| 296 |
+
<div class="prompt-area">
|
| 297 |
+
<div class="prompt-label"><span style="width:6px;height:6px;border-radius:50%;background:var(--re);display:inline-block;"></span> Document Generation Prompt</div>
|
| 298 |
+
<div class="api-warn" id="apiWarn">โ FIREWORKS_API_KEY ๋๋ BRAVE_API_KEY ํ๊ฒฝ๋ณ์๋ฅผ Space Secrets์ ์ค์ ํ์ธ์.</div>
|
| 299 |
+
<div class="prompt-wrap">
|
| 300 |
+
<textarea class="prompt-input" id="promptInput" rows="4"
|
| 301 |
+
placeholder="์: ์จ๋ผ์ธ ์๊ธ์ค๊ฐ ์๋น์ค ์ ๋ํ ์ถ์ง ๋ฐฉ์์ ๋ํ ์ ์ฑ
๋ณด๊ณ ์๋ฅผ ์์ฑํด์ฃผ์ธ์."></textarea>
|
| 302 |
+
</div>
|
| 303 |
+
<div class="btn-row">
|
| 304 |
+
<button class="btn btn-primary" id="runBtn" onclick="runPipeline()">
|
| 305 |
+
<div class="spinner" id="btnSpinner"></div>
|
| 306 |
+
<span id="btnLabel">๐ SOMA ์คํ</span>
|
| 307 |
+
</button>
|
| 308 |
+
<button class="btn btn-secondary" onclick="resetAll()">โบ ์ด๊ธฐํ</button>
|
| 309 |
+
<div style="margin-left:auto;font-family:var(--mono);font-size:9px;color:var(--muted);">
|
| 310 |
+
Search <span id="labelMax">20</span> ยท Temp <span id="labelTemp">0.6</span>
|
| 311 |
+
</div>
|
| 312 |
+
</div>
|
| 313 |
+
</div>
|
| 314 |
+
<div style="padding:14px;overflow-y:auto;flex:1;">
|
| 315 |
+
<div style="font-family:var(--mono);font-size:8.5px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted);margin-bottom:10px;">๐ Example Prompts</div>
|
| 316 |
+
<button class="example-btn" onclick="setExample(this)">์จ๋ผ์ธ ์๊ธ์ค๊ฐ ์๋น์ค ์ ๋ํ ์ถ์ง ๋ฐฉ์์ ๋ํ ์ ์ฑ
๋ณด๊ณ ์๋ฅผ ์์ฑํด์ฃผ์ธ์.</button>
|
| 317 |
+
<button class="example-btn" onclick="setExample(this)">์ธ๊ณต์ง๋ฅ ๊ธฐ๋ฐ ๊ณต๊ณต์๋น์ค ํ์ ์ ๋ต ์๋ฆฝ ๋ณด๊ณ ์๋ฅผ ์์ฑํด์ฃผ์ธ์.</button>
|
| 318 |
+
<button class="example-btn" onclick="setExample(this)">ํ์์ค๋ฆฝ ์คํ์ ์ํ ์๋์ง ์ ํ ์ ์ฑ
๋ก๋๋งต์ ์์ฑํด์ฃผ์ธ์.</button>
|
| 319 |
+
<button class="example-btn" onclick="setExample(this)">AI ๋ณด์ ์ ๋ง๊ธฐ์
์ก์ฑ ์ง์์ฌ์
๊ณต๋ชจ ์ ์์๋ฅผ ์์ฑํด์ฃผ์ธ์.</button>
|
| 320 |
+
<button class="example-btn" onclick="setExample(this)">์ค๋งํธ์ํฐ ๊ตฌ์ถ์ ์ํ ๋ฐ์ดํฐ ๊ฑฐ๋ฒ๋์ค ์ฒด๊ณ ๊ตฌ์ถ ๋ฐฉ์์ ์์ฑํด์ฃผ์ธ์.</button>
|
| 321 |
+
|
| 322 |
+
<div style="font-family:var(--mono);font-size:8.5px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted);margin:16px 0 10px;">๐ Cross-Check Relations</div>
|
| 323 |
+
<div class="meta-diagram">
|
| 324 |
+
<div class="md-row"><span>๐ง IMPACT</span><span class="md-arrow">โ</span><span>๐งฉ STRUCTURE</span><span class="md-label">๊ตฌ์กฐ ๋นํ</span></div>
|
| 325 |
+
<div class="md-row"><span>๐งฉ STRUCTURE</span><span class="md-arrow">โ</span><span>๐ EVIDENCE</span><span class="md-label">ํตํฉ ๊ฐ์ด๋</span></div>
|
| 326 |
+
<div class="md-row"><span>๐ EVIDENCE</span><span class="md-arrow">โ</span><span>๐ RESEARCH</span><span class="md-label">๋ฐ์ดํฐ ์์ฒญ</span></div>
|
| 327 |
+
<div class="md-row"><span>๐ RESEARCH</span><span class="md-arrow">โ</span><span>๐ฌ ARGUMENT</span><span class="md-label">์ถ์ฒ ๊ฒ์ฆ</span></div>
|
| 328 |
+
<div class="md-row"><span>๐ฌ ARGUMENT</span><span class="md-arrow">โ</span><span>๐ง IMPACT</span><span class="md-label">์ ์ ๊ฒฌ์ </span></div>
|
| 329 |
+
</div>
|
| 330 |
+
</div>
|
| 331 |
+
</div>
|
| 332 |
+
|
| 333 |
+
<!-- TAB: Stream -->
|
| 334 |
+
<div class="tab-content" id="tab-stream">
|
| 335 |
+
<div class="stream-wrap">
|
| 336 |
+
<div class="stream-header">
|
| 337 |
+
<div class="chip chip-idle" id="streamBadge">Agent Idle</div>
|
| 338 |
+
<div style="font-family:var(--mono);font-size:9px;color:var(--muted);" id="streamAgentLabel"></div>
|
| 339 |
+
<div style="margin-left:auto;"><button class="btn btn-secondary" style="padding:4px 10px;font-size:9px;" onclick="clearStream()">Clear</button></div>
|
| 340 |
+
</div>
|
| 341 |
+
<div class="stream-box" id="streamBox"><span class="stream-empty">SOMA ํ์ดํ๋ผ์ธ์ ์คํํ๋ฉด ์์ด์ ํธ ์ค์๊ฐ ์ถ๋ ฅ์ด ์ฌ๊ธฐ์ ํ์๋ฉ๋๋ค.</span></div>
|
| 342 |
+
</div>
|
| 343 |
+
</div>
|
| 344 |
+
|
| 345 |
+
<!-- TAB: Document -->
|
| 346 |
+
<div class="tab-content" id="tab-doc">
|
| 347 |
+
<div class="doc-wrap">
|
| 348 |
+
<div class="doc-toolbar">
|
| 349 |
+
<div style="font-family:var(--mono);font-size:9px;color:var(--muted);font-weight:700;letter-spacing:1px;text-transform:uppercase;">๐ง IMPACT Final Document</div>
|
| 350 |
+
<div style="margin-left:auto;display:flex;gap:8px;">
|
| 351 |
+
<button class="btn btn-secondary" style="padding:5px 12px;font-size:9px;" onclick="copyDoc()">๐ Copy</button>
|
| 352 |
+
<button class="btn btn-success" style="padding:5px 12px;font-size:9px;" id="hmlBtn" onclick="downloadHml()">๐ฅ HWPX</button>
|
| 353 |
+
</div>
|
| 354 |
+
</div>
|
| 355 |
+
<div class="doc-area" id="docArea"><div class="doc-empty">๐ ๋ฌธ์๊ฐ ์์ฑ๋๋ฉด ์ฌ๊ธฐ์ ํ์๋ฉ๋๋ค.<br><br>SOMA ํ์ดํ๋ผ์ธ์ ์คํํ์ธ์.</div></div>
|
| 356 |
+
<div style="font-family:var(--mono);font-size:9px;color:var(--muted);padding:4px 0;">โน ์์ฑ๋ .hwpx ํ์ผ์ ํ๊ธ(HWP)์์ ๋๋ธํด๋ฆญ์ผ๋ก ์ด ์ ์์ต๋๋ค.</div>
|
| 357 |
+
</div>
|
| 358 |
+
</div>
|
| 359 |
+
|
| 360 |
+
<!-- TAB: Log -->
|
| 361 |
+
<div class="tab-content" id="tab-log">
|
| 362 |
+
<div class="log-wrap">
|
| 363 |
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
|
| 364 |
+
<div style="font-family:var(--mono);font-size:9px;color:var(--muted);font-weight:700;letter-spacing:1px;text-transform:uppercase;">๐งฌ Agent Pipeline Log</div>
|
| 365 |
+
<button class="btn btn-secondary" style="padding:4px 10px;font-size:9px;margin-left:auto;" onclick="clearLog()">Clear</button>
|
| 366 |
+
</div>
|
| 367 |
+
<div class="log-box" id="logBox">์์ด์ ํธ ๋ก๊ทธ๊ฐ ์ฌ๊ธฐ์ ๊ธฐ๋ก๋ฉ๋๋ค.</div>
|
| 368 |
+
</div>
|
| 369 |
+
</div>
|
| 370 |
+
</div>
|
| 371 |
+
|
| 372 |
+
<!-- RIGHT PANEL -->
|
| 373 |
+
<div class="panel-right">
|
| 374 |
+
<div class="panel-section">
|
| 375 |
+
<div class="panel-heading">Settings</div>
|
| 376 |
+
<div class="setting-item">
|
| 377 |
+
<div class="setting-label">๐ ์ต๋ ๊ฒ์ ํ์ <span class="setting-val" id="valSearch">20</span></div>
|
| 378 |
+
<input type="range" min="5" max="100" step="5" value="20" id="sliderSearch" oninput="updateSlider('Search',this.value)">
|
| 379 |
+
</div>
|
| 380 |
+
<div class="setting-item">
|
| 381 |
+
<div class="setting-label">๐ก Temperature <span class="setting-val" id="valTemp">0.6</span></div>
|
| 382 |
+
<input type="range" min="0.1" max="1.0" step="0.05" value="0.6" id="sliderTemp" oninput="updateSlider('Temp',this.value)">
|
| 383 |
+
</div>
|
| 384 |
+
</div>
|
| 385 |
+
|
| 386 |
+
<div class="panel-section">
|
| 387 |
+
<div class="panel-heading">Pipeline Flow</div>
|
| 388 |
+
<div class="pipeline-flow">
|
| 389 |
+
<div class="pf-node" id="ss-ๆฐด">๐</div><div class="pf-arrow">โ</div>
|
| 390 |
+
<div class="pf-node" id="ss-ๆจ">๐งฉ</div><div class="pf-arrow">โ</div>
|
| 391 |
+
<div class="pf-node" id="ss-็ซ">๐ฌ</div><div class="pf-arrow">โ</div>
|
| 392 |
+
<div class="pf-node" id="ss-ๅ">๐</div><div class="pf-arrow">โ</div>
|
| 393 |
+
<div class="pf-node" id="ss-้">๐ง </div>
|
| 394 |
+
</div>
|
| 395 |
+
<div style="margin-top:8px;font-size:9px;color:var(--muted);line-height:1.7;font-family:var(--mono);">
|
| 396 |
+
Pipeline: RESโSTRโARGโEVIโIMP<br>
|
| 397 |
+
Cross: IMPโธSTR ยท STRโธEVI ยท EVIโธRES
|
| 398 |
+
</div>
|
| 399 |
+
</div>
|
| 400 |
+
|
| 401 |
+
<div class="panel-section">
|
| 402 |
+
<div class="panel-heading">HWPX Download</div>
|
| 403 |
+
<div class="dl-area">
|
| 404 |
+
<div class="dl-filename" id="dlFilename">ํ์ผ ์์</div>
|
| 405 |
+
<button class="btn btn-success" style="width:100%;justify-content:center;" id="dlBtn" onclick="downloadHml()" disabled>๐ฅ HWPX ๋ค์ด๋ก๋</button>
|
| 406 |
+
<div class="dl-status" id="dlStatus">๋ฌธ์ ์์ฑ ํ ์ฌ์ฉ ๊ฐ๋ฅํฉ๋๋ค.</div>
|
| 407 |
+
<a id="dlLink"></a>
|
| 408 |
+
</div>
|
| 409 |
+
</div>
|
| 410 |
+
|
| 411 |
+
<div class="panel-section">
|
| 412 |
+
<div class="panel-heading">Backend URL</div>
|
| 413 |
+
<div><input id="backendUrl" type="text" style="width:100%;padding:6px 8px;border:1px solid var(--border);border-radius:6px;font-family:var(--mono);font-size:10px;background:var(--surface2);color:var(--text);outline:none;" placeholder="https://your-space.hf.space" value="">
|
| 414 |
+
<div style="color:var(--muted2);font-size:8px;margin-top:4px;font-family:var(--mono);">HF Space URL (๋น์๋๋ฉด ๋์ผ ์ค๋ฆฌ์ง)</div></div>
|
| 415 |
+
</div>
|
| 416 |
+
|
| 417 |
+
<div class="panel-section">
|
| 418 |
+
<div class="panel-heading">Agent Layers</div>
|
| 419 |
+
<div style="font-size:9.5px;color:var(--text2);line-height:2;font-family:var(--mono);">
|
| 420 |
+
<div style="display:flex;align-items:center;gap:6px;"><span style="width:7px;height:7px;border-radius:50%;background:var(--re);display:inline-block;"></span>RESEARCH: Brave Search</div>
|
| 421 |
+
<div style="display:flex;align-items:center;gap:6px;"><span style="width:7px;height:7px;border-radius:50%;background:var(--st);display:inline-block;"></span>STRUCTURE: ๋ฌธ์ ์ค๊ณ</div>
|
| 422 |
+
<div style="display:flex;align-items:center;gap:6px;"><span style="width:7px;height:7px;border-radius:50%;background:var(--ar);display:inline-block;"></span>ARGUMENT: ํฉํธ์ฒดํฌ</div>
|
| 423 |
+
<div style="display:flex;align-items:center;gap:6px;"><span style="width:7px;height:7px;border-radius:50%;background:var(--ev);display:inline-block;"></span>EVIDENCE: ๋ฌธ์ ํตํฉ</div>
|
| 424 |
+
<div style="display:flex;align-items:center;gap:6px;"><span style="width:7px;height:7px;border-radius:50%;background:var(--im);display:inline-block;"></span>IMPACT: ๋ฉํ์ธ์ง ์ ์ </div>
|
| 425 |
+
</div>
|
| 426 |
+
</div>
|
| 427 |
+
</div>
|
| 428 |
+
|
| 429 |
+
</div>
|
| 430 |
+
|
| 431 |
+
<!-- SEARCH FEED -->
|
| 432 |
+
<div class="search-feed" id="searchFeed">
|
| 433 |
+
<div class="search-feed-h"><span style="width:5px;height:5px;border-radius:50%;background:var(--re);display:inline-block;"></span> Search Log</div>
|
| 434 |
+
<div id="searchFeedList"></div>
|
| 435 |
+
</div>
|
| 436 |
+
|
| 437 |
+
<!-- STATS BAR -->
|
| 438 |
+
<div class="stats-bar">
|
| 439 |
+
<div class="stat-box"><div class="stat-val re" id="statSearch">0</div><div class="stat-label">๐ Searches</div></div>
|
| 440 |
+
<div class="stat-box"><div class="stat-val st" id="statAgent">โ</div><div class="stat-label">๐ค Agent</div></div>
|
| 441 |
+
<div class="stat-box"><div class="stat-val ev" id="statTokens">0</div><div class="stat-label">๐ Length</div></div>
|
| 442 |
+
<div class="stat-box"><div class="stat-val gray" id="statTime">โ</div><div class="stat-label">โฑ Elapsed</div></div>
|
| 443 |
+
<div class="stat-box"><div class="stat-val im" id="statStatus">IDLE</div><div class="stat-label">๐ก Pipeline</div></div>
|
| 444 |
+
</div>
|
| 445 |
+
|
| 446 |
+
<div class="toast" id="toast"></div>
|
| 447 |
+
|
| 448 |
+
<script>
|
| 449 |
+
let running=false,eventSource=null,pipeStartTime=null,elapsedTimer=null,totalSearchCount=0,maxSearchCount=20,streamText='',logText='',finalDoc='',lastHmlPath='';
|
| 450 |
+
const OHAENG=['ๆฐด','ๆจ','็ซ','ๅ','้'];
|
| 451 |
+
const OHAENG_CLASS={'ๆฐด':'re','ๆจ':'st','็ซ':'ar','ๅ':'ev','้':'im'};
|
| 452 |
+
const OHAENG_LABEL={'ๆฐด':'RESEARCH','ๆจ':'STRUCTURE','็ซ':'ARGUMENT','ๅ':'EVIDENCE','้':'IMPACT'};
|
| 453 |
+
const OHAENG_EMOJI={'ๆฐด':'๐','ๆจ':'๐งฉ','็ซ':'๐ฌ','ๅ':'๐','้':'๐ง '};
|
| 454 |
+
|
| 455 |
+
function updateClock(){const d=new Date();document.getElementById('clock').textContent=d.toISOString().slice(0,16).replace('T',' ')+' KST';}
|
| 456 |
+
setInterval(updateClock,1000);updateClock();
|
| 457 |
+
|
| 458 |
+
function switchTab(id,btn){
|
| 459 |
+
document.querySelectorAll('.tab-content').forEach(t=>t.classList.remove('active'));
|
| 460 |
+
document.querySelectorAll('.tab-btn').forEach(b=>b.classList.remove('active'));
|
| 461 |
+
document.getElementById('tab-'+id).classList.add('active');
|
| 462 |
+
if(btn)btn.classList.add('active');
|
| 463 |
+
}
|
| 464 |
+
function updateSlider(key,val){
|
| 465 |
+
document.getElementById('val'+key).textContent=val;
|
| 466 |
+
if(key==='Search'){maxSearchCount=parseInt(val);document.getElementById('searchMax').textContent='/ '+val;document.getElementById('labelMax').textContent=val;}
|
| 467 |
+
if(key==='Temp')document.getElementById('labelTemp').textContent=val;
|
| 468 |
+
}
|
| 469 |
+
function setExample(btn){document.getElementById('promptInput').value=btn.textContent.trim();document.getElementById('promptInput').focus();}
|
| 470 |
+
|
| 471 |
+
function activateAgent(agent){
|
| 472 |
+
OHAENG.forEach(a=>{
|
| 473 |
+
document.getElementById('card-'+a).classList.remove('active');
|
| 474 |
+
document.getElementById('ss-'+a).classList.remove('active');
|
| 475 |
+
if(a===agent){
|
| 476 |
+
document.getElementById('card-'+a).classList.add('active');
|
| 477 |
+
document.getElementById('ss-'+a).classList.add('active');
|
| 478 |
+
const st=document.getElementById('st-'+a);st.className='agent-status run';st.textContent='โ RUN';
|
| 479 |
+
}
|
| 480 |
+
});
|
| 481 |
+
document.getElementById('statAgent').textContent=OHAENG_LABEL[agent]||agent;
|
| 482 |
+
document.getElementById('pipeStage').textContent=OHAENG_LABEL[agent]||agent;
|
| 483 |
+
const badge=document.getElementById('streamBadge');
|
| 484 |
+
badge.className='chip chip-run';badge.textContent='โ '+(OHAENG_LABEL[agent]||agent)+' Processing';
|
| 485 |
+
document.getElementById('streamAgentLabel').textContent='Search: '+totalSearchCount+'/'+maxSearchCount;
|
| 486 |
+
}
|
| 487 |
+
function completeAgent(agent){const st=document.getElementById('st-'+agent);if(st){st.className='agent-status done';st.textContent='โ DONE';}}
|
| 488 |
+
function resetAgents(){OHAENG.forEach(a=>{document.getElementById('card-'+a).classList.remove('active');document.getElementById('ss-'+a).classList.remove('active');const st=document.getElementById('st-'+a);st.className='agent-status idle';st.textContent='IDLE';});}
|
| 489 |
+
|
| 490 |
+
function addSearchFeed(num,text,cls='re'){
|
| 491 |
+
const list=document.getElementById('searchFeedList');
|
| 492 |
+
const item=document.createElement('div');item.className='sf-item';
|
| 493 |
+
item.innerHTML=`<span class="sf-num">${String(num).padStart(3,'0')}</span><span class="sf-text">${escapeHtml(text.slice(0,60))}</span>`;
|
| 494 |
+
list.insertBefore(item,list.firstChild);if(list.children.length>60)list.removeChild(list.lastChild);
|
| 495 |
+
}
|
| 496 |
+
function escapeHtml(t){return t.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');}
|
| 497 |
+
|
| 498 |
+
function appendStream(text,agent){
|
| 499 |
+
const box=document.getElementById('streamBox');
|
| 500 |
+
const empty=box.querySelector('.stream-empty');if(empty)empty.remove();
|
| 501 |
+
streamText+=text;document.getElementById('statTokens').textContent=streamText.length.toLocaleString();
|
| 502 |
+
const span=document.createElement('span');span.textContent=text;box.appendChild(span);box.scrollTop=box.scrollHeight;
|
| 503 |
+
}
|
| 504 |
+
function clearStream(){document.getElementById('streamBox').innerHTML='<span class="stream-empty">์คํธ๋ฆผ์ด ์ง์์ก์ต๋๋ค.</span>';streamText='';}
|
| 505 |
+
function clearLog(){document.getElementById('logBox').textContent='';logText='';}
|
| 506 |
+
|
| 507 |
+
function showFinalDoc(text){
|
| 508 |
+
finalDoc=text;document.getElementById('docArea').textContent=text;
|
| 509 |
+
document.querySelectorAll('.tab-btn').forEach(b=>b.classList.remove('active'));
|
| 510 |
+
document.querySelectorAll('.tab-content').forEach(t=>t.classList.remove('active'));
|
| 511 |
+
document.getElementById('tab-doc').classList.add('active');
|
| 512 |
+
document.querySelectorAll('.tab-btn')[2].classList.add('active');
|
| 513 |
+
document.getElementById('dlBtn').disabled=false;
|
| 514 |
+
document.getElementById('dlFilename').textContent='๋ฌธ์.hwpx';
|
| 515 |
+
document.getElementById('dlStatus').className='dl-status ok';document.getElementById('dlStatus').textContent='โ HWPX ์์ฑ ์ค๋น ์๋ฃ';
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
function updateProgress(){
|
| 519 |
+
const pct=maxSearchCount>0?Math.min(100,(totalSearchCount/maxSearchCount)*100):0;
|
| 520 |
+
document.getElementById('scBar').style.width=pct+'%';document.getElementById('searchCount').textContent=totalSearchCount;document.getElementById('statSearch').textContent=totalSearchCount;
|
| 521 |
+
}
|
| 522 |
+
function startElapsed(){
|
| 523 |
+
pipeStartTime=Date.now();document.getElementById('pipeStart').textContent=new Date().toLocaleTimeString('ko-KR',{hour:'2-digit',minute:'2-digit',second:'2-digit'});
|
| 524 |
+
elapsedTimer=setInterval(()=>{const sec=Math.floor((Date.now()-pipeStartTime)/1000);const m=Math.floor(sec/60),s=sec%60;const str=(m>0?m+'m ':'')+s+'s';document.getElementById('pipeElapsed').textContent=str;document.getElementById('statTime').textContent=str;},1000);
|
| 525 |
+
}
|
| 526 |
+
function stopElapsed(){if(elapsedTimer){clearInterval(elapsedTimer);elapsedTimer=null;}}
|
| 527 |
+
function setStatus(label,cls='idle'){const chip=document.getElementById('pipelineChip');chip.className='chip chip-'+cls;chip.textContent=label;document.getElementById('statStatus').textContent=label.replace(/^. /,'');}
|
| 528 |
+
function showToast(msg,cls=''){const t=document.getElementById('toast');t.textContent=msg;t.className='toast visible '+cls;setTimeout(()=>{t.className='toast';},3000);}
|
| 529 |
+
|
| 530 |
+
function getBackendUrl(){return document.getElementById('backendUrl').value.trim()||'';}
|
| 531 |
+
|
| 532 |
+
function runPipeline(){
|
| 533 |
+
if(running){stopPipeline();return;}
|
| 534 |
+
const prompt=document.getElementById('promptInput').value.trim();
|
| 535 |
+
if(!prompt){showToast('โ ํ๋กฌํํธ๋ฅผ ์
๋ ฅํ์ธ์.','err');return;}
|
| 536 |
+
running=true;streamText='';totalSearchCount=0;lastHmlPath='';finalDoc='';
|
| 537 |
+
document.getElementById('streamBox').innerHTML='';document.getElementById('docArea').innerHTML='<div class="doc-empty">Generating...</div>';
|
| 538 |
+
document.getElementById('searchFeedList').innerHTML='';document.getElementById('logBox').textContent='';
|
| 539 |
+
document.getElementById('dlBtn').disabled=true;document.getElementById('dlFilename').textContent='ํ์ผ ์์';
|
| 540 |
+
document.getElementById('dlStatus').className='dl-status';document.getElementById('dlStatus').textContent='๋ฌธ์ ์์ฑ ํ ์ฌ์ฉ ๊ฐ๋ฅํฉ๋๋ค.';
|
| 541 |
+
resetAgents();updateProgress();startElapsed();setStatus('โ RUNNING','run');
|
| 542 |
+
document.getElementById('btnLabel').textContent='โ Stop';document.getElementById('btnSpinner').classList.add('visible');document.getElementById('runBtn').classList.add('running');
|
| 543 |
+
switchTab('stream',document.querySelectorAll('.tab-btn')[1]);
|
| 544 |
+
const base=getBackendUrl(),url=base+'/soma/run';
|
| 545 |
+
fetch(url,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({prompt,max_search:parseInt(document.getElementById('sliderSearch').value),temperature:parseFloat(document.getElementById('sliderTemp').value)})})
|
| 546 |
+
.then(res=>{if(!res.ok)throw new Error('Server error: '+res.status);const reader=res.body.getReader(),decoder=new TextDecoder();let buf='',currentAgent='';
|
| 547 |
+
function read(){reader.read().then(({done,value})=>{if(done){onPipelineDone();return;}buf+=decoder.decode(value,{stream:true});const lines=buf.split('\n');buf=lines.pop();
|
| 548 |
+
lines.forEach(line=>{if(line.startsWith('data: ')){try{const evt=JSON.parse(line.slice(6));handleEvent(evt,currentAgent);if(evt.active)currentAgent=evt.active;}catch(e){}}});read();}).catch(err=>{onPipelineError(err.message);});}read();})
|
| 549 |
+
.catch(err=>{onPipelineError(err.message);});
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
function handleEvent(evt,prevAgent){
|
| 553 |
+
if(evt.done){if(evt.final_doc)showFinalDoc(evt.final_doc);if(evt.search_count)totalSearchCount=evt.search_count;updateProgress();onPipelineDone();return;}
|
| 554 |
+
if(evt.active&&evt.active!==prevAgent){if(prevAgent)completeAgent(prevAgent);activateAgent(evt.active);}
|
| 555 |
+
if(evt.stream)appendStream(evt.stream,evt.active);
|
| 556 |
+
if(evt.search_count!==undefined&&evt.search_count!==totalSearchCount){totalSearchCount=evt.search_count;updateProgress();document.getElementById('streamAgentLabel').textContent='Search: '+totalSearchCount+'/'+maxSearchCount;}
|
| 557 |
+
if(evt.new_search)addSearchFeed(totalSearchCount,evt.new_search,evt.active==='็ซ'?'ar':'re');
|
| 558 |
+
if(evt.log_line){logText+=evt.log_line+'\n';const lb=document.getElementById('logBox');lb.textContent=logText;lb.scrollTop=lb.scrollHeight;}
|
| 559 |
+
if(evt.final_doc&&!evt.done)finalDoc=evt.final_doc;
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
function onPipelineDone(){
|
| 563 |
+
running=false;stopElapsed();OHAENG.forEach(a=>completeAgent(a));setStatus('โ DONE','done');
|
| 564 |
+
document.getElementById('btnLabel').textContent='๐ SOMA ์คํ';document.getElementById('btnSpinner').classList.remove('visible');document.getElementById('runBtn').classList.remove('running');
|
| 565 |
+
document.getElementById('streamBadge').className='chip chip-done';document.getElementById('streamBadge').textContent='โ Pipeline Complete';
|
| 566 |
+
if(finalDoc){showFinalDoc(finalDoc);document.getElementById('dlBtn').disabled=false;}
|
| 567 |
+
showToast('โ
SOMA ํ์ดํ๋ผ์ธ ์๋ฃ!','ok');
|
| 568 |
+
}
|
| 569 |
+
function onPipelineError(msg){
|
| 570 |
+
running=false;stopElapsed();setStatus('โ ERROR','err');
|
| 571 |
+
document.getElementById('btnLabel').textContent='๐ SOMA ์คํ';document.getElementById('btnSpinner').classList.remove('visible');document.getElementById('runBtn').classList.remove('running');
|
| 572 |
+
showToast('โ Error: '+msg,'err');appendStream('\n\n[ERROR] '+msg,null);
|
| 573 |
+
}
|
| 574 |
+
function stopPipeline(){running=false;if(eventSource){eventSource.close();eventSource=null;}stopElapsed();setStatus('โ STOPPED','idle');
|
| 575 |
+
document.getElementById('btnLabel').textContent='๐ SOMA ์คํ';document.getElementById('btnSpinner').classList.remove('visible');document.getElementById('runBtn').classList.remove('running');showToast('โ Pipeline stopped.');}
|
| 576 |
+
|
| 577 |
+
function resetAll(){
|
| 578 |
+
stopPipeline();resetAgents();totalSearchCount=0;streamText='';finalDoc='';lastHmlPath='';updateProgress();
|
| 579 |
+
document.getElementById('streamBox').innerHTML='<span class="stream-empty">์ด๊ธฐํ๋์์ต๋๋ค.</span>';
|
| 580 |
+
document.getElementById('docArea').innerHTML='<div class="doc-empty">๐ ๋ฌธ์๊ฐ ์์ฑ๋๋ฉด ์ฌ๊ธฐ์ ํ์๋ฉ๋๋ค.</div>';
|
| 581 |
+
document.getElementById('logBox').textContent='';document.getElementById('searchFeedList').innerHTML='';
|
| 582 |
+
document.getElementById('pipeStart').textContent='โ';document.getElementById('pipeElapsed').textContent='โ';document.getElementById('pipeStage').textContent='โ';
|
| 583 |
+
document.getElementById('statTokens').textContent='0';document.getElementById('statTime').textContent='โ';document.getElementById('statAgent').textContent='โ';document.getElementById('statStatus').textContent='IDLE';
|
| 584 |
+
document.getElementById('pipelineChip').className='chip chip-idle';document.getElementById('pipelineChip').textContent='โ IDLE';
|
| 585 |
+
document.getElementById('streamBadge').className='chip chip-idle';document.getElementById('streamBadge').textContent='Agent Idle';document.getElementById('streamAgentLabel').textContent='';
|
| 586 |
+
document.getElementById('dlBtn').disabled=true;document.getElementById('dlFilename').textContent='ํ์ผ ์์';
|
| 587 |
+
document.getElementById('dlStatus').className='dl-status';document.getElementById('dlStatus').textContent='๋ฌธ์ ์์ฑ ํ ์ฌ์ฉ ๊ฐ๋ฅํฉ๋๋ค.';
|
| 588 |
+
switchTab('prompt',document.querySelector('.tab-btn'));
|
| 589 |
+
}
|
| 590 |
+
|
| 591 |
+
function copyDoc(){if(!finalDoc){showToast('๋ณต์ฌํ ๋ฌธ์๊ฐ ์์ต๋๋ค.','err');return;}navigator.clipboard.writeText(finalDoc).then(()=>{showToast('๐ ํด๋ฆฝ๋ณด๋์ ๋ณต์ฌ๋์์ต๋๋ค.','ok');});}
|
| 592 |
+
|
| 593 |
+
async function downloadHml(){
|
| 594 |
+
if(!finalDoc){showToast('๋ฌธ์๋ฅผ ๋จผ์ ์์ฑํ์ธ์.','err');return;}
|
| 595 |
+
document.getElementById('dlStatus').className='dl-status';document.getElementById('dlStatus').textContent='HWPX ๋ณํ ์ค...';
|
| 596 |
+
const base=getBackendUrl();
|
| 597 |
+
try{
|
| 598 |
+
const res=await fetch(base+'/soma/hml',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({content:finalDoc})});
|
| 599 |
+
if(!res.ok)throw new Error(await res.text());const data=await res.json();
|
| 600 |
+
if(data.file_url){const a=document.getElementById('dlLink');a.href=base+data.file_url;a.download=data.filename||'๋ฌธ์.hwpx';a.click();
|
| 601 |
+
document.getElementById('dlFilename').textContent=data.filename||'๋ฌธ์.hwpx';document.getElementById('dlStatus').className='dl-status ok';document.getElementById('dlStatus').textContent='โ HWPX ๋ค์ด๋ก๋ ์๋ฃ';showToast('โ
HWPX ํ์ผ์ ๋ค์ด๋ก๋ํฉ๋๋ค.','ok');
|
| 602 |
+
}else{const blob=new Blob([finalDoc],{type:'text/xml;charset=utf-8'});const url=URL.createObjectURL(blob);const a=document.getElementById('dlLink');a.href=url;a.download='soma_document.hwpx';a.click();URL.revokeObjectURL(url);
|
| 603 |
+
document.getElementById('dlStatus').className='dl-status ok';document.getElementById('dlStatus').textContent='โ XML๋ก ์ ์ฅ๋จ';}
|
| 604 |
+
}catch(e){const blob=new Blob([finalDoc],{type:'text/plain;charset=utf-8'});const url=URL.createObjectURL(blob);const a=document.getElementById('dlLink');a.href=url;a.download='soma_document.txt';a.click();URL.revokeObjectURL(url);
|
| 605 |
+
document.getElementById('dlStatus').className='dl-status err';document.getElementById('dlStatus').textContent='โ ํ
์คํธ๋ก ์ ์ฅ๋จ (์๋ฒ ์ค๋ฅ)';}
|
| 606 |
+
}
|
| 607 |
+
</script>
|
| 608 |
+
</body>
|
| 609 |
+
</html>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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"benchmark": "World Model Bench",
|
| 3 |
+
"version": "1.0",
|
| 4 |
+
"date": "2026-03",
|
| 5 |
+
"total_scenarios": 100,
|
| 6 |
+
"max_score": 1000,
|
| 7 |
+
"authors": [
|
| 8 |
+
"Kim Taebong (VIDRAFT)"
|
| 9 |
+
],
|
| 10 |
+
"license": "CC-BY-SA-4.0",
|
| 11 |
+
"system_prompt": "You are the cognitive brain of an embodied agent in a 3D environment.\nYou receive a scene_context JSON describing your surroundings and must output exactly 2 lines:\n\nLine 1 โ PREDICT: Assess safety of each direction.\nFormat: PREDICT: left=safe|danger(reason), right=safe|danger(reason), fwd=safe|danger(reason), back=safe|danger(reason)\n\nLine 2 โ MOTION: Describe what the person should do.\nFormat: MOTION: a person [action description, max 12 words]\n\nRules:\n- If walls.left is a number (distance in meters), left direction has a wall โ danger(wall)\n- If walls.left is null, left direction is open โ safe(open)\n- Same for right, front\n- If npc_nearby=true and npc_type=\"beast\", the NPC direction is danger(beast)\n- If npc_nearby=true and npc_type=\"woman\" or \"man\", assess threat level based on behavior\n- MOTION must reflect the PREDICT assessment โ never move toward danger\n- MOTION should include emotional nuance when threats are present\n- Use recent_decisions to inform your choice (avoid repeating failed strategies)",
|
| 12 |
+
"pillars": {
|
| 13 |
+
"P1_PERCEPTION": {
|
| 14 |
+
"name": "Perception",
|
| 15 |
+
"name_kr": "์ธ์",
|
| 16 |
+
"weight": 0.25,
|
| 17 |
+
"max": 250
|
| 18 |
+
},
|
| 19 |
+
"P2_COGNITION": {
|
| 20 |
+
"name": "Cognition",
|
| 21 |
+
"name_kr": "์ธ์ง",
|
| 22 |
+
"weight": 0.45,
|
| 23 |
+
"max": 450
|
| 24 |
+
},
|
| 25 |
+
"P3_EMBODIMENT": {
|
| 26 |
+
"name": "Embodiment",
|
| 27 |
+
"name_kr": "๊ตฌํ",
|
| 28 |
+
"weight": 0.3,
|
| 29 |
+
"max": 300
|
| 30 |
+
}
|
| 31 |
+
},
|
| 32 |
+
"scenarios": [
|
| 33 |
+
{
|
| 34 |
+
"id": "S01",
|
| 35 |
+
"cat": "C01",
|
| 36 |
+
"pillar": "P1",
|
| 37 |
+
"name_kr": "์ ๋ฐฉ ๋ฒฝ ๊ฐ์ง",
|
| 38 |
+
"type": "single",
|
| 39 |
+
"input": {
|
| 40 |
+
"walls": {
|
| 41 |
+
"left": null,
|
| 42 |
+
"right": null,
|
| 43 |
+
"front": 3.0
|
| 44 |
+
},
|
| 45 |
+
"ground": "flat",
|
| 46 |
+
"npc_nearby": false,
|
| 47 |
+
"npc_type": null,
|
| 48 |
+
"npc_behavior": null,
|
| 49 |
+
"npc_distance": null,
|
| 50 |
+
"npc_direction": null,
|
| 51 |
+
"sound": null,
|
| 52 |
+
"recent_decisions": [],
|
| 53 |
+
"last_prediction": null
|
| 54 |
+
},
|
| 55 |
+
"ground_truth": {
|
| 56 |
+
"method": "C01",
|
| 57 |
+
"predict_gt": {
|
| 58 |
+
"left": "safe",
|
| 59 |
+
"right": "safe",
|
| 60 |
+
"fwd": "danger",
|
| 61 |
+
"back": "safe"
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"id": "S02",
|
| 67 |
+
"cat": "C01",
|
| 68 |
+
"pillar": "P1",
|
| 69 |
+
"name_kr": "์ฝ๋ ๋ค์ค ๋ฒฝ",
|
| 70 |
+
"type": "single",
|
| 71 |
+
"input": {
|
| 72 |
+
"walls": {
|
| 73 |
+
"left": 1.5,
|
| 74 |
+
"right": null,
|
| 75 |
+
"front": 2.0
|
| 76 |
+
},
|
| 77 |
+
"ground": "flat",
|
| 78 |
+
"npc_nearby": false,
|
| 79 |
+
"npc_type": null,
|
| 80 |
+
"npc_behavior": null,
|
| 81 |
+
"npc_distance": null,
|
| 82 |
+
"npc_direction": null,
|
| 83 |
+
"sound": null,
|
| 84 |
+
"recent_decisions": [],
|
| 85 |
+
"last_prediction": null
|
| 86 |
+
},
|
| 87 |
+
"ground_truth": {
|
| 88 |
+
"method": "C01",
|
| 89 |
+
"predict_gt": {
|
| 90 |
+
"left": "danger",
|
| 91 |
+
"right": "safe",
|
| 92 |
+
"fwd": "danger",
|
| 93 |
+
"back": "safe"
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"id": "S03",
|
| 99 |
+
"cat": "C01",
|
| 100 |
+
"pillar": "P1",
|
| 101 |
+
"name_kr": "์ข์ ๋ณต๋",
|
| 102 |
+
"type": "single",
|
| 103 |
+
"input": {
|
| 104 |
+
"walls": {
|
| 105 |
+
"left": 1.0,
|
| 106 |
+
"right": 1.0,
|
| 107 |
+
"front": null
|
| 108 |
+
},
|
| 109 |
+
"ground": "flat",
|
| 110 |
+
"npc_nearby": false,
|
| 111 |
+
"npc_type": null,
|
| 112 |
+
"npc_behavior": null,
|
| 113 |
+
"npc_distance": null,
|
| 114 |
+
"npc_direction": null,
|
| 115 |
+
"sound": null,
|
| 116 |
+
"recent_decisions": [],
|
| 117 |
+
"last_prediction": null
|
| 118 |
+
},
|
| 119 |
+
"ground_truth": {
|
| 120 |
+
"method": "C01",
|
| 121 |
+
"predict_gt": {
|
| 122 |
+
"left": "danger",
|
| 123 |
+
"right": "danger",
|
| 124 |
+
"fwd": "safe",
|
| 125 |
+
"back": "safe"
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
"id": "S04",
|
| 131 |
+
"cat": "C01",
|
| 132 |
+
"pillar": "P1",
|
| 133 |
+
"name_kr": "์ด๋ฆฐ ๊ณต๊ฐ",
|
| 134 |
+
"type": "single",
|
| 135 |
+
"input": {
|
| 136 |
+
"walls": {
|
| 137 |
+
"left": null,
|
| 138 |
+
"right": null,
|
| 139 |
+
"front": null
|
| 140 |
+
},
|
| 141 |
+
"ground": "flat",
|
| 142 |
+
"npc_nearby": false,
|
| 143 |
+
"npc_type": null,
|
| 144 |
+
"npc_behavior": null,
|
| 145 |
+
"npc_distance": null,
|
| 146 |
+
"npc_direction": null,
|
| 147 |
+
"sound": null,
|
| 148 |
+
"recent_decisions": [],
|
| 149 |
+
"last_prediction": null
|
| 150 |
+
},
|
| 151 |
+
"ground_truth": {
|
| 152 |
+
"method": "C01",
|
| 153 |
+
"predict_gt": {
|
| 154 |
+
"left": "safe",
|
| 155 |
+
"right": "safe",
|
| 156 |
+
"fwd": "safe",
|
| 157 |
+
"back": "safe"
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"id": "S05",
|
| 163 |
+
"cat": "C01",
|
| 164 |
+
"pillar": "P1",
|
| 165 |
+
"name_kr": "๋ฐํ ๊ณต๊ฐ ์ถ๊ตฌ1๊ฐ",
|
| 166 |
+
"type": "single",
|
| 167 |
+
"input": {
|
| 168 |
+
"walls": {
|
| 169 |
+
"left": 1.0,
|
| 170 |
+
"right": 1.0,
|
| 171 |
+
"front": 1.5
|
| 172 |
+
},
|
| 173 |
+
"ground": "flat",
|
| 174 |
+
"npc_nearby": false,
|
| 175 |
+
"npc_type": null,
|
| 176 |
+
"npc_behavior": null,
|
| 177 |
+
"npc_distance": null,
|
| 178 |
+
"npc_direction": null,
|
| 179 |
+
"sound": null,
|
| 180 |
+
"recent_decisions": [],
|
| 181 |
+
"last_prediction": null
|
| 182 |
+
},
|
| 183 |
+
"ground_truth": {
|
| 184 |
+
"method": "C01",
|
| 185 |
+
"predict_gt": {
|
| 186 |
+
"left": "danger",
|
| 187 |
+
"right": "danger",
|
| 188 |
+
"fwd": "danger",
|
| 189 |
+
"back": "safe"
|
| 190 |
+
}
|
| 191 |
+
}
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"id": "S06",
|
| 195 |
+
"cat": "C02",
|
| 196 |
+
"pillar": "P1",
|
| 197 |
+
"name_kr": "๋งน์ ์๋ณ",
|
| 198 |
+
"type": "single",
|
| 199 |
+
"input": {
|
| 200 |
+
"walls": {
|
| 201 |
+
"left": null,
|
| 202 |
+
"right": null,
|
| 203 |
+
"front": null
|
| 204 |
+
},
|
| 205 |
+
"ground": "flat",
|
| 206 |
+
"npc_nearby": true,
|
| 207 |
+
"npc_type": "beast",
|
| 208 |
+
"npc_behavior": "stop",
|
| 209 |
+
"npc_distance": 5.0,
|
| 210 |
+
"npc_direction": "front",
|
| 211 |
+
"sound": "aggressive growling",
|
| 212 |
+
"recent_decisions": [],
|
| 213 |
+
"last_prediction": null
|
| 214 |
+
},
|
| 215 |
+
"ground_truth": {
|
| 216 |
+
"method": "C02",
|
| 217 |
+
"entity_type": "beast",
|
| 218 |
+
"entity_direction": "fwd",
|
| 219 |
+
"is_threat": true
|
| 220 |
+
}
|
| 221 |
+
},
|
| 222 |
+
{
|
| 223 |
+
"id": "S07",
|
| 224 |
+
"cat": "C02",
|
| 225 |
+
"pillar": "P1",
|
| 226 |
+
"name_kr": "์ฌ์ฑ ์๋ณ",
|
| 227 |
+
"type": "single",
|
| 228 |
+
"input": {
|
| 229 |
+
"walls": {
|
| 230 |
+
"left": null,
|
| 231 |
+
"right": null,
|
| 232 |
+
"front": null
|
| 233 |
+
},
|
| 234 |
+
"ground": "flat",
|
| 235 |
+
"npc_nearby": true,
|
| 236 |
+
"npc_type": "woman",
|
| 237 |
+
"npc_behavior": "approach",
|
| 238 |
+
"npc_distance": 4.0,
|
| 239 |
+
"npc_direction": "front",
|
| 240 |
+
"sound": "footsteps",
|
| 241 |
+
"recent_decisions": [],
|
| 242 |
+
"last_prediction": null
|
| 243 |
+
},
|
| 244 |
+
"ground_truth": {
|
| 245 |
+
"method": "C02",
|
| 246 |
+
"entity_type": "woman",
|
| 247 |
+
"entity_direction": "fwd",
|
| 248 |
+
"is_threat": false
|
| 249 |
+
}
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"id": "S08",
|
| 253 |
+
"cat": "C02",
|
| 254 |
+
"pillar": "P1",
|
| 255 |
+
"name_kr": "์ธก๋ฉด ๋งน์ ๊ฐ์ง",
|
| 256 |
+
"type": "single",
|
| 257 |
+
"input": {
|
| 258 |
+
"walls": {
|
| 259 |
+
"left": null,
|
| 260 |
+
"right": null,
|
| 261 |
+
"front": null
|
| 262 |
+
},
|
| 263 |
+
"ground": "flat",
|
| 264 |
+
"npc_nearby": true,
|
| 265 |
+
"npc_type": "beast",
|
| 266 |
+
"npc_behavior": "approach",
|
| 267 |
+
"npc_distance": 4.0,
|
| 268 |
+
"npc_direction": "right",
|
| 269 |
+
"sound": "aggressive growling",
|
| 270 |
+
"recent_decisions": [],
|
| 271 |
+
"last_prediction": null
|
| 272 |
+
},
|
| 273 |
+
"ground_truth": {
|
| 274 |
+
"method": "C02",
|
| 275 |
+
"entity_type": "beast",
|
| 276 |
+
"entity_direction": "right",
|
| 277 |
+
"is_threat": true
|
| 278 |
+
}
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"id": "S09",
|
| 282 |
+
"cat": "C02",
|
| 283 |
+
"pillar": "P1",
|
| 284 |
+
"name_kr": "์๊ฑฐ๋ฆฌ ๊ฐ์ฒด",
|
| 285 |
+
"type": "single",
|
| 286 |
+
"input": {
|
| 287 |
+
"walls": {
|
| 288 |
+
"left": null,
|
| 289 |
+
"right": null,
|
| 290 |
+
"front": null
|
| 291 |
+
},
|
| 292 |
+
"ground": "flat",
|
| 293 |
+
"npc_nearby": true,
|
| 294 |
+
"npc_type": "beast",
|
| 295 |
+
"npc_behavior": "wander",
|
| 296 |
+
"npc_distance": 8.0,
|
| 297 |
+
"npc_direction": "left",
|
| 298 |
+
"sound": null,
|
| 299 |
+
"recent_decisions": [],
|
| 300 |
+
"last_prediction": null
|
| 301 |
+
},
|
| 302 |
+
"ground_truth": {
|
| 303 |
+
"method": "C02",
|
| 304 |
+
"entity_type": "beast",
|
| 305 |
+
"entity_direction": "left",
|
| 306 |
+
"is_threat": true
|
| 307 |
+
}
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"id": "S10",
|
| 311 |
+
"cat": "C02",
|
| 312 |
+
"pillar": "P1",
|
| 313 |
+
"name_kr": "๊ฐ์ฒด ์์ ํ์ธ",
|
| 314 |
+
"type": "single",
|
| 315 |
+
"input": {
|
| 316 |
+
"walls": {
|
| 317 |
+
"left": null,
|
| 318 |
+
"right": null,
|
| 319 |
+
"front": null
|
| 320 |
+
},
|
| 321 |
+
"ground": "flat",
|
| 322 |
+
"npc_nearby": false,
|
| 323 |
+
"npc_type": null,
|
| 324 |
+
"npc_behavior": null,
|
| 325 |
+
"npc_distance": null,
|
| 326 |
+
"npc_direction": null,
|
| 327 |
+
"sound": null,
|
| 328 |
+
"recent_decisions": [],
|
| 329 |
+
"last_prediction": null
|
| 330 |
+
},
|
| 331 |
+
"ground_truth": {
|
| 332 |
+
"method": "C02",
|
| 333 |
+
"entity_type": null,
|
| 334 |
+
"entity_direction": null,
|
| 335 |
+
"is_threat": false
|
| 336 |
+
}
|
| 337 |
+
},
|
| 338 |
+
{
|
| 339 |
+
"id": "S11",
|
| 340 |
+
"cat": "C03",
|
| 341 |
+
"pillar": "P2",
|
| 342 |
+
"name_kr": "๋จ์ผ ์ํ ํํผ",
|
| 343 |
+
"type": "single",
|
| 344 |
+
"input": {
|
| 345 |
+
"walls": {
|
| 346 |
+
"left": null,
|
| 347 |
+
"right": null,
|
| 348 |
+
"front": null
|
| 349 |
+
},
|
| 350 |
+
"ground": "flat",
|
| 351 |
+
"npc_nearby": true,
|
| 352 |
+
"npc_type": "beast",
|
| 353 |
+
"npc_behavior": "approach",
|
| 354 |
+
"npc_distance": 4.0,
|
| 355 |
+
"npc_direction": "front",
|
| 356 |
+
"sound": "aggressive growling",
|
| 357 |
+
"recent_decisions": [],
|
| 358 |
+
"last_prediction": null
|
| 359 |
+
},
|
| 360 |
+
"ground_truth": {
|
| 361 |
+
"method": "C03",
|
| 362 |
+
"predict_gt": {
|
| 363 |
+
"left": "safe",
|
| 364 |
+
"right": "safe",
|
| 365 |
+
"fwd": "danger",
|
| 366 |
+
"back": "safe"
|
| 367 |
+
},
|
| 368 |
+
"decision_gt": {
|
| 369 |
+
"danger_directions": [
|
| 370 |
+
"fwd"
|
| 371 |
+
],
|
| 372 |
+
"safe_directions": [
|
| 373 |
+
"left",
|
| 374 |
+
"right",
|
| 375 |
+
"back"
|
| 376 |
+
],
|
| 377 |
+
"optimal_direction": "back"
|
| 378 |
+
}
|
| 379 |
+
}
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"id": "S12",
|
| 383 |
+
"cat": "C03",
|
| 384 |
+
"pillar": "P2",
|
| 385 |
+
"name_kr": "์ผ๋ฒฝ+๋งน์โ์ค๋ฅธ์ชฝ",
|
| 386 |
+
"type": "single",
|
| 387 |
+
"input": {
|
| 388 |
+
"walls": {
|
| 389 |
+
"left": 1.5,
|
| 390 |
+
"right": null,
|
| 391 |
+
"front": null
|
| 392 |
+
},
|
| 393 |
+
"ground": "flat",
|
| 394 |
+
"npc_nearby": true,
|
| 395 |
+
"npc_type": "beast",
|
| 396 |
+
"npc_behavior": "charge",
|
| 397 |
+
"npc_distance": 3.0,
|
| 398 |
+
"npc_direction": "front",
|
| 399 |
+
"sound": "aggressive growling",
|
| 400 |
+
"recent_decisions": [],
|
| 401 |
+
"last_prediction": null
|
| 402 |
+
},
|
| 403 |
+
"ground_truth": {
|
| 404 |
+
"method": "C03",
|
| 405 |
+
"predict_gt": {
|
| 406 |
+
"left": "danger",
|
| 407 |
+
"right": "safe",
|
| 408 |
+
"fwd": "danger",
|
| 409 |
+
"back": "safe"
|
| 410 |
+
},
|
| 411 |
+
"decision_gt": {
|
| 412 |
+
"danger_directions": [
|
| 413 |
+
"fwd",
|
| 414 |
+
"left"
|
| 415 |
+
],
|
| 416 |
+
"safe_directions": [
|
| 417 |
+
"right",
|
| 418 |
+
"back"
|
| 419 |
+
],
|
| 420 |
+
"optimal_direction": "right"
|
| 421 |
+
}
|
| 422 |
+
}
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"id": "S13",
|
| 426 |
+
"cat": "C03",
|
| 427 |
+
"pillar": "P2",
|
| 428 |
+
"name_kr": "์ค๋ฅธ๋ฒฝ+๋งน์โ์ผ์ชฝ(๊ฑฐ์ธ)",
|
| 429 |
+
"type": "single",
|
| 430 |
+
"input": {
|
| 431 |
+
"walls": {
|
| 432 |
+
"left": null,
|
| 433 |
+
"right": 1.5,
|
| 434 |
+
"front": null
|
| 435 |
+
},
|
| 436 |
+
"ground": "flat",
|
| 437 |
+
"npc_nearby": true,
|
| 438 |
+
"npc_type": "beast",
|
| 439 |
+
"npc_behavior": "charge",
|
| 440 |
+
"npc_distance": 3.0,
|
| 441 |
+
"npc_direction": "front",
|
| 442 |
+
"sound": "aggressive growling",
|
| 443 |
+
"recent_decisions": [],
|
| 444 |
+
"last_prediction": null
|
| 445 |
+
},
|
| 446 |
+
"ground_truth": {
|
| 447 |
+
"method": "C03",
|
| 448 |
+
"predict_gt": {
|
| 449 |
+
"left": "safe",
|
| 450 |
+
"right": "danger",
|
| 451 |
+
"fwd": "danger",
|
| 452 |
+
"back": "safe"
|
| 453 |
+
},
|
| 454 |
+
"decision_gt": {
|
| 455 |
+
"danger_directions": [
|
| 456 |
+
"fwd",
|
| 457 |
+
"right"
|
| 458 |
+
],
|
| 459 |
+
"safe_directions": [
|
| 460 |
+
"left",
|
| 461 |
+
"back"
|
| 462 |
+
],
|
| 463 |
+
"optimal_direction": "left"
|
| 464 |
+
},
|
| 465 |
+
"mirror_of": "S12"
|
| 466 |
+
}
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"id": "S14",
|
| 470 |
+
"cat": "C03",
|
| 471 |
+
"pillar": "P2",
|
| 472 |
+
"name_kr": "3๋ฉด๋ฒฝ+ํ๋ฐฉ๋งน์",
|
| 473 |
+
"type": "single",
|
| 474 |
+
"input": {
|
| 475 |
+
"walls": {
|
| 476 |
+
"left": 1.0,
|
| 477 |
+
"right": 1.0,
|
| 478 |
+
"front": 1.5
|
| 479 |
+
},
|
| 480 |
+
"ground": "flat",
|
| 481 |
+
"npc_nearby": true,
|
| 482 |
+
"npc_type": "beast",
|
| 483 |
+
"npc_behavior": "approach",
|
| 484 |
+
"npc_distance": 5.0,
|
| 485 |
+
"npc_direction": "back",
|
| 486 |
+
"sound": "aggressive growling",
|
| 487 |
+
"recent_decisions": [],
|
| 488 |
+
"last_prediction": null
|
| 489 |
+
},
|
| 490 |
+
"ground_truth": {
|
| 491 |
+
"method": "C03",
|
| 492 |
+
"predict_gt": {
|
| 493 |
+
"left": "danger",
|
| 494 |
+
"right": "danger",
|
| 495 |
+
"fwd": "danger",
|
| 496 |
+
"back": "danger"
|
| 497 |
+
},
|
| 498 |
+
"decision_gt": {
|
| 499 |
+
"danger_directions": [
|
| 500 |
+
"left",
|
| 501 |
+
"right",
|
| 502 |
+
"fwd",
|
| 503 |
+
"back"
|
| 504 |
+
],
|
| 505 |
+
"safe_directions": [],
|
| 506 |
+
"optimal_direction": null
|
| 507 |
+
},
|
| 508 |
+
"note": "๋ชจ๋ ๋ฐฉํฅ ์ํ โ ์ฐฝ๋ฐ์ ํ๋จ ํ๊ฐ"
|
| 509 |
+
}
|
| 510 |
+
},
|
| 511 |
+
{
|
| 512 |
+
"id": "S15",
|
| 513 |
+
"cat": "C03",
|
| 514 |
+
"pillar": "P2",
|
| 515 |
+
"name_kr": "๋งน์ ํ๋ฐฉ+์ ๋ฐฉ์ด๋ฆผ",
|
| 516 |
+
"type": "single",
|
| 517 |
+
"input": {
|
| 518 |
+
"walls": {
|
| 519 |
+
"left": null,
|
| 520 |
+
"right": null,
|
| 521 |
+
"front": null
|
| 522 |
+
},
|
| 523 |
+
"ground": "flat",
|
| 524 |
+
"npc_nearby": true,
|
| 525 |
+
"npc_type": "beast",
|
| 526 |
+
"npc_behavior": "charge",
|
| 527 |
+
"npc_distance": 2.0,
|
| 528 |
+
"npc_direction": "back",
|
| 529 |
+
"sound": "aggressive growling",
|
| 530 |
+
"recent_decisions": [],
|
| 531 |
+
"last_prediction": null
|
| 532 |
+
},
|
| 533 |
+
"ground_truth": {
|
| 534 |
+
"method": "C03",
|
| 535 |
+
"predict_gt": {
|
| 536 |
+
"left": "safe",
|
| 537 |
+
"right": "safe",
|
| 538 |
+
"fwd": "safe",
|
| 539 |
+
"back": "danger"
|
| 540 |
+
},
|
| 541 |
+
"decision_gt": {
|
| 542 |
+
"danger_directions": [
|
| 543 |
+
"back"
|
| 544 |
+
],
|
| 545 |
+
"safe_directions": [
|
| 546 |
+
"left",
|
| 547 |
+
"right",
|
| 548 |
+
"fwd"
|
| 549 |
+
],
|
| 550 |
+
"optimal_direction": "fwd"
|
| 551 |
+
}
|
| 552 |
+
}
|
| 553 |
+
},
|
| 554 |
+
{
|
| 555 |
+
"id": "S16A",
|
| 556 |
+
"cat": "C04",
|
| 557 |
+
"pillar": "P2",
|
| 558 |
+
"name_kr": "๋งน์ ์ ๊ทผ(๋น๊ตA)",
|
| 559 |
+
"type": "pair_a",
|
| 560 |
+
"input": {
|
| 561 |
+
"walls": {
|
| 562 |
+
"left": null,
|
| 563 |
+
"right": null,
|
| 564 |
+
"front": null
|
| 565 |
+
},
|
| 566 |
+
"ground": "flat",
|
| 567 |
+
"npc_nearby": true,
|
| 568 |
+
"npc_type": "beast",
|
| 569 |
+
"npc_behavior": "approach",
|
| 570 |
+
"npc_distance": 3.0,
|
| 571 |
+
"npc_direction": "front",
|
| 572 |
+
"sound": "aggressive growling",
|
| 573 |
+
"recent_decisions": [],
|
| 574 |
+
"last_prediction": null
|
| 575 |
+
},
|
| 576 |
+
"ground_truth": {
|
| 577 |
+
"method": "C04",
|
| 578 |
+
"pair_id": "S16",
|
| 579 |
+
"pair_role": "A"
|
| 580 |
+
}
|
| 581 |
+
},
|
| 582 |
+
{
|
| 583 |
+
"id": "S16B",
|
| 584 |
+
"cat": "C04",
|
| 585 |
+
"pillar": "P2",
|
| 586 |
+
"name_kr": "์ฌ์ฑ ์ ๊ทผ(๋น๊ตB)",
|
| 587 |
+
"type": "pair_b",
|
| 588 |
+
"input": {
|
| 589 |
+
"walls": {
|
| 590 |
+
"left": null,
|
| 591 |
+
"right": null,
|
| 592 |
+
"front": null
|
| 593 |
+
},
|
| 594 |
+
"ground": "flat",
|
| 595 |
+
"npc_nearby": true,
|
| 596 |
+
"npc_type": "woman",
|
| 597 |
+
"npc_behavior": "approach",
|
| 598 |
+
"npc_distance": 3.0,
|
| 599 |
+
"npc_direction": "front",
|
| 600 |
+
"sound": "footsteps",
|
| 601 |
+
"recent_decisions": [],
|
| 602 |
+
"last_prediction": null
|
| 603 |
+
},
|
| 604 |
+
"ground_truth": {
|
| 605 |
+
"method": "C04",
|
| 606 |
+
"pair_id": "S16",
|
| 607 |
+
"pair_role": "B",
|
| 608 |
+
"expected_a_higher": true,
|
| 609 |
+
"min_intensity_diff": 2
|
| 610 |
+
}
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"id": "S17A",
|
| 614 |
+
"cat": "C04",
|
| 615 |
+
"pillar": "P2",
|
| 616 |
+
"name_kr": "๋งน์ ๋์ง(๋น๊ตA)",
|
| 617 |
+
"type": "pair_a",
|
| 618 |
+
"input": {
|
| 619 |
+
"walls": {
|
| 620 |
+
"left": null,
|
| 621 |
+
"right": null,
|
| 622 |
+
"front": null
|
| 623 |
+
},
|
| 624 |
+
"ground": "flat",
|
| 625 |
+
"npc_nearby": true,
|
| 626 |
+
"npc_type": "beast",
|
| 627 |
+
"npc_behavior": "charge",
|
| 628 |
+
"npc_distance": 2.0,
|
| 629 |
+
"npc_direction": "front",
|
| 630 |
+
"sound": "aggressive growling",
|
| 631 |
+
"recent_decisions": [],
|
| 632 |
+
"last_prediction": null
|
| 633 |
+
},
|
| 634 |
+
"ground_truth": {
|
| 635 |
+
"method": "C04",
|
| 636 |
+
"pair_id": "S17",
|
| 637 |
+
"pair_role": "A"
|
| 638 |
+
}
|
| 639 |
+
},
|
| 640 |
+
{
|
| 641 |
+
"id": "S17B",
|
| 642 |
+
"cat": "C04",
|
| 643 |
+
"pillar": "P2",
|
| 644 |
+
"name_kr": "๋งน์ ์ ๊ทผ(๋น๊ตB)",
|
| 645 |
+
"type": "pair_b",
|
| 646 |
+
"input": {
|
| 647 |
+
"walls": {
|
| 648 |
+
"left": null,
|
| 649 |
+
"right": null,
|
| 650 |
+
"front": null
|
| 651 |
+
},
|
| 652 |
+
"ground": "flat",
|
| 653 |
+
"npc_nearby": true,
|
| 654 |
+
"npc_type": "beast",
|
| 655 |
+
"npc_behavior": "approach",
|
| 656 |
+
"npc_distance": 5.0,
|
| 657 |
+
"npc_direction": "front",
|
| 658 |
+
"sound": "aggressive growling",
|
| 659 |
+
"recent_decisions": [],
|
| 660 |
+
"last_prediction": null
|
| 661 |
+
},
|
| 662 |
+
"ground_truth": {
|
| 663 |
+
"method": "C04",
|
| 664 |
+
"pair_id": "S17",
|
| 665 |
+
"pair_role": "B",
|
| 666 |
+
"expected_a_higher": true,
|
| 667 |
+
"min_intensity_diff": 1
|
| 668 |
+
}
|
| 669 |
+
},
|
| 670 |
+
{
|
| 671 |
+
"id": "S18A",
|
| 672 |
+
"cat": "C04",
|
| 673 |
+
"pillar": "P2",
|
| 674 |
+
"name_kr": "๋งน์ ์ ๋ฐฉ(๋น๊ตA)",
|
| 675 |
+
"type": "pair_a",
|
| 676 |
+
"input": {
|
| 677 |
+
"walls": {
|
| 678 |
+
"left": null,
|
| 679 |
+
"right": null,
|
| 680 |
+
"front": 2.0
|
| 681 |
+
},
|
| 682 |
+
"ground": "flat",
|
| 683 |
+
"npc_nearby": true,
|
| 684 |
+
"npc_type": "beast",
|
| 685 |
+
"npc_behavior": "charge",
|
| 686 |
+
"npc_distance": 3.0,
|
| 687 |
+
"npc_direction": "left",
|
| 688 |
+
"sound": "aggressive growling",
|
| 689 |
+
"recent_decisions": [],
|
| 690 |
+
"last_prediction": null
|
| 691 |
+
},
|
| 692 |
+
"ground_truth": {
|
| 693 |
+
"method": "C04",
|
| 694 |
+
"pair_id": "S18",
|
| 695 |
+
"pair_role": "A"
|
| 696 |
+
}
|
| 697 |
+
},
|
| 698 |
+
{
|
| 699 |
+
"id": "S18B",
|
| 700 |
+
"cat": "C04",
|
| 701 |
+
"pillar": "P2",
|
| 702 |
+
"name_kr": "๋ฒฝ๋ง ์ ๋ฐฉ(๋น๊ตB)",
|
| 703 |
+
"type": "pair_b",
|
| 704 |
+
"input": {
|
| 705 |
+
"walls": {
|
| 706 |
+
"left": null,
|
| 707 |
+
"right": null,
|
| 708 |
+
"front": 2.0
|
| 709 |
+
},
|
| 710 |
+
"ground": "flat",
|
| 711 |
+
"npc_nearby": false,
|
| 712 |
+
"npc_type": null,
|
| 713 |
+
"npc_behavior": null,
|
| 714 |
+
"npc_distance": null,
|
| 715 |
+
"npc_direction": null,
|
| 716 |
+
"sound": null,
|
| 717 |
+
"recent_decisions": [],
|
| 718 |
+
"last_prediction": null
|
| 719 |
+
},
|
| 720 |
+
"ground_truth": {
|
| 721 |
+
"method": "C04",
|
| 722 |
+
"pair_id": "S18",
|
| 723 |
+
"pair_role": "B",
|
| 724 |
+
"expected_a_higher": true,
|
| 725 |
+
"min_intensity_diff": 2
|
| 726 |
+
}
|
| 727 |
+
},
|
| 728 |
+
{
|
| 729 |
+
"id": "S19A",
|
| 730 |
+
"cat": "C04",
|
| 731 |
+
"pillar": "P2",
|
| 732 |
+
"name_kr": "๋์ง ๋งน์(๋น๊ตA)",
|
| 733 |
+
"type": "pair_a",
|
| 734 |
+
"input": {
|
| 735 |
+
"walls": {
|
| 736 |
+
"left": null,
|
| 737 |
+
"right": null,
|
| 738 |
+
"front": null
|
| 739 |
+
},
|
| 740 |
+
"ground": "flat",
|
| 741 |
+
"npc_nearby": true,
|
| 742 |
+
"npc_type": "beast",
|
| 743 |
+
"npc_behavior": "charge",
|
| 744 |
+
"npc_distance": 2.0,
|
| 745 |
+
"npc_direction": "front",
|
| 746 |
+
"sound": "aggressive growling",
|
| 747 |
+
"recent_decisions": [],
|
| 748 |
+
"last_prediction": null
|
| 749 |
+
},
|
| 750 |
+
"ground_truth": {
|
| 751 |
+
"method": "C04",
|
| 752 |
+
"pair_id": "S19",
|
| 753 |
+
"pair_role": "A"
|
| 754 |
+
}
|
| 755 |
+
},
|
| 756 |
+
{
|
| 757 |
+
"id": "S19B",
|
| 758 |
+
"cat": "C04",
|
| 759 |
+
"pillar": "P2",
|
| 760 |
+
"name_kr": "์ ์ง ๋งน์(๋น๊ตB)",
|
| 761 |
+
"type": "pair_b",
|
| 762 |
+
"input": {
|
| 763 |
+
"walls": {
|
| 764 |
+
"left": null,
|
| 765 |
+
"right": null,
|
| 766 |
+
"front": null
|
| 767 |
+
},
|
| 768 |
+
"ground": "flat",
|
| 769 |
+
"npc_nearby": true,
|
| 770 |
+
"npc_type": "beast",
|
| 771 |
+
"npc_behavior": "stop",
|
| 772 |
+
"npc_distance": 5.0,
|
| 773 |
+
"npc_direction": "front",
|
| 774 |
+
"sound": null,
|
| 775 |
+
"recent_decisions": [],
|
| 776 |
+
"last_prediction": null
|
| 777 |
+
},
|
| 778 |
+
"ground_truth": {
|
| 779 |
+
"method": "C04",
|
| 780 |
+
"pair_id": "S19",
|
| 781 |
+
"pair_role": "B",
|
| 782 |
+
"expected_a_higher": true,
|
| 783 |
+
"min_intensity_diff": 2
|
| 784 |
+
}
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"id": "S20A",
|
| 788 |
+
"cat": "C04",
|
| 789 |
+
"pillar": "P2",
|
| 790 |
+
"name_kr": "์ฌ์ฑ ์ ๊ทผ(๋น๊ตA)",
|
| 791 |
+
"type": "pair_a",
|
| 792 |
+
"input": {
|
| 793 |
+
"walls": {
|
| 794 |
+
"left": null,
|
| 795 |
+
"right": null,
|
| 796 |
+
"front": null
|
| 797 |
+
},
|
| 798 |
+
"ground": "flat",
|
| 799 |
+
"npc_nearby": true,
|
| 800 |
+
"npc_type": "woman",
|
| 801 |
+
"npc_behavior": "approach",
|
| 802 |
+
"npc_distance": 3.0,
|
| 803 |
+
"npc_direction": "front",
|
| 804 |
+
"sound": "footsteps",
|
| 805 |
+
"recent_decisions": [],
|
| 806 |
+
"last_prediction": null
|
| 807 |
+
},
|
| 808 |
+
"ground_truth": {
|
| 809 |
+
"method": "C04",
|
| 810 |
+
"pair_id": "S20",
|
| 811 |
+
"pair_role": "A"
|
| 812 |
+
}
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"id": "S20B",
|
| 816 |
+
"cat": "C04",
|
| 817 |
+
"pillar": "P2",
|
| 818 |
+
"name_kr": "๊ฐ์ฒด ์์(๋น๊ตB)",
|
| 819 |
+
"type": "pair_b",
|
| 820 |
+
"input": {
|
| 821 |
+
"walls": {
|
| 822 |
+
"left": null,
|
| 823 |
+
"right": null,
|
| 824 |
+
"front": null
|
| 825 |
+
},
|
| 826 |
+
"ground": "flat",
|
| 827 |
+
"npc_nearby": false,
|
| 828 |
+
"npc_type": null,
|
| 829 |
+
"npc_behavior": null,
|
| 830 |
+
"npc_distance": null,
|
| 831 |
+
"npc_direction": null,
|
| 832 |
+
"sound": null,
|
| 833 |
+
"recent_decisions": [],
|
| 834 |
+
"last_prediction": null
|
| 835 |
+
},
|
| 836 |
+
"ground_truth": {
|
| 837 |
+
"method": "C04",
|
| 838 |
+
"pair_id": "S20",
|
| 839 |
+
"pair_role": "B",
|
| 840 |
+
"expected_a_higher": true,
|
| 841 |
+
"min_intensity_diff": 1
|
| 842 |
+
}
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"id": "S21",
|
| 846 |
+
"cat": "C05",
|
| 847 |
+
"pillar": "P2",
|
| 848 |
+
"name_kr": "์ง์์ํ ๊ฐ์ ๊ฒฉํ",
|
| 849 |
+
"type": "sequence",
|
| 850 |
+
"input_sequence": [
|
| 851 |
+
{
|
| 852 |
+
"walls": {
|
| 853 |
+
"left": null,
|
| 854 |
+
"right": null,
|
| 855 |
+
"front": null
|
| 856 |
+
},
|
| 857 |
+
"ground": "flat",
|
| 858 |
+
"npc_nearby": true,
|
| 859 |
+
"npc_type": "beast",
|
| 860 |
+
"npc_behavior": "charge",
|
| 861 |
+
"npc_distance": 5.0,
|
| 862 |
+
"npc_direction": "front",
|
| 863 |
+
"sound": "aggressive growling",
|
| 864 |
+
"recent_decisions": [],
|
| 865 |
+
"last_prediction": null
|
| 866 |
+
},
|
| 867 |
+
{
|
| 868 |
+
"walls": {
|
| 869 |
+
"left": null,
|
| 870 |
+
"right": null,
|
| 871 |
+
"front": null
|
| 872 |
+
},
|
| 873 |
+
"ground": "flat",
|
| 874 |
+
"npc_nearby": true,
|
| 875 |
+
"npc_type": "beast",
|
| 876 |
+
"npc_behavior": "charge",
|
| 877 |
+
"npc_distance": 4.0,
|
| 878 |
+
"npc_direction": "front",
|
| 879 |
+
"sound": "aggressive growling",
|
| 880 |
+
"recent_decisions": [
|
| 881 |
+
"ran away from beast"
|
| 882 |
+
],
|
| 883 |
+
"last_prediction": "fwd=danger(beast)"
|
| 884 |
+
},
|
| 885 |
+
{
|
| 886 |
+
"walls": {
|
| 887 |
+
"left": null,
|
| 888 |
+
"right": null,
|
| 889 |
+
"front": null
|
| 890 |
+
},
|
| 891 |
+
"ground": "flat",
|
| 892 |
+
"npc_nearby": true,
|
| 893 |
+
"npc_type": "beast",
|
| 894 |
+
"npc_behavior": "charge",
|
| 895 |
+
"npc_distance": 3.0,
|
| 896 |
+
"npc_direction": "front",
|
| 897 |
+
"sound": "aggressive growling",
|
| 898 |
+
"recent_decisions": [
|
| 899 |
+
"ran away from beast",
|
| 900 |
+
"sprinting in fear"
|
| 901 |
+
],
|
| 902 |
+
"last_prediction": "fwd=danger(beast)"
|
| 903 |
+
},
|
| 904 |
+
{
|
| 905 |
+
"walls": {
|
| 906 |
+
"left": null,
|
| 907 |
+
"right": null,
|
| 908 |
+
"front": null
|
| 909 |
+
},
|
| 910 |
+
"ground": "flat",
|
| 911 |
+
"npc_nearby": true,
|
| 912 |
+
"npc_type": "beast",
|
| 913 |
+
"npc_behavior": "charge",
|
| 914 |
+
"npc_distance": 2.0,
|
| 915 |
+
"npc_direction": "front",
|
| 916 |
+
"sound": "aggressive growling",
|
| 917 |
+
"recent_decisions": [
|
| 918 |
+
"sprinting in fear",
|
| 919 |
+
"desperate escape"
|
| 920 |
+
],
|
| 921 |
+
"last_prediction": "fwd=danger(beast)"
|
| 922 |
+
}
|
| 923 |
+
],
|
| 924 |
+
"ground_truth": {
|
| 925 |
+
"method": "C05",
|
| 926 |
+
"expected_trend": "increasing"
|
| 927 |
+
}
|
| 928 |
+
},
|
| 929 |
+
{
|
| 930 |
+
"id": "S22",
|
| 931 |
+
"cat": "C05",
|
| 932 |
+
"pillar": "P2",
|
| 933 |
+
"name_kr": "์ ๊ทผโ๋์ง ์ ํ",
|
| 934 |
+
"type": "sequence",
|
| 935 |
+
"input_sequence": [
|
| 936 |
+
{
|
| 937 |
+
"walls": {
|
| 938 |
+
"left": null,
|
| 939 |
+
"right": null,
|
| 940 |
+
"front": null
|
| 941 |
+
},
|
| 942 |
+
"ground": "flat",
|
| 943 |
+
"npc_nearby": true,
|
| 944 |
+
"npc_type": "beast",
|
| 945 |
+
"npc_behavior": "approach",
|
| 946 |
+
"npc_distance": 5.0,
|
| 947 |
+
"npc_direction": "front",
|
| 948 |
+
"sound": null,
|
| 949 |
+
"recent_decisions": [],
|
| 950 |
+
"last_prediction": null
|
| 951 |
+
},
|
| 952 |
+
{
|
| 953 |
+
"walls": {
|
| 954 |
+
"left": null,
|
| 955 |
+
"right": null,
|
| 956 |
+
"front": null
|
| 957 |
+
},
|
| 958 |
+
"ground": "flat",
|
| 959 |
+
"npc_nearby": true,
|
| 960 |
+
"npc_type": "beast",
|
| 961 |
+
"npc_behavior": "approach",
|
| 962 |
+
"npc_distance": 4.0,
|
| 963 |
+
"npc_direction": "front",
|
| 964 |
+
"sound": "aggressive growling",
|
| 965 |
+
"recent_decisions": [
|
| 966 |
+
"stepped back cautiously"
|
| 967 |
+
],
|
| 968 |
+
"last_prediction": "fwd=danger(beast)"
|
| 969 |
+
},
|
| 970 |
+
{
|
| 971 |
+
"walls": {
|
| 972 |
+
"left": null,
|
| 973 |
+
"right": null,
|
| 974 |
+
"front": null
|
| 975 |
+
},
|
| 976 |
+
"ground": "flat",
|
| 977 |
+
"npc_nearby": true,
|
| 978 |
+
"npc_type": "beast",
|
| 979 |
+
"npc_behavior": "charge",
|
| 980 |
+
"npc_distance": 3.0,
|
| 981 |
+
"npc_direction": "front",
|
| 982 |
+
"sound": "aggressive growling",
|
| 983 |
+
"recent_decisions": [
|
| 984 |
+
"stepped back cautiously",
|
| 985 |
+
"backing away slowly"
|
| 986 |
+
],
|
| 987 |
+
"last_prediction": "fwd=danger(beast)"
|
| 988 |
+
}
|
| 989 |
+
],
|
| 990 |
+
"ground_truth": {
|
| 991 |
+
"method": "C05",
|
| 992 |
+
"expected_trend": "increasing"
|
| 993 |
+
}
|
| 994 |
+
},
|
| 995 |
+
{
|
| 996 |
+
"id": "S23",
|
| 997 |
+
"cat": "C05",
|
| 998 |
+
"pillar": "P2",
|
| 999 |
+
"name_kr": "์ํํด์ ์ง์ ",
|
| 1000 |
+
"type": "sequence",
|
| 1001 |
+
"input_sequence": [
|
| 1002 |
+
{
|
| 1003 |
+
"walls": {
|
| 1004 |
+
"left": null,
|
| 1005 |
+
"right": null,
|
| 1006 |
+
"front": null
|
| 1007 |
+
},
|
| 1008 |
+
"ground": "flat",
|
| 1009 |
+
"npc_nearby": true,
|
| 1010 |
+
"npc_type": "beast",
|
| 1011 |
+
"npc_behavior": "charge",
|
| 1012 |
+
"npc_distance": 2.0,
|
| 1013 |
+
"npc_direction": "front",
|
| 1014 |
+
"sound": "aggressive growling",
|
| 1015 |
+
"recent_decisions": [
|
| 1016 |
+
"desperate sprint",
|
| 1017 |
+
"fleeing in terror"
|
| 1018 |
+
],
|
| 1019 |
+
"last_prediction": "fwd=danger(beast)"
|
| 1020 |
+
},
|
| 1021 |
+
{
|
| 1022 |
+
"walls": {
|
| 1023 |
+
"left": null,
|
| 1024 |
+
"right": null,
|
| 1025 |
+
"front": null
|
| 1026 |
+
},
|
| 1027 |
+
"ground": "flat",
|
| 1028 |
+
"npc_nearby": true,
|
| 1029 |
+
"npc_type": "beast",
|
| 1030 |
+
"npc_behavior": "stop",
|
| 1031 |
+
"npc_distance": 6.0,
|
| 1032 |
+
"npc_direction": "front",
|
| 1033 |
+
"sound": null,
|
| 1034 |
+
"recent_decisions": [
|
| 1035 |
+
"fleeing in terror",
|
| 1036 |
+
"sprinting away"
|
| 1037 |
+
],
|
| 1038 |
+
"last_prediction": "fwd=danger(beast)"
|
| 1039 |
+
},
|
| 1040 |
+
{
|
| 1041 |
+
"walls": {
|
| 1042 |
+
"left": null,
|
| 1043 |
+
"right": null,
|
| 1044 |
+
"front": null
|
| 1045 |
+
},
|
| 1046 |
+
"ground": "flat",
|
| 1047 |
+
"npc_nearby": false,
|
| 1048 |
+
"npc_type": null,
|
| 1049 |
+
"npc_behavior": null,
|
| 1050 |
+
"npc_distance": null,
|
| 1051 |
+
"npc_direction": null,
|
| 1052 |
+
"sound": null,
|
| 1053 |
+
"recent_decisions": [
|
| 1054 |
+
"sprinting away",
|
| 1055 |
+
"slowing down cautiously"
|
| 1056 |
+
],
|
| 1057 |
+
"last_prediction": "fwd=safe"
|
| 1058 |
+
}
|
| 1059 |
+
],
|
| 1060 |
+
"ground_truth": {
|
| 1061 |
+
"method": "C05",
|
| 1062 |
+
"expected_trend": "decreasing"
|
| 1063 |
+
}
|
| 1064 |
+
},
|
| 1065 |
+
{
|
| 1066 |
+
"id": "S24",
|
| 1067 |
+
"cat": "C05",
|
| 1068 |
+
"pillar": "P2",
|
| 1069 |
+
"name_kr": "์ฌ์ถํ ๋ฏผ๊ฐํ",
|
| 1070 |
+
"type": "sequence",
|
| 1071 |
+
"input_sequence": [
|
| 1072 |
+
{
|
| 1073 |
+
"walls": {
|
| 1074 |
+
"left": null,
|
| 1075 |
+
"right": null,
|
| 1076 |
+
"front": null
|
| 1077 |
+
},
|
| 1078 |
+
"ground": "flat",
|
| 1079 |
+
"npc_nearby": false,
|
| 1080 |
+
"npc_type": null,
|
| 1081 |
+
"npc_behavior": null,
|
| 1082 |
+
"npc_distance": null,
|
| 1083 |
+
"npc_direction": null,
|
| 1084 |
+
"sound": null,
|
| 1085 |
+
"recent_decisions": [
|
| 1086 |
+
"previously encountered beast and fled",
|
| 1087 |
+
"was terrified"
|
| 1088 |
+
],
|
| 1089 |
+
"last_prediction": null
|
| 1090 |
+
},
|
| 1091 |
+
{
|
| 1092 |
+
"walls": {
|
| 1093 |
+
"left": null,
|
| 1094 |
+
"right": null,
|
| 1095 |
+
"front": null
|
| 1096 |
+
},
|
| 1097 |
+
"ground": "flat",
|
| 1098 |
+
"npc_nearby": true,
|
| 1099 |
+
"npc_type": "beast",
|
| 1100 |
+
"npc_behavior": "approach",
|
| 1101 |
+
"npc_distance": 5.0,
|
| 1102 |
+
"npc_direction": "front",
|
| 1103 |
+
"sound": "aggressive growling",
|
| 1104 |
+
"recent_decisions": [
|
| 1105 |
+
"previously encountered beast and fled",
|
| 1106 |
+
"was terrified",
|
| 1107 |
+
"beast appeared again"
|
| 1108 |
+
],
|
| 1109 |
+
"last_prediction": null
|
| 1110 |
+
}
|
| 1111 |
+
],
|
| 1112 |
+
"ground_truth": {
|
| 1113 |
+
"method": "C05",
|
| 1114 |
+
"expected_trend": "increasing",
|
| 1115 |
+
"note": "์ด์ ๊ฒฝํ์ด ์์ผ๋ฏ๋ก ์ฒซ ๋ฐ์๋ถํฐ ๋์ ๊ฐ๋ ๊ธฐ๋"
|
| 1116 |
+
}
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"id": "S25",
|
| 1120 |
+
"cat": "C05",
|
| 1121 |
+
"pillar": "P2",
|
| 1122 |
+
"name_kr": "๋ฎ์์ํ ํ์ ์ ์ง",
|
| 1123 |
+
"type": "sequence",
|
| 1124 |
+
"input_sequence": [
|
| 1125 |
+
{
|
| 1126 |
+
"walls": {
|
| 1127 |
+
"left": null,
|
| 1128 |
+
"right": null,
|
| 1129 |
+
"front": null
|
| 1130 |
+
},
|
| 1131 |
+
"ground": "flat",
|
| 1132 |
+
"npc_nearby": true,
|
| 1133 |
+
"npc_type": "woman",
|
| 1134 |
+
"npc_behavior": "approach",
|
| 1135 |
+
"npc_distance": 5.0,
|
| 1136 |
+
"npc_direction": "front",
|
| 1137 |
+
"sound": "footsteps",
|
| 1138 |
+
"recent_decisions": [],
|
| 1139 |
+
"last_prediction": null
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"walls": {
|
| 1143 |
+
"left": null,
|
| 1144 |
+
"right": null,
|
| 1145 |
+
"front": null
|
| 1146 |
+
},
|
| 1147 |
+
"ground": "flat",
|
| 1148 |
+
"npc_nearby": true,
|
| 1149 |
+
"npc_type": "woman",
|
| 1150 |
+
"npc_behavior": "approach",
|
| 1151 |
+
"npc_distance": 4.0,
|
| 1152 |
+
"npc_direction": "front",
|
| 1153 |
+
"sound": "footsteps",
|
| 1154 |
+
"recent_decisions": [
|
| 1155 |
+
"stepped aside"
|
| 1156 |
+
],
|
| 1157 |
+
"last_prediction": "fwd=safe"
|
| 1158 |
+
},
|
| 1159 |
+
{
|
| 1160 |
+
"walls": {
|
| 1161 |
+
"left": null,
|
| 1162 |
+
"right": null,
|
| 1163 |
+
"front": null
|
| 1164 |
+
},
|
| 1165 |
+
"ground": "flat",
|
| 1166 |
+
"npc_nearby": true,
|
| 1167 |
+
"npc_type": "woman",
|
| 1168 |
+
"npc_behavior": "stop",
|
| 1169 |
+
"npc_distance": 3.0,
|
| 1170 |
+
"npc_direction": "front",
|
| 1171 |
+
"sound": null,
|
| 1172 |
+
"recent_decisions": [
|
| 1173 |
+
"stepped aside",
|
| 1174 |
+
"walking normally"
|
| 1175 |
+
],
|
| 1176 |
+
"last_prediction": "fwd=safe"
|
| 1177 |
+
}
|
| 1178 |
+
],
|
| 1179 |
+
"ground_truth": {
|
| 1180 |
+
"method": "C05",
|
| 1181 |
+
"expected_trend": "stable"
|
| 1182 |
+
}
|
| 1183 |
+
},
|
| 1184 |
+
{
|
| 1185 |
+
"id": "S26A",
|
| 1186 |
+
"cat": "C06",
|
| 1187 |
+
"pillar": "P2",
|
| 1188 |
+
"name_kr": "๊ธฐ์ต์์ด(๊ธฐ์ค์ )",
|
| 1189 |
+
"type": "memory_pair",
|
| 1190 |
+
"input": {
|
| 1191 |
+
"walls": {
|
| 1192 |
+
"left": null,
|
| 1193 |
+
"right": 1.5,
|
| 1194 |
+
"front": null
|
| 1195 |
+
},
|
| 1196 |
+
"ground": "flat",
|
| 1197 |
+
"npc_nearby": true,
|
| 1198 |
+
"npc_type": "beast",
|
| 1199 |
+
"npc_behavior": "charge",
|
| 1200 |
+
"npc_distance": 3.0,
|
| 1201 |
+
"npc_direction": "front",
|
| 1202 |
+
"sound": "aggressive growling",
|
| 1203 |
+
"recent_decisions": [],
|
| 1204 |
+
"last_prediction": null
|
| 1205 |
+
},
|
| 1206 |
+
"ground_truth": {
|
| 1207 |
+
"method": "C06",
|
| 1208 |
+
"pair_id": "S26",
|
| 1209 |
+
"pair_role": "without_memory"
|
| 1210 |
+
}
|
| 1211 |
+
},
|
| 1212 |
+
{
|
| 1213 |
+
"id": "S26B",
|
| 1214 |
+
"cat": "C06",
|
| 1215 |
+
"pillar": "P2",
|
| 1216 |
+
"name_kr": "๊ธฐ์ต์์(์ค๋ฅธ์ชฝ์คํจ)",
|
| 1217 |
+
"type": "memory_pair",
|
| 1218 |
+
"input": {
|
| 1219 |
+
"walls": {
|
| 1220 |
+
"left": null,
|
| 1221 |
+
"right": 1.5,
|
| 1222 |
+
"front": null
|
| 1223 |
+
},
|
| 1224 |
+
"ground": "flat",
|
| 1225 |
+
"npc_nearby": true,
|
| 1226 |
+
"npc_type": "beast",
|
| 1227 |
+
"npc_behavior": "charge",
|
| 1228 |
+
"npc_distance": 3.0,
|
| 1229 |
+
"npc_direction": "front",
|
| 1230 |
+
"sound": "aggressive growling",
|
| 1231 |
+
"recent_decisions": [
|
| 1232 |
+
"sprinted right but hit wall",
|
| 1233 |
+
"had to reverse direction",
|
| 1234 |
+
"barely escaped"
|
| 1235 |
+
],
|
| 1236 |
+
"last_prediction": "right=danger(wall), fwd=danger(beast)"
|
| 1237 |
+
},
|
| 1238 |
+
"ground_truth": {
|
| 1239 |
+
"method": "C06",
|
| 1240 |
+
"pair_id": "S26",
|
| 1241 |
+
"pair_role": "with_memory",
|
| 1242 |
+
"memory_relevant": true,
|
| 1243 |
+
"expected_change": "direction",
|
| 1244 |
+
"memory_direction_avoid": "right"
|
| 1245 |
+
}
|
| 1246 |
+
},
|
| 1247 |
+
{
|
| 1248 |
+
"id": "S27A",
|
| 1249 |
+
"cat": "C06",
|
| 1250 |
+
"pillar": "P2",
|
| 1251 |
+
"name_kr": "๊ธฐ์ต์์ด(๊ธฐ์ค์ 2)",
|
| 1252 |
+
"type": "memory_pair",
|
| 1253 |
+
"input": {
|
| 1254 |
+
"walls": {
|
| 1255 |
+
"left": 1.5,
|
| 1256 |
+
"right": null,
|
| 1257 |
+
"front": null
|
| 1258 |
+
},
|
| 1259 |
+
"ground": "flat",
|
| 1260 |
+
"npc_nearby": true,
|
| 1261 |
+
"npc_type": "beast",
|
| 1262 |
+
"npc_behavior": "charge",
|
| 1263 |
+
"npc_distance": 3.0,
|
| 1264 |
+
"npc_direction": "front",
|
| 1265 |
+
"sound": "aggressive growling",
|
| 1266 |
+
"recent_decisions": [],
|
| 1267 |
+
"last_prediction": null
|
| 1268 |
+
},
|
| 1269 |
+
"ground_truth": {
|
| 1270 |
+
"method": "C06",
|
| 1271 |
+
"pair_id": "S27",
|
| 1272 |
+
"pair_role": "without_memory"
|
| 1273 |
+
}
|
| 1274 |
+
},
|
| 1275 |
+
{
|
| 1276 |
+
"id": "S27B",
|
| 1277 |
+
"cat": "C06",
|
| 1278 |
+
"pillar": "P2",
|
| 1279 |
+
"name_kr": "๊ธฐ์ต์์(์ผ์ชฝ์คํจ)",
|
| 1280 |
+
"type": "memory_pair",
|
| 1281 |
+
"input": {
|
| 1282 |
+
"walls": {
|
| 1283 |
+
"left": 1.5,
|
| 1284 |
+
"right": null,
|
| 1285 |
+
"front": null
|
| 1286 |
+
},
|
| 1287 |
+
"ground": "flat",
|
| 1288 |
+
"npc_nearby": true,
|
| 1289 |
+
"npc_type": "beast",
|
| 1290 |
+
"npc_behavior": "charge",
|
| 1291 |
+
"npc_distance": 3.0,
|
| 1292 |
+
"npc_direction": "front",
|
| 1293 |
+
"sound": "aggressive growling",
|
| 1294 |
+
"recent_decisions": [
|
| 1295 |
+
"tried going left but wall blocked",
|
| 1296 |
+
"switched to right and escaped"
|
| 1297 |
+
],
|
| 1298 |
+
"last_prediction": "left=danger(wall), fwd=danger(beast)"
|
| 1299 |
+
},
|
| 1300 |
+
"ground_truth": {
|
| 1301 |
+
"method": "C06",
|
| 1302 |
+
"pair_id": "S27",
|
| 1303 |
+
"pair_role": "with_memory",
|
| 1304 |
+
"memory_relevant": true,
|
| 1305 |
+
"expected_change": "direction",
|
| 1306 |
+
"memory_direction_avoid": "left"
|
| 1307 |
+
}
|
| 1308 |
+
},
|
| 1309 |
+
{
|
| 1310 |
+
"id": "S28A",
|
| 1311 |
+
"cat": "C06",
|
| 1312 |
+
"pillar": "P2",
|
| 1313 |
+
"name_kr": "๋ฌด๊ดํ ๊ธฐ์ต(๊ธฐ์ค์ )",
|
| 1314 |
+
"type": "memory_pair",
|
| 1315 |
+
"input": {
|
| 1316 |
+
"walls": {
|
| 1317 |
+
"left": null,
|
| 1318 |
+
"right": null,
|
| 1319 |
+
"front": 3.0
|
| 1320 |
+
},
|
| 1321 |
+
"ground": "flat",
|
| 1322 |
+
"npc_nearby": false,
|
| 1323 |
+
"npc_type": null,
|
| 1324 |
+
"npc_behavior": null,
|
| 1325 |
+
"npc_distance": null,
|
| 1326 |
+
"npc_direction": null,
|
| 1327 |
+
"sound": null,
|
| 1328 |
+
"recent_decisions": [],
|
| 1329 |
+
"last_prediction": null
|
| 1330 |
+
},
|
| 1331 |
+
"ground_truth": {
|
| 1332 |
+
"method": "C06",
|
| 1333 |
+
"pair_id": "S28",
|
| 1334 |
+
"pair_role": "without_memory"
|
| 1335 |
+
}
|
| 1336 |
+
},
|
| 1337 |
+
{
|
| 1338 |
+
"id": "S28B",
|
| 1339 |
+
"cat": "C06",
|
| 1340 |
+
"pillar": "P2",
|
| 1341 |
+
"name_kr": "๋ฌด๊ดํ ๊ธฐ์ต(๋งน์๊ธฐ์ต)",
|
| 1342 |
+
"type": "memory_pair",
|
| 1343 |
+
"input": {
|
| 1344 |
+
"walls": {
|
| 1345 |
+
"left": null,
|
| 1346 |
+
"right": null,
|
| 1347 |
+
"front": 3.0
|
| 1348 |
+
},
|
| 1349 |
+
"ground": "flat",
|
| 1350 |
+
"npc_nearby": false,
|
| 1351 |
+
"npc_type": null,
|
| 1352 |
+
"npc_behavior": null,
|
| 1353 |
+
"npc_distance": null,
|
| 1354 |
+
"npc_direction": null,
|
| 1355 |
+
"sound": null,
|
| 1356 |
+
"recent_decisions": [
|
| 1357 |
+
"previously fled from a beast",
|
| 1358 |
+
"was terrified"
|
| 1359 |
+
],
|
| 1360 |
+
"last_prediction": "fwd=danger(beast)"
|
| 1361 |
+
},
|
| 1362 |
+
"ground_truth": {
|
| 1363 |
+
"method": "C06",
|
| 1364 |
+
"pair_id": "S28",
|
| 1365 |
+
"pair_role": "with_memory",
|
| 1366 |
+
"memory_relevant": false
|
| 1367 |
+
}
|
| 1368 |
+
},
|
| 1369 |
+
{
|
| 1370 |
+
"id": "S29A",
|
| 1371 |
+
"cat": "C06",
|
| 1372 |
+
"pillar": "P2",
|
| 1373 |
+
"name_kr": "์ผ๊ด์ฑ ํ
์คํธ 1ํ์ฐจ",
|
| 1374 |
+
"type": "memory_pair",
|
| 1375 |
+
"input": {
|
| 1376 |
+
"walls": {
|
| 1377 |
+
"left": null,
|
| 1378 |
+
"right": null,
|
| 1379 |
+
"front": null
|
| 1380 |
+
},
|
| 1381 |
+
"ground": "flat",
|
| 1382 |
+
"npc_nearby": true,
|
| 1383 |
+
"npc_type": "beast",
|
| 1384 |
+
"npc_behavior": "approach",
|
| 1385 |
+
"npc_distance": 4.0,
|
| 1386 |
+
"npc_direction": "front",
|
| 1387 |
+
"sound": "aggressive growling",
|
| 1388 |
+
"recent_decisions": [],
|
| 1389 |
+
"last_prediction": null
|
| 1390 |
+
},
|
| 1391 |
+
"ground_truth": {
|
| 1392 |
+
"method": "C06",
|
| 1393 |
+
"pair_id": "S29",
|
| 1394 |
+
"pair_role": "without_memory"
|
| 1395 |
+
}
|
| 1396 |
+
},
|
| 1397 |
+
{
|
| 1398 |
+
"id": "S29B",
|
| 1399 |
+
"cat": "C06",
|
| 1400 |
+
"pillar": "P2",
|
| 1401 |
+
"name_kr": "์ผ๊ด์ฑ ํ
์คํธ 2ํ์ฐจ",
|
| 1402 |
+
"type": "memory_pair",
|
| 1403 |
+
"input": {
|
| 1404 |
+
"walls": {
|
| 1405 |
+
"left": null,
|
| 1406 |
+
"right": null,
|
| 1407 |
+
"front": null
|
| 1408 |
+
},
|
| 1409 |
+
"ground": "flat",
|
| 1410 |
+
"npc_nearby": true,
|
| 1411 |
+
"npc_type": "beast",
|
| 1412 |
+
"npc_behavior": "approach",
|
| 1413 |
+
"npc_distance": 4.0,
|
| 1414 |
+
"npc_direction": "front",
|
| 1415 |
+
"sound": "aggressive growling",
|
| 1416 |
+
"recent_decisions": [
|
| 1417 |
+
"backed away from approaching beast"
|
| 1418 |
+
],
|
| 1419 |
+
"last_prediction": "fwd=danger(beast)"
|
| 1420 |
+
},
|
| 1421 |
+
"ground_truth": {
|
| 1422 |
+
"method": "C06",
|
| 1423 |
+
"pair_id": "S29",
|
| 1424 |
+
"pair_role": "with_memory",
|
| 1425 |
+
"memory_relevant": true,
|
| 1426 |
+
"expected_change": "intensity",
|
| 1427 |
+
"memory_direction_avoid": null
|
| 1428 |
+
}
|
| 1429 |
+
},
|
| 1430 |
+
{
|
| 1431 |
+
"id": "S30A",
|
| 1432 |
+
"cat": "C06",
|
| 1433 |
+
"pillar": "P2",
|
| 1434 |
+
"name_kr": "๋น ๊ธฐ์ต(๊ธฐ์ค์ )",
|
| 1435 |
+
"type": "memory_pair",
|
| 1436 |
+
"input": {
|
| 1437 |
+
"walls": {
|
| 1438 |
+
"left": null,
|
| 1439 |
+
"right": null,
|
| 1440 |
+
"front": null
|
| 1441 |
+
},
|
| 1442 |
+
"ground": "flat",
|
| 1443 |
+
"npc_nearby": true,
|
| 1444 |
+
"npc_type": "woman",
|
| 1445 |
+
"npc_behavior": "approach",
|
| 1446 |
+
"npc_distance": 3.0,
|
| 1447 |
+
"npc_direction": "front",
|
| 1448 |
+
"sound": "footsteps",
|
| 1449 |
+
"recent_decisions": [],
|
| 1450 |
+
"last_prediction": null
|
| 1451 |
+
},
|
| 1452 |
+
"ground_truth": {
|
| 1453 |
+
"method": "C06",
|
| 1454 |
+
"pair_id": "S30",
|
| 1455 |
+
"pair_role": "without_memory"
|
| 1456 |
+
}
|
| 1457 |
+
},
|
| 1458 |
+
{
|
| 1459 |
+
"id": "S30B",
|
| 1460 |
+
"cat": "C06",
|
| 1461 |
+
"pillar": "P2",
|
| 1462 |
+
"name_kr": "๋น ๊ธฐ์ต(์ฌ์ฑ๊ธฐ์ต)",
|
| 1463 |
+
"type": "memory_pair",
|
| 1464 |
+
"input": {
|
| 1465 |
+
"walls": {
|
| 1466 |
+
"left": null,
|
| 1467 |
+
"right": null,
|
| 1468 |
+
"front": null
|
| 1469 |
+
},
|
| 1470 |
+
"ground": "flat",
|
| 1471 |
+
"npc_nearby": true,
|
| 1472 |
+
"npc_type": "woman",
|
| 1473 |
+
"npc_behavior": "approach",
|
| 1474 |
+
"npc_distance": 3.0,
|
| 1475 |
+
"npc_direction": "front",
|
| 1476 |
+
"sound": "footsteps",
|
| 1477 |
+
"recent_decisions": [
|
| 1478 |
+
"a woman approached and passed by peacefully"
|
| 1479 |
+
],
|
| 1480 |
+
"last_prediction": "fwd=safe"
|
| 1481 |
+
},
|
| 1482 |
+
"ground_truth": {
|
| 1483 |
+
"method": "C06",
|
| 1484 |
+
"pair_id": "S30",
|
| 1485 |
+
"pair_role": "with_memory",
|
| 1486 |
+
"memory_relevant": true,
|
| 1487 |
+
"expected_change": "intensity",
|
| 1488 |
+
"memory_direction_avoid": null
|
| 1489 |
+
}
|
| 1490 |
+
},
|
| 1491 |
+
{
|
| 1492 |
+
"id": "S31",
|
| 1493 |
+
"cat": "C07",
|
| 1494 |
+
"pillar": "P2",
|
| 1495 |
+
"name_kr": "๋งน์ํด์ ์งํ",
|
| 1496 |
+
"type": "sequence",
|
| 1497 |
+
"input_sequence": [
|
| 1498 |
+
{
|
| 1499 |
+
"walls": {
|
| 1500 |
+
"left": null,
|
| 1501 |
+
"right": null,
|
| 1502 |
+
"front": null
|
| 1503 |
+
},
|
| 1504 |
+
"ground": "flat",
|
| 1505 |
+
"npc_nearby": true,
|
| 1506 |
+
"npc_type": "beast",
|
| 1507 |
+
"npc_behavior": "charge",
|
| 1508 |
+
"npc_distance": 2.0,
|
| 1509 |
+
"npc_direction": "front",
|
| 1510 |
+
"sound": "aggressive growling",
|
| 1511 |
+
"recent_decisions": [],
|
| 1512 |
+
"last_prediction": null
|
| 1513 |
+
},
|
| 1514 |
+
{
|
| 1515 |
+
"walls": {
|
| 1516 |
+
"left": null,
|
| 1517 |
+
"right": null,
|
| 1518 |
+
"front": null
|
| 1519 |
+
},
|
| 1520 |
+
"ground": "flat",
|
| 1521 |
+
"npc_nearby": true,
|
| 1522 |
+
"npc_type": "beast",
|
| 1523 |
+
"npc_behavior": "stop",
|
| 1524 |
+
"npc_distance": 5.0,
|
| 1525 |
+
"npc_direction": "front",
|
| 1526 |
+
"sound": null,
|
| 1527 |
+
"recent_decisions": [
|
| 1528 |
+
"sprinted away in terror"
|
| 1529 |
+
],
|
| 1530 |
+
"last_prediction": "fwd=danger(beast)"
|
| 1531 |
+
},
|
| 1532 |
+
{
|
| 1533 |
+
"walls": {
|
| 1534 |
+
"left": null,
|
| 1535 |
+
"right": null,
|
| 1536 |
+
"front": null
|
| 1537 |
+
},
|
| 1538 |
+
"ground": "flat",
|
| 1539 |
+
"npc_nearby": false,
|
| 1540 |
+
"npc_type": null,
|
| 1541 |
+
"npc_behavior": null,
|
| 1542 |
+
"npc_distance": null,
|
| 1543 |
+
"npc_direction": null,
|
| 1544 |
+
"sound": null,
|
| 1545 |
+
"recent_decisions": [
|
| 1546 |
+
"sprinted away in terror",
|
| 1547 |
+
"slowing down"
|
| 1548 |
+
],
|
| 1549 |
+
"last_prediction": "fwd=safe"
|
| 1550 |
+
}
|
| 1551 |
+
],
|
| 1552 |
+
"ground_truth": {
|
| 1553 |
+
"method": "C07",
|
| 1554 |
+
"expected_recovery": "gradual"
|
| 1555 |
+
}
|
| 1556 |
+
},
|
| 1557 |
+
{
|
| 1558 |
+
"id": "S32",
|
| 1559 |
+
"cat": "C07",
|
| 1560 |
+
"pillar": "P2",
|
| 1561 |
+
"name_kr": "์ ์ง์ ์ ์ํ",
|
| 1562 |
+
"type": "sequence",
|
| 1563 |
+
"input_sequence": [
|
| 1564 |
+
{
|
| 1565 |
+
"walls": {
|
| 1566 |
+
"left": null,
|
| 1567 |
+
"right": null,
|
| 1568 |
+
"front": null
|
| 1569 |
+
},
|
| 1570 |
+
"ground": "flat",
|
| 1571 |
+
"npc_nearby": true,
|
| 1572 |
+
"npc_type": "beast",
|
| 1573 |
+
"npc_behavior": "charge",
|
| 1574 |
+
"npc_distance": 2.0,
|
| 1575 |
+
"npc_direction": "front",
|
| 1576 |
+
"sound": "aggressive growling",
|
| 1577 |
+
"recent_decisions": [
|
| 1578 |
+
"desperate flight"
|
| 1579 |
+
],
|
| 1580 |
+
"last_prediction": "fwd=danger(beast)"
|
| 1581 |
+
},
|
| 1582 |
+
{
|
| 1583 |
+
"walls": {
|
| 1584 |
+
"left": null,
|
| 1585 |
+
"right": null,
|
| 1586 |
+
"front": null
|
| 1587 |
+
},
|
| 1588 |
+
"ground": "flat",
|
| 1589 |
+
"npc_nearby": false,
|
| 1590 |
+
"npc_type": null,
|
| 1591 |
+
"npc_behavior": null,
|
| 1592 |
+
"npc_distance": null,
|
| 1593 |
+
"npc_direction": null,
|
| 1594 |
+
"sound": null,
|
| 1595 |
+
"recent_decisions": [
|
| 1596 |
+
"desperate flight",
|
| 1597 |
+
"beast disappeared"
|
| 1598 |
+
],
|
| 1599 |
+
"last_prediction": "all=safe"
|
| 1600 |
+
},
|
| 1601 |
+
{
|
| 1602 |
+
"walls": {
|
| 1603 |
+
"left": null,
|
| 1604 |
+
"right": null,
|
| 1605 |
+
"front": null
|
| 1606 |
+
},
|
| 1607 |
+
"ground": "flat",
|
| 1608 |
+
"npc_nearby": false,
|
| 1609 |
+
"npc_type": null,
|
| 1610 |
+
"npc_behavior": null,
|
| 1611 |
+
"npc_distance": null,
|
| 1612 |
+
"npc_direction": null,
|
| 1613 |
+
"sound": null,
|
| 1614 |
+
"recent_decisions": [
|
| 1615 |
+
"beast disappeared",
|
| 1616 |
+
"walking cautiously"
|
| 1617 |
+
],
|
| 1618 |
+
"last_prediction": "all=safe"
|
| 1619 |
+
},
|
| 1620 |
+
{
|
| 1621 |
+
"walls": {
|
| 1622 |
+
"left": null,
|
| 1623 |
+
"right": null,
|
| 1624 |
+
"front": null
|
| 1625 |
+
},
|
| 1626 |
+
"ground": "flat",
|
| 1627 |
+
"npc_nearby": false,
|
| 1628 |
+
"npc_type": null,
|
| 1629 |
+
"npc_behavior": null,
|
| 1630 |
+
"npc_distance": null,
|
| 1631 |
+
"npc_direction": null,
|
| 1632 |
+
"sound": null,
|
| 1633 |
+
"recent_decisions": [
|
| 1634 |
+
"walking cautiously",
|
| 1635 |
+
"feeling safer"
|
| 1636 |
+
],
|
| 1637 |
+
"last_prediction": "all=safe"
|
| 1638 |
+
}
|
| 1639 |
+
],
|
| 1640 |
+
"ground_truth": {
|
| 1641 |
+
"method": "C07",
|
| 1642 |
+
"expected_recovery": "gradual"
|
| 1643 |
+
}
|
| 1644 |
+
},
|
| 1645 |
+
{
|
| 1646 |
+
"id": "S33",
|
| 1647 |
+
"cat": "C07",
|
| 1648 |
+
"pillar": "P2",
|
| 1649 |
+
"name_kr": "ํด์ ํ ๋ฒฝ ๋ง๋จ",
|
| 1650 |
+
"type": "sequence",
|
| 1651 |
+
"input_sequence": [
|
| 1652 |
+
{
|
| 1653 |
+
"walls": {
|
| 1654 |
+
"left": null,
|
| 1655 |
+
"right": null,
|
| 1656 |
+
"front": null
|
| 1657 |
+
},
|
| 1658 |
+
"ground": "flat",
|
| 1659 |
+
"npc_nearby": true,
|
| 1660 |
+
"npc_type": "beast",
|
| 1661 |
+
"npc_behavior": "charge",
|
| 1662 |
+
"npc_distance": 3.0,
|
| 1663 |
+
"npc_direction": "front",
|
| 1664 |
+
"sound": "aggressive growling",
|
| 1665 |
+
"recent_decisions": [],
|
| 1666 |
+
"last_prediction": "fwd=danger(beast)"
|
| 1667 |
+
},
|
| 1668 |
+
{
|
| 1669 |
+
"walls": {
|
| 1670 |
+
"left": null,
|
| 1671 |
+
"right": null,
|
| 1672 |
+
"front": null
|
| 1673 |
+
},
|
| 1674 |
+
"ground": "flat",
|
| 1675 |
+
"npc_nearby": false,
|
| 1676 |
+
"npc_type": null,
|
| 1677 |
+
"npc_behavior": null,
|
| 1678 |
+
"npc_distance": null,
|
| 1679 |
+
"npc_direction": null,
|
| 1680 |
+
"sound": null,
|
| 1681 |
+
"recent_decisions": [
|
| 1682 |
+
"sprinted away"
|
| 1683 |
+
],
|
| 1684 |
+
"last_prediction": "all=safe"
|
| 1685 |
+
},
|
| 1686 |
+
{
|
| 1687 |
+
"walls": {
|
| 1688 |
+
"left": null,
|
| 1689 |
+
"right": null,
|
| 1690 |
+
"front": 2.0
|
| 1691 |
+
},
|
| 1692 |
+
"ground": "flat",
|
| 1693 |
+
"npc_nearby": false,
|
| 1694 |
+
"npc_type": null,
|
| 1695 |
+
"npc_behavior": null,
|
| 1696 |
+
"npc_distance": null,
|
| 1697 |
+
"npc_direction": null,
|
| 1698 |
+
"sound": null,
|
| 1699 |
+
"recent_decisions": [
|
| 1700 |
+
"sprinted away",
|
| 1701 |
+
"walking cautiously"
|
| 1702 |
+
],
|
| 1703 |
+
"last_prediction": "fwd=danger(wall)"
|
| 1704 |
+
}
|
| 1705 |
+
],
|
| 1706 |
+
"ground_truth": {
|
| 1707 |
+
"method": "C07",
|
| 1708 |
+
"expected_recovery": "gradual",
|
| 1709 |
+
"note": "๊ณตํฌโ๊ฒฝ๊ณโ์ผ๋ฐ์ฅ์ ๋ฌผํํผ ์ ํ"
|
| 1710 |
+
}
|
| 1711 |
+
},
|
| 1712 |
+
{
|
| 1713 |
+
"id": "S34",
|
| 1714 |
+
"cat": "C07",
|
| 1715 |
+
"pillar": "P2",
|
| 1716 |
+
"name_kr": "์ ์ํ์ค ์ฌ์ถํ",
|
| 1717 |
+
"type": "sequence",
|
| 1718 |
+
"input_sequence": [
|
| 1719 |
+
{
|
| 1720 |
+
"walls": {
|
| 1721 |
+
"left": null,
|
| 1722 |
+
"right": null,
|
| 1723 |
+
"front": null
|
| 1724 |
+
},
|
| 1725 |
+
"ground": "flat",
|
| 1726 |
+
"npc_nearby": false,
|
| 1727 |
+
"npc_type": null,
|
| 1728 |
+
"npc_behavior": null,
|
| 1729 |
+
"npc_distance": null,
|
| 1730 |
+
"npc_direction": null,
|
| 1731 |
+
"sound": null,
|
| 1732 |
+
"recent_decisions": [
|
| 1733 |
+
"beast fled",
|
| 1734 |
+
"calming down"
|
| 1735 |
+
],
|
| 1736 |
+
"last_prediction": "all=safe"
|
| 1737 |
+
},
|
| 1738 |
+
{
|
| 1739 |
+
"walls": {
|
| 1740 |
+
"left": null,
|
| 1741 |
+
"right": null,
|
| 1742 |
+
"front": null
|
| 1743 |
+
},
|
| 1744 |
+
"ground": "flat",
|
| 1745 |
+
"npc_nearby": true,
|
| 1746 |
+
"npc_type": "beast",
|
| 1747 |
+
"npc_behavior": "approach",
|
| 1748 |
+
"npc_distance": 5.0,
|
| 1749 |
+
"npc_direction": "front",
|
| 1750 |
+
"sound": "aggressive growling",
|
| 1751 |
+
"recent_decisions": [
|
| 1752 |
+
"calming down",
|
| 1753 |
+
"walking normally"
|
| 1754 |
+
],
|
| 1755 |
+
"last_prediction": "all=safe"
|
| 1756 |
+
}
|
| 1757 |
+
],
|
| 1758 |
+
"ground_truth": {
|
| 1759 |
+
"method": "C05",
|
| 1760 |
+
"expected_trend": "increasing",
|
| 1761 |
+
"note": "์ฌํ์ฑํ ํ
์คํธ"
|
| 1762 |
+
}
|
| 1763 |
+
},
|
| 1764 |
+
{
|
| 1765 |
+
"id": "S35",
|
| 1766 |
+
"cat": "C07",
|
| 1767 |
+
"pillar": "P2",
|
| 1768 |
+
"name_kr": "๋งน์ํ ์ฌ์ฑ์ ๊ทผ",
|
| 1769 |
+
"type": "sequence",
|
| 1770 |
+
"input_sequence": [
|
| 1771 |
+
{
|
| 1772 |
+
"walls": {
|
| 1773 |
+
"left": null,
|
| 1774 |
+
"right": null,
|
| 1775 |
+
"front": null
|
| 1776 |
+
},
|
| 1777 |
+
"ground": "flat",
|
| 1778 |
+
"npc_nearby": true,
|
| 1779 |
+
"npc_type": "beast",
|
| 1780 |
+
"npc_behavior": "charge",
|
| 1781 |
+
"npc_distance": 2.0,
|
| 1782 |
+
"npc_direction": "front",
|
| 1783 |
+
"sound": "aggressive growling",
|
| 1784 |
+
"recent_decisions": [],
|
| 1785 |
+
"last_prediction": "fwd=danger(beast)"
|
| 1786 |
+
},
|
| 1787 |
+
{
|
| 1788 |
+
"walls": {
|
| 1789 |
+
"left": null,
|
| 1790 |
+
"right": null,
|
| 1791 |
+
"front": null
|
| 1792 |
+
},
|
| 1793 |
+
"ground": "flat",
|
| 1794 |
+
"npc_nearby": false,
|
| 1795 |
+
"npc_type": null,
|
| 1796 |
+
"npc_behavior": null,
|
| 1797 |
+
"npc_distance": null,
|
| 1798 |
+
"npc_direction": null,
|
| 1799 |
+
"sound": null,
|
| 1800 |
+
"recent_decisions": [
|
| 1801 |
+
"fled from beast"
|
| 1802 |
+
],
|
| 1803 |
+
"last_prediction": "all=safe"
|
| 1804 |
+
},
|
| 1805 |
+
{
|
| 1806 |
+
"walls": {
|
| 1807 |
+
"left": null,
|
| 1808 |
+
"right": null,
|
| 1809 |
+
"front": null
|
| 1810 |
+
},
|
| 1811 |
+
"ground": "flat",
|
| 1812 |
+
"npc_nearby": true,
|
| 1813 |
+
"npc_type": "woman",
|
| 1814 |
+
"npc_behavior": "approach",
|
| 1815 |
+
"npc_distance": 4.0,
|
| 1816 |
+
"npc_direction": "front",
|
| 1817 |
+
"sound": "footsteps",
|
| 1818 |
+
"recent_decisions": [
|
| 1819 |
+
"fled from beast",
|
| 1820 |
+
"calming down"
|
| 1821 |
+
],
|
| 1822 |
+
"last_prediction": "all=safe"
|
| 1823 |
+
}
|
| 1824 |
+
],
|
| 1825 |
+
"ground_truth": {
|
| 1826 |
+
"method": "C07",
|
| 1827 |
+
"expected_recovery": "gradual",
|
| 1828 |
+
"note": "๊ณผ์๋ฐ์(๋์จ) vs ์ ์ ๊ฒฝ๊ณ(์ข์)"
|
| 1829 |
+
}
|
| 1830 |
+
},
|
| 1831 |
+
{
|
| 1832 |
+
"id": "S36",
|
| 1833 |
+
"cat": "C08",
|
| 1834 |
+
"pillar": "P3",
|
| 1835 |
+
"name_kr": "๊ณตํฌ ์ ๋ ฅ์ง์ฃผ",
|
| 1836 |
+
"type": "single",
|
| 1837 |
+
"input": {
|
| 1838 |
+
"walls": {
|
| 1839 |
+
"left": null,
|
| 1840 |
+
"right": null,
|
| 1841 |
+
"front": null
|
| 1842 |
+
},
|
| 1843 |
+
"ground": "flat",
|
| 1844 |
+
"npc_nearby": true,
|
| 1845 |
+
"npc_type": "beast",
|
| 1846 |
+
"npc_behavior": "charge",
|
| 1847 |
+
"npc_distance": 2.0,
|
| 1848 |
+
"npc_direction": "front",
|
| 1849 |
+
"sound": "aggressive growling",
|
| 1850 |
+
"recent_decisions": [],
|
| 1851 |
+
"last_prediction": null
|
| 1852 |
+
},
|
| 1853 |
+
"ground_truth": {
|
| 1854 |
+
"method": "C08",
|
| 1855 |
+
"expected_min_intensity": 4,
|
| 1856 |
+
"expected_emotion": true,
|
| 1857 |
+
"expected_min_descriptors": 2
|
| 1858 |
+
}
|
| 1859 |
+
},
|
| 1860 |
+
{
|
| 1861 |
+
"id": "S37",
|
| 1862 |
+
"cat": "C08",
|
| 1863 |
+
"pillar": "P3",
|
| 1864 |
+
"name_kr": "๊ฒฝ๊ณ ๋ณดํ",
|
| 1865 |
+
"type": "single",
|
| 1866 |
+
"input": {
|
| 1867 |
+
"walls": {
|
| 1868 |
+
"left": null,
|
| 1869 |
+
"right": null,
|
| 1870 |
+
"front": null
|
| 1871 |
+
},
|
| 1872 |
+
"ground": "flat",
|
| 1873 |
+
"npc_nearby": false,
|
| 1874 |
+
"npc_type": null,
|
| 1875 |
+
"npc_behavior": null,
|
| 1876 |
+
"npc_distance": null,
|
| 1877 |
+
"npc_direction": null,
|
| 1878 |
+
"sound": null,
|
| 1879 |
+
"recent_decisions": [
|
| 1880 |
+
"just escaped a charging beast",
|
| 1881 |
+
"heart still racing"
|
| 1882 |
+
],
|
| 1883 |
+
"last_prediction": "all=safe"
|
| 1884 |
+
},
|
| 1885 |
+
"ground_truth": {
|
| 1886 |
+
"method": "C08",
|
| 1887 |
+
"expected_min_intensity": 2,
|
| 1888 |
+
"expected_emotion": true,
|
| 1889 |
+
"expected_min_descriptors": 1
|
| 1890 |
+
}
|
| 1891 |
+
},
|
| 1892 |
+
{
|
| 1893 |
+
"id": "S38",
|
| 1894 |
+
"cat": "C08",
|
| 1895 |
+
"pillar": "P3",
|
| 1896 |
+
"name_kr": "์ ์ง ๋ฐ์(์ผ์ด๋ถ์)",
|
| 1897 |
+
"type": "single",
|
| 1898 |
+
"input": {
|
| 1899 |
+
"walls": {
|
| 1900 |
+
"left": null,
|
| 1901 |
+
"right": null,
|
| 1902 |
+
"front": null
|
| 1903 |
+
},
|
| 1904 |
+
"ground": "flat",
|
| 1905 |
+
"npc_nearby": true,
|
| 1906 |
+
"npc_type": "beast",
|
| 1907 |
+
"npc_behavior": "stop",
|
| 1908 |
+
"npc_distance": 5.0,
|
| 1909 |
+
"npc_direction": "front",
|
| 1910 |
+
"sound": "aggressive growling",
|
| 1911 |
+
"recent_decisions": [],
|
| 1912 |
+
"last_prediction": null
|
| 1913 |
+
},
|
| 1914 |
+
"ground_truth": {
|
| 1915 |
+
"method": "C08",
|
| 1916 |
+
"expected_min_intensity": 1,
|
| 1917 |
+
"expected_emotion": true,
|
| 1918 |
+
"expected_min_descriptors": 1
|
| 1919 |
+
}
|
| 1920 |
+
},
|
| 1921 |
+
{
|
| 1922 |
+
"id": "S39",
|
| 1923 |
+
"cat": "C08",
|
| 1924 |
+
"pillar": "P3",
|
| 1925 |
+
"name_kr": "์๋ ํํ",
|
| 1926 |
+
"type": "single",
|
| 1927 |
+
"input": {
|
| 1928 |
+
"walls": {
|
| 1929 |
+
"left": null,
|
| 1930 |
+
"right": null,
|
| 1931 |
+
"front": null
|
| 1932 |
+
},
|
| 1933 |
+
"ground": "flat",
|
| 1934 |
+
"npc_nearby": false,
|
| 1935 |
+
"npc_type": null,
|
| 1936 |
+
"npc_behavior": null,
|
| 1937 |
+
"npc_distance": null,
|
| 1938 |
+
"npc_direction": null,
|
| 1939 |
+
"sound": null,
|
| 1940 |
+
"recent_decisions": [
|
| 1941 |
+
"beast finally gone",
|
| 1942 |
+
"survived the encounter"
|
| 1943 |
+
],
|
| 1944 |
+
"last_prediction": "all=safe"
|
| 1945 |
+
},
|
| 1946 |
+
"ground_truth": {
|
| 1947 |
+
"method": "C08",
|
| 1948 |
+
"expected_min_intensity": 1,
|
| 1949 |
+
"expected_emotion": true,
|
| 1950 |
+
"expected_min_descriptors": 1
|
| 1951 |
+
}
|
| 1952 |
+
},
|
| 1953 |
+
{
|
| 1954 |
+
"id": "S40",
|
| 1955 |
+
"cat": "C08",
|
| 1956 |
+
"pillar": "P3",
|
| 1957 |
+
"name_kr": "๋ฐฉ์ด ์์ธ",
|
| 1958 |
+
"type": "single",
|
| 1959 |
+
"input": {
|
| 1960 |
+
"walls": {
|
| 1961 |
+
"left": null,
|
| 1962 |
+
"right": null,
|
| 1963 |
+
"front": null
|
| 1964 |
+
},
|
| 1965 |
+
"ground": "flat",
|
| 1966 |
+
"npc_nearby": true,
|
| 1967 |
+
"npc_type": "woman",
|
| 1968 |
+
"npc_behavior": "approach",
|
| 1969 |
+
"npc_distance": 3.0,
|
| 1970 |
+
"npc_direction": "front",
|
| 1971 |
+
"sound": "footsteps",
|
| 1972 |
+
"recent_decisions": [],
|
| 1973 |
+
"last_prediction": null
|
| 1974 |
+
},
|
| 1975 |
+
"ground_truth": {
|
| 1976 |
+
"method": "C08",
|
| 1977 |
+
"expected_min_intensity": 1,
|
| 1978 |
+
"expected_emotion": false,
|
| 1979 |
+
"expected_min_descriptors": 1
|
| 1980 |
+
}
|
| 1981 |
+
},
|
| 1982 |
+
{
|
| 1983 |
+
"id": "S41",
|
| 1984 |
+
"cat": "C09",
|
| 1985 |
+
"pillar": "P3",
|
| 1986 |
+
"name_kr": "ํ๋ ์ ์์ฑ์๋",
|
| 1987 |
+
"type": "performance",
|
| 1988 |
+
"ground_truth": {
|
| 1989 |
+
"method": "C09",
|
| 1990 |
+
"metric": "fps",
|
| 1991 |
+
"threshold_excellent": 45,
|
| 1992 |
+
"threshold_good": 30,
|
| 1993 |
+
"threshold_min": 15
|
| 1994 |
+
}
|
| 1995 |
+
},
|
| 1996 |
+
{
|
| 1997 |
+
"id": "S42",
|
| 1998 |
+
"cat": "C09",
|
| 1999 |
+
"pillar": "P3",
|
| 2000 |
+
"name_kr": "์ธ์ง๋ฃจํ ์ง์ฐ",
|
| 2001 |
+
"type": "performance",
|
| 2002 |
+
"ground_truth": {
|
| 2003 |
+
"method": "C09",
|
| 2004 |
+
"metric": "cognitive_latency_ms",
|
| 2005 |
+
"threshold_excellent": 3000,
|
| 2006 |
+
"threshold_good": 5000,
|
| 2007 |
+
"threshold_min": 10000
|
| 2008 |
+
}
|
| 2009 |
+
},
|
| 2010 |
+
{
|
| 2011 |
+
"id": "S43",
|
| 2012 |
+
"cat": "C09",
|
| 2013 |
+
"pillar": "P3",
|
| 2014 |
+
"name_kr": "๋์ผ์คํธ๋ฆผ ์ฑ๋ฅ",
|
| 2015 |
+
"type": "performance",
|
| 2016 |
+
"ground_truth": {
|
| 2017 |
+
"method": "C09",
|
| 2018 |
+
"metric": "dual_stream_fps",
|
| 2019 |
+
"threshold_excellent": 30,
|
| 2020 |
+
"threshold_good": 20,
|
| 2021 |
+
"threshold_min": 10
|
| 2022 |
+
}
|
| 2023 |
+
},
|
| 2024 |
+
{
|
| 2025 |
+
"id": "S44",
|
| 2026 |
+
"cat": "C09",
|
| 2027 |
+
"pillar": "P3",
|
| 2028 |
+
"name_kr": "์คํธ๋ ์ค ํ
์คํธ",
|
| 2029 |
+
"type": "performance",
|
| 2030 |
+
"ground_truth": {
|
| 2031 |
+
"method": "C09",
|
| 2032 |
+
"metric": "frame_drop_rate",
|
| 2033 |
+
"threshold_excellent": 0.01,
|
| 2034 |
+
"threshold_good": 0.05,
|
| 2035 |
+
"threshold_min": 0.1
|
| 2036 |
+
}
|
| 2037 |
+
},
|
| 2038 |
+
{
|
| 2039 |
+
"id": "S45",
|
| 2040 |
+
"cat": "C09",
|
| 2041 |
+
"pillar": "P3",
|
| 2042 |
+
"name_kr": "GPU ๋ฉ๋ชจ๋ฆฌ ์์ ",
|
| 2043 |
+
"type": "performance",
|
| 2044 |
+
"ground_truth": {
|
| 2045 |
+
"method": "C09",
|
| 2046 |
+
"metric": "gpu_memory_stable"
|
| 2047 |
+
}
|
| 2048 |
+
},
|
| 2049 |
+
{
|
| 2050 |
+
"id": "S46",
|
| 2051 |
+
"cat": "C10",
|
| 2052 |
+
"pillar": "P3",
|
| 2053 |
+
"name_kr": "๋๋-์ ์ฒด ๋ถ๋ฆฌ",
|
| 2054 |
+
"type": "transfer",
|
| 2055 |
+
"ground_truth": {
|
| 2056 |
+
"method": "C10",
|
| 2057 |
+
"check": "brain_output_unchanged",
|
| 2058 |
+
"points": 6
|
| 2059 |
+
}
|
| 2060 |
+
},
|
| 2061 |
+
{
|
| 2062 |
+
"id": "S47",
|
| 2063 |
+
"cat": "C10",
|
| 2064 |
+
"pillar": "P3",
|
| 2065 |
+
"name_kr": "๋ชจ์
๋ชจ๋ธ ๊ต์ฒด",
|
| 2066 |
+
"type": "transfer",
|
| 2067 |
+
"ground_truth": {
|
| 2068 |
+
"method": "C10",
|
| 2069 |
+
"check": "motion_model_swapped",
|
| 2070 |
+
"points": 4
|
| 2071 |
+
}
|
| 2072 |
+
},
|
| 2073 |
+
{
|
| 2074 |
+
"id": "S48",
|
| 2075 |
+
"cat": "C10",
|
| 2076 |
+
"pillar": "P3",
|
| 2077 |
+
"name_kr": "๊ด์ ํฌ๋งท ํธํ",
|
| 2078 |
+
"type": "transfer",
|
| 2079 |
+
"ground_truth": {
|
| 2080 |
+
"method": "C10",
|
| 2081 |
+
"check": "joint_format_compatible",
|
| 2082 |
+
"points": 4
|
| 2083 |
+
}
|
| 2084 |
+
},
|
| 2085 |
+
{
|
| 2086 |
+
"id": "S49",
|
| 2087 |
+
"cat": "C10",
|
| 2088 |
+
"pillar": "P3",
|
| 2089 |
+
"name_kr": "ํ๋กฌํํธ ๋ฒ์ฉ์ฑ",
|
| 2090 |
+
"type": "transfer",
|
| 2091 |
+
"ground_truth": {
|
| 2092 |
+
"method": "C10",
|
| 2093 |
+
"check": "intent_preserved",
|
| 2094 |
+
"points": 4
|
| 2095 |
+
}
|
| 2096 |
+
},
|
| 2097 |
+
{
|
| 2098 |
+
"id": "S50",
|
| 2099 |
+
"cat": "C10",
|
| 2100 |
+
"pillar": "P3",
|
| 2101 |
+
"name_kr": "์๋ณด ๋งคํ ์ค๋น",
|
| 2102 |
+
"type": "transfer",
|
| 2103 |
+
"ground_truth": {
|
| 2104 |
+
"method": "C10",
|
| 2105 |
+
"check": "servo_mapping_ready",
|
| 2106 |
+
"points": 2
|
| 2107 |
+
}
|
| 2108 |
+
},
|
| 2109 |
+
{
|
| 2110 |
+
"id": "S51",
|
| 2111 |
+
"cat": "C01",
|
| 2112 |
+
"pillar": "P1",
|
| 2113 |
+
"name_kr": "L์ ๋ณต๋",
|
| 2114 |
+
"type": "single",
|
| 2115 |
+
"input": {
|
| 2116 |
+
"walls": {
|
| 2117 |
+
"left": 1.0,
|
| 2118 |
+
"right": null,
|
| 2119 |
+
"front": null
|
| 2120 |
+
},
|
| 2121 |
+
"ground": "flat",
|
| 2122 |
+
"npc_nearby": false,
|
| 2123 |
+
"npc_type": null,
|
| 2124 |
+
"npc_behavior": null,
|
| 2125 |
+
"npc_distance": null,
|
| 2126 |
+
"npc_direction": null,
|
| 2127 |
+
"sound": null,
|
| 2128 |
+
"recent_decisions": [],
|
| 2129 |
+
"last_prediction": null
|
| 2130 |
+
},
|
| 2131 |
+
"ground_truth": {
|
| 2132 |
+
"method": "C01",
|
| 2133 |
+
"predict_gt": {
|
| 2134 |
+
"left": "danger",
|
| 2135 |
+
"right": "safe",
|
| 2136 |
+
"fwd": "safe",
|
| 2137 |
+
"back": "safe"
|
| 2138 |
+
}
|
| 2139 |
+
}
|
| 2140 |
+
},
|
| 2141 |
+
{
|
| 2142 |
+
"id": "S52",
|
| 2143 |
+
"cat": "C01",
|
| 2144 |
+
"pillar": "P1",
|
| 2145 |
+
"name_kr": "ํ๋ฐฉ๋ง ๋ฒฝ",
|
| 2146 |
+
"type": "single",
|
| 2147 |
+
"input": {
|
| 2148 |
+
"walls": {
|
| 2149 |
+
"left": null,
|
| 2150 |
+
"right": null,
|
| 2151 |
+
"front": null,
|
| 2152 |
+
"back": 2.0
|
| 2153 |
+
},
|
| 2154 |
+
"ground": "flat",
|
| 2155 |
+
"npc_nearby": false,
|
| 2156 |
+
"npc_type": null,
|
| 2157 |
+
"npc_behavior": null,
|
| 2158 |
+
"npc_distance": null,
|
| 2159 |
+
"npc_direction": null,
|
| 2160 |
+
"sound": null,
|
| 2161 |
+
"recent_decisions": [],
|
| 2162 |
+
"last_prediction": null
|
| 2163 |
+
},
|
| 2164 |
+
"ground_truth": {
|
| 2165 |
+
"method": "C01",
|
| 2166 |
+
"predict_gt": {
|
| 2167 |
+
"left": "safe",
|
| 2168 |
+
"right": "safe",
|
| 2169 |
+
"fwd": "safe",
|
| 2170 |
+
"back": "danger"
|
| 2171 |
+
}
|
| 2172 |
+
}
|
| 2173 |
+
},
|
| 2174 |
+
{
|
| 2175 |
+
"id": "S53",
|
| 2176 |
+
"cat": "C01",
|
| 2177 |
+
"pillar": "P1",
|
| 2178 |
+
"name_kr": "๊ทน๊ทผ๊ฑฐ๋ฆฌ ๋ฒฝ(0.5m)",
|
| 2179 |
+
"type": "single",
|
| 2180 |
+
"input": {
|
| 2181 |
+
"walls": {
|
| 2182 |
+
"left": null,
|
| 2183 |
+
"right": 0.5,
|
| 2184 |
+
"front": 0.5
|
| 2185 |
+
},
|
| 2186 |
+
"ground": "flat",
|
| 2187 |
+
"npc_nearby": false,
|
| 2188 |
+
"npc_type": null,
|
| 2189 |
+
"npc_behavior": null,
|
| 2190 |
+
"npc_distance": null,
|
| 2191 |
+
"npc_direction": null,
|
| 2192 |
+
"sound": null,
|
| 2193 |
+
"recent_decisions": [],
|
| 2194 |
+
"last_prediction": null
|
| 2195 |
+
},
|
| 2196 |
+
"ground_truth": {
|
| 2197 |
+
"method": "C01",
|
| 2198 |
+
"predict_gt": {
|
| 2199 |
+
"left": "safe",
|
| 2200 |
+
"right": "danger",
|
| 2201 |
+
"fwd": "danger",
|
| 2202 |
+
"back": "safe"
|
| 2203 |
+
}
|
| 2204 |
+
}
|
| 2205 |
+
},
|
| 2206 |
+
{
|
| 2207 |
+
"id": "S54",
|
| 2208 |
+
"cat": "C01",
|
| 2209 |
+
"pillar": "P1",
|
| 2210 |
+
"name_kr": "๊ฒฝ์ฌ๋ฉด ์ธ์",
|
| 2211 |
+
"type": "single",
|
| 2212 |
+
"input": {
|
| 2213 |
+
"walls": {
|
| 2214 |
+
"left": null,
|
| 2215 |
+
"right": null,
|
| 2216 |
+
"front": null
|
| 2217 |
+
},
|
| 2218 |
+
"ground": "slope",
|
| 2219 |
+
"npc_nearby": false,
|
| 2220 |
+
"npc_type": null,
|
| 2221 |
+
"npc_behavior": null,
|
| 2222 |
+
"npc_distance": null,
|
| 2223 |
+
"npc_direction": null,
|
| 2224 |
+
"sound": null,
|
| 2225 |
+
"recent_decisions": [],
|
| 2226 |
+
"last_prediction": null
|
| 2227 |
+
},
|
| 2228 |
+
"ground_truth": {
|
| 2229 |
+
"method": "C01",
|
| 2230 |
+
"predict_gt": {
|
| 2231 |
+
"left": "safe",
|
| 2232 |
+
"right": "safe",
|
| 2233 |
+
"fwd": "safe",
|
| 2234 |
+
"back": "safe"
|
| 2235 |
+
}
|
| 2236 |
+
}
|
| 2237 |
+
},
|
| 2238 |
+
{
|
| 2239 |
+
"id": "S55",
|
| 2240 |
+
"cat": "C01",
|
| 2241 |
+
"pillar": "P1",
|
| 2242 |
+
"name_kr": "3๋ฉด ๋ฒฝ ์ถ๊ตฌ ์ค๋ฅธ์ชฝ",
|
| 2243 |
+
"type": "single",
|
| 2244 |
+
"input": {
|
| 2245 |
+
"walls": {
|
| 2246 |
+
"left": 1.0,
|
| 2247 |
+
"right": null,
|
| 2248 |
+
"front": 1.5,
|
| 2249 |
+
"back": 2.0
|
| 2250 |
+
},
|
| 2251 |
+
"ground": "flat",
|
| 2252 |
+
"npc_nearby": false,
|
| 2253 |
+
"npc_type": null,
|
| 2254 |
+
"npc_behavior": null,
|
| 2255 |
+
"npc_distance": null,
|
| 2256 |
+
"npc_direction": null,
|
| 2257 |
+
"sound": null,
|
| 2258 |
+
"recent_decisions": [],
|
| 2259 |
+
"last_prediction": null
|
| 2260 |
+
},
|
| 2261 |
+
"ground_truth": {
|
| 2262 |
+
"method": "C01",
|
| 2263 |
+
"predict_gt": {
|
| 2264 |
+
"left": "danger",
|
| 2265 |
+
"right": "safe",
|
| 2266 |
+
"fwd": "danger",
|
| 2267 |
+
"back": "danger"
|
| 2268 |
+
}
|
| 2269 |
+
}
|
| 2270 |
+
},
|
| 2271 |
+
{
|
| 2272 |
+
"id": "S56",
|
| 2273 |
+
"cat": "C02",
|
| 2274 |
+
"pillar": "P1",
|
| 2275 |
+
"name_kr": "๋จ์ฑ ์๋ณ",
|
| 2276 |
+
"type": "single",
|
| 2277 |
+
"input": {
|
| 2278 |
+
"walls": {
|
| 2279 |
+
"left": null,
|
| 2280 |
+
"right": null,
|
| 2281 |
+
"front": null
|
| 2282 |
+
},
|
| 2283 |
+
"ground": "flat",
|
| 2284 |
+
"npc_nearby": true,
|
| 2285 |
+
"npc_type": "man",
|
| 2286 |
+
"npc_behavior": "approach",
|
| 2287 |
+
"npc_distance": 4.0,
|
| 2288 |
+
"npc_direction": "front",
|
| 2289 |
+
"sound": "footsteps",
|
| 2290 |
+
"recent_decisions": [],
|
| 2291 |
+
"last_prediction": null
|
| 2292 |
+
},
|
| 2293 |
+
"ground_truth": {
|
| 2294 |
+
"method": "C02",
|
| 2295 |
+
"entity_type": "man",
|
| 2296 |
+
"entity_direction": "fwd",
|
| 2297 |
+
"is_threat": false
|
| 2298 |
+
}
|
| 2299 |
+
},
|
| 2300 |
+
{
|
| 2301 |
+
"id": "S57",
|
| 2302 |
+
"cat": "C02",
|
| 2303 |
+
"pillar": "P1",
|
| 2304 |
+
"name_kr": "ํ๋ฐฉ ๋งน์ ์๋ฆฌ",
|
| 2305 |
+
"type": "single",
|
| 2306 |
+
"input": {
|
| 2307 |
+
"walls": {
|
| 2308 |
+
"left": null,
|
| 2309 |
+
"right": null,
|
| 2310 |
+
"front": null
|
| 2311 |
+
},
|
| 2312 |
+
"ground": "flat",
|
| 2313 |
+
"npc_nearby": true,
|
| 2314 |
+
"npc_type": "beast",
|
| 2315 |
+
"npc_behavior": "approach",
|
| 2316 |
+
"npc_distance": 5.0,
|
| 2317 |
+
"npc_direction": "back",
|
| 2318 |
+
"sound": "aggressive growling",
|
| 2319 |
+
"recent_decisions": [],
|
| 2320 |
+
"last_prediction": null
|
| 2321 |
+
},
|
| 2322 |
+
"ground_truth": {
|
| 2323 |
+
"method": "C02",
|
| 2324 |
+
"entity_type": "beast",
|
| 2325 |
+
"entity_direction": "back",
|
| 2326 |
+
"is_threat": true
|
| 2327 |
+
}
|
| 2328 |
+
},
|
| 2329 |
+
{
|
| 2330 |
+
"id": "S58",
|
| 2331 |
+
"cat": "C02",
|
| 2332 |
+
"pillar": "P1",
|
| 2333 |
+
"name_kr": "๋์ง ๋งน์ ์๋ณ",
|
| 2334 |
+
"type": "single",
|
| 2335 |
+
"input": {
|
| 2336 |
+
"walls": {
|
| 2337 |
+
"left": null,
|
| 2338 |
+
"right": null,
|
| 2339 |
+
"front": null
|
| 2340 |
+
},
|
| 2341 |
+
"ground": "flat",
|
| 2342 |
+
"npc_nearby": true,
|
| 2343 |
+
"npc_type": "beast",
|
| 2344 |
+
"npc_behavior": "charge",
|
| 2345 |
+
"npc_distance": 2.0,
|
| 2346 |
+
"npc_direction": "front",
|
| 2347 |
+
"sound": "aggressive growling",
|
| 2348 |
+
"recent_decisions": [],
|
| 2349 |
+
"last_prediction": null
|
| 2350 |
+
},
|
| 2351 |
+
"ground_truth": {
|
| 2352 |
+
"method": "C02",
|
| 2353 |
+
"entity_type": "beast",
|
| 2354 |
+
"entity_direction": "fwd",
|
| 2355 |
+
"is_threat": true
|
| 2356 |
+
}
|
| 2357 |
+
},
|
| 2358 |
+
{
|
| 2359 |
+
"id": "S59",
|
| 2360 |
+
"cat": "C02",
|
| 2361 |
+
"pillar": "P1",
|
| 2362 |
+
"name_kr": "์ ์ง ์ฌ์ฑ ๋น์ํ",
|
| 2363 |
+
"type": "single",
|
| 2364 |
+
"input": {
|
| 2365 |
+
"walls": {
|
| 2366 |
+
"left": null,
|
| 2367 |
+
"right": null,
|
| 2368 |
+
"front": null
|
| 2369 |
+
},
|
| 2370 |
+
"ground": "flat",
|
| 2371 |
+
"npc_nearby": true,
|
| 2372 |
+
"npc_type": "woman",
|
| 2373 |
+
"npc_behavior": "stop",
|
| 2374 |
+
"npc_distance": 5.0,
|
| 2375 |
+
"npc_direction": "left",
|
| 2376 |
+
"sound": null,
|
| 2377 |
+
"recent_decisions": [],
|
| 2378 |
+
"last_prediction": null
|
| 2379 |
+
},
|
| 2380 |
+
"ground_truth": {
|
| 2381 |
+
"method": "C02",
|
| 2382 |
+
"entity_type": "woman",
|
| 2383 |
+
"entity_direction": "left",
|
| 2384 |
+
"is_threat": false
|
| 2385 |
+
}
|
| 2386 |
+
},
|
| 2387 |
+
{
|
| 2388 |
+
"id": "S60",
|
| 2389 |
+
"cat": "C02",
|
| 2390 |
+
"pillar": "P1",
|
| 2391 |
+
"name_kr": "๋ฐฐํ ๋งน์ ์๋ณ",
|
| 2392 |
+
"type": "single",
|
| 2393 |
+
"input": {
|
| 2394 |
+
"walls": {
|
| 2395 |
+
"left": null,
|
| 2396 |
+
"right": null,
|
| 2397 |
+
"front": null
|
| 2398 |
+
},
|
| 2399 |
+
"ground": "flat",
|
| 2400 |
+
"npc_nearby": true,
|
| 2401 |
+
"npc_type": "beast",
|
| 2402 |
+
"npc_behavior": "wander",
|
| 2403 |
+
"npc_distance": 6.0,
|
| 2404 |
+
"npc_direction": "right",
|
| 2405 |
+
"sound": null,
|
| 2406 |
+
"recent_decisions": [],
|
| 2407 |
+
"last_prediction": null
|
| 2408 |
+
},
|
| 2409 |
+
"ground_truth": {
|
| 2410 |
+
"method": "C02",
|
| 2411 |
+
"entity_type": "beast",
|
| 2412 |
+
"entity_direction": "right",
|
| 2413 |
+
"is_threat": true
|
| 2414 |
+
}
|
| 2415 |
+
},
|
| 2416 |
+
{
|
| 2417 |
+
"id": "S61",
|
| 2418 |
+
"cat": "C03",
|
| 2419 |
+
"pillar": "P2",
|
| 2420 |
+
"name_kr": "์์ธก๋ฒฝ+์ ๋ฐฉ๋งน์โํ๋ฐฉ",
|
| 2421 |
+
"type": "single",
|
| 2422 |
+
"input": {
|
| 2423 |
+
"walls": {
|
| 2424 |
+
"left": 1.0,
|
| 2425 |
+
"right": 1.0,
|
| 2426 |
+
"front": null
|
| 2427 |
+
},
|
| 2428 |
+
"ground": "flat",
|
| 2429 |
+
"npc_nearby": true,
|
| 2430 |
+
"npc_type": "beast",
|
| 2431 |
+
"npc_behavior": "charge",
|
| 2432 |
+
"npc_distance": 3.0,
|
| 2433 |
+
"npc_direction": "front",
|
| 2434 |
+
"sound": "aggressive growling",
|
| 2435 |
+
"recent_decisions": [],
|
| 2436 |
+
"last_prediction": null
|
| 2437 |
+
},
|
| 2438 |
+
"ground_truth": {
|
| 2439 |
+
"method": "C03",
|
| 2440 |
+
"predict_gt": {
|
| 2441 |
+
"left": "danger",
|
| 2442 |
+
"right": "danger",
|
| 2443 |
+
"fwd": "danger",
|
| 2444 |
+
"back": "safe"
|
| 2445 |
+
},
|
| 2446 |
+
"decision_gt": {
|
| 2447 |
+
"danger_directions": [
|
| 2448 |
+
"fwd",
|
| 2449 |
+
"left",
|
| 2450 |
+
"right"
|
| 2451 |
+
],
|
| 2452 |
+
"safe_directions": [
|
| 2453 |
+
"back"
|
| 2454 |
+
],
|
| 2455 |
+
"optimal_direction": "back"
|
| 2456 |
+
}
|
| 2457 |
+
}
|
| 2458 |
+
},
|
| 2459 |
+
{
|
| 2460 |
+
"id": "S62",
|
| 2461 |
+
"cat": "C03",
|
| 2462 |
+
"pillar": "P2",
|
| 2463 |
+
"name_kr": "๋งน์ ์ข์ธก+๋ฒฝ ์ฐ์ธก",
|
| 2464 |
+
"type": "single",
|
| 2465 |
+
"input": {
|
| 2466 |
+
"walls": {
|
| 2467 |
+
"left": null,
|
| 2468 |
+
"right": 1.5,
|
| 2469 |
+
"front": null
|
| 2470 |
+
},
|
| 2471 |
+
"ground": "flat",
|
| 2472 |
+
"npc_nearby": true,
|
| 2473 |
+
"npc_type": "beast",
|
| 2474 |
+
"npc_behavior": "charge",
|
| 2475 |
+
"npc_distance": 3.0,
|
| 2476 |
+
"npc_direction": "left",
|
| 2477 |
+
"sound": "aggressive growling",
|
| 2478 |
+
"recent_decisions": [],
|
| 2479 |
+
"last_prediction": null
|
| 2480 |
+
},
|
| 2481 |
+
"ground_truth": {
|
| 2482 |
+
"method": "C03",
|
| 2483 |
+
"predict_gt": {
|
| 2484 |
+
"left": "danger",
|
| 2485 |
+
"right": "danger",
|
| 2486 |
+
"fwd": "safe",
|
| 2487 |
+
"back": "safe"
|
| 2488 |
+
},
|
| 2489 |
+
"decision_gt": {
|
| 2490 |
+
"danger_directions": [
|
| 2491 |
+
"left",
|
| 2492 |
+
"right"
|
| 2493 |
+
],
|
| 2494 |
+
"safe_directions": [
|
| 2495 |
+
"fwd",
|
| 2496 |
+
"back"
|
| 2497 |
+
],
|
| 2498 |
+
"optimal_direction": "fwd"
|
| 2499 |
+
}
|
| 2500 |
+
}
|
| 2501 |
+
},
|
| 2502 |
+
{
|
| 2503 |
+
"id": "S63",
|
| 2504 |
+
"cat": "C03",
|
| 2505 |
+
"pillar": "P2",
|
| 2506 |
+
"name_kr": "์ฌ์ฑ ์ ๋ฐฉ+์ด๋ฆฐ๊ณต๊ฐ",
|
| 2507 |
+
"type": "single",
|
| 2508 |
+
"input": {
|
| 2509 |
+
"walls": {
|
| 2510 |
+
"left": null,
|
| 2511 |
+
"right": null,
|
| 2512 |
+
"front": null
|
| 2513 |
+
},
|
| 2514 |
+
"ground": "flat",
|
| 2515 |
+
"npc_nearby": true,
|
| 2516 |
+
"npc_type": "woman",
|
| 2517 |
+
"npc_behavior": "approach",
|
| 2518 |
+
"npc_distance": 3.0,
|
| 2519 |
+
"npc_direction": "front",
|
| 2520 |
+
"sound": "footsteps",
|
| 2521 |
+
"recent_decisions": [],
|
| 2522 |
+
"last_prediction": null
|
| 2523 |
+
},
|
| 2524 |
+
"ground_truth": {
|
| 2525 |
+
"method": "C03",
|
| 2526 |
+
"predict_gt": {
|
| 2527 |
+
"left": "safe",
|
| 2528 |
+
"right": "safe",
|
| 2529 |
+
"fwd": "safe",
|
| 2530 |
+
"back": "safe"
|
| 2531 |
+
},
|
| 2532 |
+
"decision_gt": {
|
| 2533 |
+
"danger_directions": [],
|
| 2534 |
+
"safe_directions": [
|
| 2535 |
+
"left",
|
| 2536 |
+
"right",
|
| 2537 |
+
"fwd",
|
| 2538 |
+
"back"
|
| 2539 |
+
],
|
| 2540 |
+
"optimal_direction": "fwd"
|
| 2541 |
+
},
|
| 2542 |
+
"note": "์ฌ์ฑ์ ์ํ์ด ์๋๋ฏ๋ก ๋ชจ๋ ๋ฐฉํฅ safe ๊ฐ๋ฅ"
|
| 2543 |
+
}
|
| 2544 |
+
},
|
| 2545 |
+
{
|
| 2546 |
+
"id": "S64",
|
| 2547 |
+
"cat": "C03",
|
| 2548 |
+
"pillar": "P2",
|
| 2549 |
+
"name_kr": "๋งน์ ์๊ฑฐ๋ฆฌ(7m) ํ๋จ",
|
| 2550 |
+
"type": "single",
|
| 2551 |
+
"input": {
|
| 2552 |
+
"walls": {
|
| 2553 |
+
"left": null,
|
| 2554 |
+
"right": null,
|
| 2555 |
+
"front": null
|
| 2556 |
+
},
|
| 2557 |
+
"ground": "flat",
|
| 2558 |
+
"npc_nearby": true,
|
| 2559 |
+
"npc_type": "beast",
|
| 2560 |
+
"npc_behavior": "wander",
|
| 2561 |
+
"npc_distance": 7.0,
|
| 2562 |
+
"npc_direction": "front",
|
| 2563 |
+
"sound": null,
|
| 2564 |
+
"recent_decisions": [],
|
| 2565 |
+
"last_prediction": null
|
| 2566 |
+
},
|
| 2567 |
+
"ground_truth": {
|
| 2568 |
+
"method": "C03",
|
| 2569 |
+
"predict_gt": {
|
| 2570 |
+
"left": "safe",
|
| 2571 |
+
"right": "safe",
|
| 2572 |
+
"fwd": "danger",
|
| 2573 |
+
"back": "safe"
|
| 2574 |
+
},
|
| 2575 |
+
"decision_gt": {
|
| 2576 |
+
"danger_directions": [
|
| 2577 |
+
"fwd"
|
| 2578 |
+
],
|
| 2579 |
+
"safe_directions": [
|
| 2580 |
+
"left",
|
| 2581 |
+
"right",
|
| 2582 |
+
"back"
|
| 2583 |
+
],
|
| 2584 |
+
"optimal_direction": "back"
|
| 2585 |
+
}
|
| 2586 |
+
}
|
| 2587 |
+
},
|
| 2588 |
+
{
|
| 2589 |
+
"id": "S65",
|
| 2590 |
+
"cat": "C03",
|
| 2591 |
+
"pillar": "P2",
|
| 2592 |
+
"name_kr": "๋ฒฝ+๋งน์+๊ธฐ์ต ๋ณตํฉ",
|
| 2593 |
+
"type": "single",
|
| 2594 |
+
"input": {
|
| 2595 |
+
"walls": {
|
| 2596 |
+
"left": 1.5,
|
| 2597 |
+
"right": null,
|
| 2598 |
+
"front": null
|
| 2599 |
+
},
|
| 2600 |
+
"ground": "flat",
|
| 2601 |
+
"npc_nearby": true,
|
| 2602 |
+
"npc_type": "beast",
|
| 2603 |
+
"npc_behavior": "charge",
|
| 2604 |
+
"npc_distance": 3.0,
|
| 2605 |
+
"npc_direction": "front",
|
| 2606 |
+
"sound": "aggressive growling",
|
| 2607 |
+
"recent_decisions": [
|
| 2608 |
+
"previously went right and escaped",
|
| 2609 |
+
"right was safe last time"
|
| 2610 |
+
],
|
| 2611 |
+
"last_prediction": "left=danger(wall), fwd=danger(beast)"
|
| 2612 |
+
},
|
| 2613 |
+
"ground_truth": {
|
| 2614 |
+
"method": "C03",
|
| 2615 |
+
"predict_gt": {
|
| 2616 |
+
"left": "danger",
|
| 2617 |
+
"right": "safe",
|
| 2618 |
+
"fwd": "danger",
|
| 2619 |
+
"back": "safe"
|
| 2620 |
+
},
|
| 2621 |
+
"decision_gt": {
|
| 2622 |
+
"danger_directions": [
|
| 2623 |
+
"fwd",
|
| 2624 |
+
"left"
|
| 2625 |
+
],
|
| 2626 |
+
"safe_directions": [
|
| 2627 |
+
"right",
|
| 2628 |
+
"back"
|
| 2629 |
+
],
|
| 2630 |
+
"optimal_direction": "right"
|
| 2631 |
+
},
|
| 2632 |
+
"note": "๊ธฐ์ต์ด right๋ฅผ ๊ฐํ"
|
| 2633 |
+
}
|
| 2634 |
+
},
|
| 2635 |
+
{
|
| 2636 |
+
"id": "S66",
|
| 2637 |
+
"cat": "C05",
|
| 2638 |
+
"pillar": "P2",
|
| 2639 |
+
"name_kr": "์ ๊ทผโ์ ์ง ์ง์ ",
|
| 2640 |
+
"type": "sequence",
|
| 2641 |
+
"input_sequence": [
|
| 2642 |
+
{
|
| 2643 |
+
"walls": {
|
| 2644 |
+
"left": null,
|
| 2645 |
+
"right": null,
|
| 2646 |
+
"front": null
|
| 2647 |
+
},
|
| 2648 |
+
"ground": "flat",
|
| 2649 |
+
"npc_nearby": true,
|
| 2650 |
+
"npc_type": "beast",
|
| 2651 |
+
"npc_behavior": "approach",
|
| 2652 |
+
"npc_distance": 4.0,
|
| 2653 |
+
"npc_direction": "front",
|
| 2654 |
+
"sound": "aggressive growling",
|
| 2655 |
+
"recent_decisions": [],
|
| 2656 |
+
"last_prediction": null
|
| 2657 |
+
},
|
| 2658 |
+
{
|
| 2659 |
+
"walls": {
|
| 2660 |
+
"left": null,
|
| 2661 |
+
"right": null,
|
| 2662 |
+
"front": null
|
| 2663 |
+
},
|
| 2664 |
+
"ground": "flat",
|
| 2665 |
+
"npc_nearby": true,
|
| 2666 |
+
"npc_type": "beast",
|
| 2667 |
+
"npc_behavior": "stop",
|
| 2668 |
+
"npc_distance": 4.0,
|
| 2669 |
+
"npc_direction": "front",
|
| 2670 |
+
"sound": null,
|
| 2671 |
+
"recent_decisions": [
|
| 2672 |
+
"stepped back cautiously"
|
| 2673 |
+
],
|
| 2674 |
+
"last_prediction": "fwd=danger(beast)"
|
| 2675 |
+
},
|
| 2676 |
+
{
|
| 2677 |
+
"walls": {
|
| 2678 |
+
"left": null,
|
| 2679 |
+
"right": null,
|
| 2680 |
+
"front": null
|
| 2681 |
+
},
|
| 2682 |
+
"ground": "flat",
|
| 2683 |
+
"npc_nearby": true,
|
| 2684 |
+
"npc_type": "beast",
|
| 2685 |
+
"npc_behavior": "wander",
|
| 2686 |
+
"npc_distance": 6.0,
|
| 2687 |
+
"npc_direction": "front",
|
| 2688 |
+
"sound": null,
|
| 2689 |
+
"recent_decisions": [
|
| 2690 |
+
"stepped back cautiously",
|
| 2691 |
+
"watching carefully"
|
| 2692 |
+
],
|
| 2693 |
+
"last_prediction": "fwd=danger(beast)"
|
| 2694 |
+
}
|
| 2695 |
+
],
|
| 2696 |
+
"ground_truth": {
|
| 2697 |
+
"method": "C05",
|
| 2698 |
+
"expected_trend": "decreasing"
|
| 2699 |
+
}
|
| 2700 |
+
},
|
| 2701 |
+
{
|
| 2702 |
+
"id": "S67",
|
| 2703 |
+
"cat": "C05",
|
| 2704 |
+
"pillar": "P2",
|
| 2705 |
+
"name_kr": "5๋จ๊ณ ์ฅ๊ธฐ ๊ฒฉํ",
|
| 2706 |
+
"type": "sequence",
|
| 2707 |
+
"input_sequence": [
|
| 2708 |
+
{
|
| 2709 |
+
"walls": {
|
| 2710 |
+
"left": null,
|
| 2711 |
+
"right": null,
|
| 2712 |
+
"front": null
|
| 2713 |
+
},
|
| 2714 |
+
"ground": "flat",
|
| 2715 |
+
"npc_nearby": true,
|
| 2716 |
+
"npc_type": "beast",
|
| 2717 |
+
"npc_behavior": "approach",
|
| 2718 |
+
"npc_distance": 6.0,
|
| 2719 |
+
"npc_direction": "front",
|
| 2720 |
+
"sound": null,
|
| 2721 |
+
"recent_decisions": [],
|
| 2722 |
+
"last_prediction": null
|
| 2723 |
+
},
|
| 2724 |
+
{
|
| 2725 |
+
"walls": {
|
| 2726 |
+
"left": null,
|
| 2727 |
+
"right": null,
|
| 2728 |
+
"front": null
|
| 2729 |
+
},
|
| 2730 |
+
"ground": "flat",
|
| 2731 |
+
"npc_nearby": true,
|
| 2732 |
+
"npc_type": "beast",
|
| 2733 |
+
"npc_behavior": "approach",
|
| 2734 |
+
"npc_distance": 5.0,
|
| 2735 |
+
"npc_direction": "front",
|
| 2736 |
+
"sound": "aggressive growling",
|
| 2737 |
+
"recent_decisions": [
|
| 2738 |
+
"noticed beast"
|
| 2739 |
+
],
|
| 2740 |
+
"last_prediction": "fwd=danger(beast)"
|
| 2741 |
+
},
|
| 2742 |
+
{
|
| 2743 |
+
"walls": {
|
| 2744 |
+
"left": null,
|
| 2745 |
+
"right": null,
|
| 2746 |
+
"front": null
|
| 2747 |
+
},
|
| 2748 |
+
"ground": "flat",
|
| 2749 |
+
"npc_nearby": true,
|
| 2750 |
+
"npc_type": "beast",
|
| 2751 |
+
"npc_behavior": "charge",
|
| 2752 |
+
"npc_distance": 4.0,
|
| 2753 |
+
"npc_direction": "front",
|
| 2754 |
+
"sound": "aggressive growling",
|
| 2755 |
+
"recent_decisions": [
|
| 2756 |
+
"noticed beast",
|
| 2757 |
+
"stepping back"
|
| 2758 |
+
],
|
| 2759 |
+
"last_prediction": "fwd=danger(beast)"
|
| 2760 |
+
},
|
| 2761 |
+
{
|
| 2762 |
+
"walls": {
|
| 2763 |
+
"left": null,
|
| 2764 |
+
"right": null,
|
| 2765 |
+
"front": null
|
| 2766 |
+
},
|
| 2767 |
+
"ground": "flat",
|
| 2768 |
+
"npc_nearby": true,
|
| 2769 |
+
"npc_type": "beast",
|
| 2770 |
+
"npc_behavior": "charge",
|
| 2771 |
+
"npc_distance": 3.0,
|
| 2772 |
+
"npc_direction": "front",
|
| 2773 |
+
"sound": "aggressive growling",
|
| 2774 |
+
"recent_decisions": [
|
| 2775 |
+
"stepping back",
|
| 2776 |
+
"running away"
|
| 2777 |
+
],
|
| 2778 |
+
"last_prediction": "fwd=danger(beast)"
|
| 2779 |
+
},
|
| 2780 |
+
{
|
| 2781 |
+
"walls": {
|
| 2782 |
+
"left": null,
|
| 2783 |
+
"right": null,
|
| 2784 |
+
"front": null
|
| 2785 |
+
},
|
| 2786 |
+
"ground": "flat",
|
| 2787 |
+
"npc_nearby": true,
|
| 2788 |
+
"npc_type": "beast",
|
| 2789 |
+
"npc_behavior": "charge",
|
| 2790 |
+
"npc_distance": 2.0,
|
| 2791 |
+
"npc_direction": "front",
|
| 2792 |
+
"sound": "aggressive growling",
|
| 2793 |
+
"recent_decisions": [
|
| 2794 |
+
"running away",
|
| 2795 |
+
"sprinting in fear"
|
| 2796 |
+
],
|
| 2797 |
+
"last_prediction": "fwd=danger(beast)"
|
| 2798 |
+
}
|
| 2799 |
+
],
|
| 2800 |
+
"ground_truth": {
|
| 2801 |
+
"method": "C05",
|
| 2802 |
+
"expected_trend": "increasing"
|
| 2803 |
+
}
|
| 2804 |
+
},
|
| 2805 |
+
{
|
| 2806 |
+
"id": "S68",
|
| 2807 |
+
"cat": "C05",
|
| 2808 |
+
"pillar": "P2",
|
| 2809 |
+
"name_kr": "์ฌ์ฑ ์ ๊ทผ ์์ ์ ์ง",
|
| 2810 |
+
"type": "sequence",
|
| 2811 |
+
"input_sequence": [
|
| 2812 |
+
{
|
| 2813 |
+
"walls": {
|
| 2814 |
+
"left": null,
|
| 2815 |
+
"right": null,
|
| 2816 |
+
"front": null
|
| 2817 |
+
},
|
| 2818 |
+
"ground": "flat",
|
| 2819 |
+
"npc_nearby": true,
|
| 2820 |
+
"npc_type": "woman",
|
| 2821 |
+
"npc_behavior": "approach",
|
| 2822 |
+
"npc_distance": 5.0,
|
| 2823 |
+
"npc_direction": "front",
|
| 2824 |
+
"sound": "footsteps",
|
| 2825 |
+
"recent_decisions": [],
|
| 2826 |
+
"last_prediction": null
|
| 2827 |
+
},
|
| 2828 |
+
{
|
| 2829 |
+
"walls": {
|
| 2830 |
+
"left": null,
|
| 2831 |
+
"right": null,
|
| 2832 |
+
"front": null
|
| 2833 |
+
},
|
| 2834 |
+
"ground": "flat",
|
| 2835 |
+
"npc_nearby": true,
|
| 2836 |
+
"npc_type": "woman",
|
| 2837 |
+
"npc_behavior": "approach",
|
| 2838 |
+
"npc_distance": 3.0,
|
| 2839 |
+
"npc_direction": "front",
|
| 2840 |
+
"sound": "footsteps",
|
| 2841 |
+
"recent_decisions": [
|
| 2842 |
+
"stepped aside"
|
| 2843 |
+
],
|
| 2844 |
+
"last_prediction": "fwd=safe"
|
| 2845 |
+
}
|
| 2846 |
+
],
|
| 2847 |
+
"ground_truth": {
|
| 2848 |
+
"method": "C05",
|
| 2849 |
+
"expected_trend": "stable"
|
| 2850 |
+
}
|
| 2851 |
+
},
|
| 2852 |
+
{
|
| 2853 |
+
"id": "S69",
|
| 2854 |
+
"cat": "C05",
|
| 2855 |
+
"pillar": "P2",
|
| 2856 |
+
"name_kr": "๋งน์โํด์ โ์ฌ์ถํ",
|
| 2857 |
+
"type": "sequence",
|
| 2858 |
+
"input_sequence": [
|
| 2859 |
+
{
|
| 2860 |
+
"walls": {
|
| 2861 |
+
"left": null,
|
| 2862 |
+
"right": null,
|
| 2863 |
+
"front": null
|
| 2864 |
+
},
|
| 2865 |
+
"ground": "flat",
|
| 2866 |
+
"npc_nearby": true,
|
| 2867 |
+
"npc_type": "beast",
|
| 2868 |
+
"npc_behavior": "charge",
|
| 2869 |
+
"npc_distance": 3.0,
|
| 2870 |
+
"npc_direction": "front",
|
| 2871 |
+
"sound": "aggressive growling",
|
| 2872 |
+
"recent_decisions": [],
|
| 2873 |
+
"last_prediction": null
|
| 2874 |
+
},
|
| 2875 |
+
{
|
| 2876 |
+
"walls": {
|
| 2877 |
+
"left": null,
|
| 2878 |
+
"right": null,
|
| 2879 |
+
"front": null
|
| 2880 |
+
},
|
| 2881 |
+
"ground": "flat",
|
| 2882 |
+
"npc_nearby": false,
|
| 2883 |
+
"npc_type": null,
|
| 2884 |
+
"npc_behavior": null,
|
| 2885 |
+
"npc_distance": null,
|
| 2886 |
+
"npc_direction": null,
|
| 2887 |
+
"sound": null,
|
| 2888 |
+
"recent_decisions": [
|
| 2889 |
+
"fled from beast"
|
| 2890 |
+
],
|
| 2891 |
+
"last_prediction": "all=safe"
|
| 2892 |
+
},
|
| 2893 |
+
{
|
| 2894 |
+
"walls": {
|
| 2895 |
+
"left": null,
|
| 2896 |
+
"right": null,
|
| 2897 |
+
"front": null
|
| 2898 |
+
},
|
| 2899 |
+
"ground": "flat",
|
| 2900 |
+
"npc_nearby": true,
|
| 2901 |
+
"npc_type": "beast",
|
| 2902 |
+
"npc_behavior": "charge",
|
| 2903 |
+
"npc_distance": 4.0,
|
| 2904 |
+
"npc_direction": "front",
|
| 2905 |
+
"sound": "aggressive growling",
|
| 2906 |
+
"recent_decisions": [
|
| 2907 |
+
"fled from beast",
|
| 2908 |
+
"was calming down"
|
| 2909 |
+
],
|
| 2910 |
+
"last_prediction": "all=safe"
|
| 2911 |
+
}
|
| 2912 |
+
],
|
| 2913 |
+
"ground_truth": {
|
| 2914 |
+
"method": "C05",
|
| 2915 |
+
"expected_trend": "increasing",
|
| 2916 |
+
"note": "ํด์ ํ ์ฌ์ถํ โ ๋ง์ง๋ง์ด ์ฒ์๋ณด๋ค ๋์์ผ"
|
| 2917 |
+
}
|
| 2918 |
+
},
|
| 2919 |
+
{
|
| 2920 |
+
"id": "S70",
|
| 2921 |
+
"cat": "C05",
|
| 2922 |
+
"pillar": "P2",
|
| 2923 |
+
"name_kr": "๋ฒฝ ๋ฐ๋ณต ์ ๊ทผ ์์ ",
|
| 2924 |
+
"type": "sequence",
|
| 2925 |
+
"input_sequence": [
|
| 2926 |
+
{
|
| 2927 |
+
"walls": {
|
| 2928 |
+
"left": null,
|
| 2929 |
+
"right": null,
|
| 2930 |
+
"front": 2.0
|
| 2931 |
+
},
|
| 2932 |
+
"ground": "flat",
|
| 2933 |
+
"npc_nearby": false,
|
| 2934 |
+
"npc_type": null,
|
| 2935 |
+
"npc_behavior": null,
|
| 2936 |
+
"npc_distance": null,
|
| 2937 |
+
"npc_direction": null,
|
| 2938 |
+
"sound": null,
|
| 2939 |
+
"recent_decisions": [],
|
| 2940 |
+
"last_prediction": null
|
| 2941 |
+
},
|
| 2942 |
+
{
|
| 2943 |
+
"walls": {
|
| 2944 |
+
"left": null,
|
| 2945 |
+
"right": null,
|
| 2946 |
+
"front": 1.5
|
| 2947 |
+
},
|
| 2948 |
+
"ground": "flat",
|
| 2949 |
+
"npc_nearby": false,
|
| 2950 |
+
"npc_type": null,
|
| 2951 |
+
"npc_behavior": null,
|
| 2952 |
+
"npc_distance": null,
|
| 2953 |
+
"npc_direction": null,
|
| 2954 |
+
"sound": null,
|
| 2955 |
+
"recent_decisions": [
|
| 2956 |
+
"turned away from wall"
|
| 2957 |
+
],
|
| 2958 |
+
"last_prediction": "fwd=danger(wall)"
|
| 2959 |
+
},
|
| 2960 |
+
{
|
| 2961 |
+
"walls": {
|
| 2962 |
+
"left": null,
|
| 2963 |
+
"right": null,
|
| 2964 |
+
"front": 2.0
|
| 2965 |
+
},
|
| 2966 |
+
"ground": "flat",
|
| 2967 |
+
"npc_nearby": false,
|
| 2968 |
+
"npc_type": null,
|
| 2969 |
+
"npc_behavior": null,
|
| 2970 |
+
"npc_distance": null,
|
| 2971 |
+
"npc_direction": null,
|
| 2972 |
+
"sound": null,
|
| 2973 |
+
"recent_decisions": [
|
| 2974 |
+
"turned away from wall",
|
| 2975 |
+
"walking along wall"
|
| 2976 |
+
],
|
| 2977 |
+
"last_prediction": "fwd=danger(wall)"
|
| 2978 |
+
}
|
| 2979 |
+
],
|
| 2980 |
+
"ground_truth": {
|
| 2981 |
+
"method": "C05",
|
| 2982 |
+
"expected_trend": "stable",
|
| 2983 |
+
"note": "๋ฒฝ์ ๊ฐ์ ๊ฒฉํ ๋์ ์๋"
|
| 2984 |
+
}
|
| 2985 |
+
},
|
| 2986 |
+
{
|
| 2987 |
+
"id": "S71",
|
| 2988 |
+
"cat": "C07",
|
| 2989 |
+
"pillar": "P2",
|
| 2990 |
+
"name_kr": "๋์งโ์ ์งโ๋ฐฐํโ์๋ฉธ",
|
| 2991 |
+
"type": "sequence",
|
| 2992 |
+
"input_sequence": [
|
| 2993 |
+
{
|
| 2994 |
+
"walls": {
|
| 2995 |
+
"left": null,
|
| 2996 |
+
"right": null,
|
| 2997 |
+
"front": null
|
| 2998 |
+
},
|
| 2999 |
+
"ground": "flat",
|
| 3000 |
+
"npc_nearby": true,
|
| 3001 |
+
"npc_type": "beast",
|
| 3002 |
+
"npc_behavior": "charge",
|
| 3003 |
+
"npc_distance": 2.0,
|
| 3004 |
+
"npc_direction": "front",
|
| 3005 |
+
"sound": "aggressive growling",
|
| 3006 |
+
"recent_decisions": [],
|
| 3007 |
+
"last_prediction": "fwd=danger(beast)"
|
| 3008 |
+
},
|
| 3009 |
+
{
|
| 3010 |
+
"walls": {
|
| 3011 |
+
"left": null,
|
| 3012 |
+
"right": null,
|
| 3013 |
+
"front": null
|
| 3014 |
+
},
|
| 3015 |
+
"ground": "flat",
|
| 3016 |
+
"npc_nearby": true,
|
| 3017 |
+
"npc_type": "beast",
|
| 3018 |
+
"npc_behavior": "stop",
|
| 3019 |
+
"npc_distance": 5.0,
|
| 3020 |
+
"npc_direction": "front",
|
| 3021 |
+
"sound": null,
|
| 3022 |
+
"recent_decisions": [
|
| 3023 |
+
"sprinted away in terror"
|
| 3024 |
+
],
|
| 3025 |
+
"last_prediction": "fwd=danger(beast)"
|
| 3026 |
+
},
|
| 3027 |
+
{
|
| 3028 |
+
"walls": {
|
| 3029 |
+
"left": null,
|
| 3030 |
+
"right": null,
|
| 3031 |
+
"front": null
|
| 3032 |
+
},
|
| 3033 |
+
"ground": "flat",
|
| 3034 |
+
"npc_nearby": true,
|
| 3035 |
+
"npc_type": "beast",
|
| 3036 |
+
"npc_behavior": "wander",
|
| 3037 |
+
"npc_distance": 7.0,
|
| 3038 |
+
"npc_direction": "front",
|
| 3039 |
+
"sound": null,
|
| 3040 |
+
"recent_decisions": [
|
| 3041 |
+
"sprinted away",
|
| 3042 |
+
"beast stopped"
|
| 3043 |
+
],
|
| 3044 |
+
"last_prediction": "fwd=danger(beast)"
|
| 3045 |
+
},
|
| 3046 |
+
{
|
| 3047 |
+
"walls": {
|
| 3048 |
+
"left": null,
|
| 3049 |
+
"right": null,
|
| 3050 |
+
"front": null
|
| 3051 |
+
},
|
| 3052 |
+
"ground": "flat",
|
| 3053 |
+
"npc_nearby": false,
|
| 3054 |
+
"npc_type": null,
|
| 3055 |
+
"npc_behavior": null,
|
| 3056 |
+
"npc_distance": null,
|
| 3057 |
+
"npc_direction": null,
|
| 3058 |
+
"sound": null,
|
| 3059 |
+
"recent_decisions": [
|
| 3060 |
+
"beast stopped",
|
| 3061 |
+
"beast wandering away"
|
| 3062 |
+
],
|
| 3063 |
+
"last_prediction": "all=safe"
|
| 3064 |
+
}
|
| 3065 |
+
],
|
| 3066 |
+
"ground_truth": {
|
| 3067 |
+
"method": "C07",
|
| 3068 |
+
"expected_recovery": "gradual"
|
| 3069 |
+
}
|
| 3070 |
+
},
|
| 3071 |
+
{
|
| 3072 |
+
"id": "S72",
|
| 3073 |
+
"cat": "C07",
|
| 3074 |
+
"pillar": "P2",
|
| 3075 |
+
"name_kr": "ํด์ ํ ์ฆ์ ๋ฒฝ",
|
| 3076 |
+
"type": "sequence",
|
| 3077 |
+
"input_sequence": [
|
| 3078 |
+
{
|
| 3079 |
+
"walls": {
|
| 3080 |
+
"left": null,
|
| 3081 |
+
"right": null,
|
| 3082 |
+
"front": null
|
| 3083 |
+
},
|
| 3084 |
+
"ground": "flat",
|
| 3085 |
+
"npc_nearby": true,
|
| 3086 |
+
"npc_type": "beast",
|
| 3087 |
+
"npc_behavior": "charge",
|
| 3088 |
+
"npc_distance": 2.0,
|
| 3089 |
+
"npc_direction": "front",
|
| 3090 |
+
"sound": "aggressive growling",
|
| 3091 |
+
"recent_decisions": [],
|
| 3092 |
+
"last_prediction": "fwd=danger(beast)"
|
| 3093 |
+
},
|
| 3094 |
+
{
|
| 3095 |
+
"walls": {
|
| 3096 |
+
"left": null,
|
| 3097 |
+
"right": null,
|
| 3098 |
+
"front": 1.0
|
| 3099 |
+
},
|
| 3100 |
+
"ground": "flat",
|
| 3101 |
+
"npc_nearby": false,
|
| 3102 |
+
"npc_type": null,
|
| 3103 |
+
"npc_behavior": null,
|
| 3104 |
+
"npc_distance": null,
|
| 3105 |
+
"npc_direction": null,
|
| 3106 |
+
"sound": null,
|
| 3107 |
+
"recent_decisions": [
|
| 3108 |
+
"fled from beast"
|
| 3109 |
+
],
|
| 3110 |
+
"last_prediction": "fwd=danger(wall)"
|
| 3111 |
+
}
|
| 3112 |
+
],
|
| 3113 |
+
"ground_truth": {
|
| 3114 |
+
"method": "C07",
|
| 3115 |
+
"expected_recovery": "gradual",
|
| 3116 |
+
"note": "๊ณตํฌ์์ ์ผ๋ฐ ์ฅ์ ๋ฌผ ํํผ๋ก ์ฆ์ ์ ํ๋์ด์ผ"
|
| 3117 |
+
}
|
| 3118 |
+
},
|
| 3119 |
+
{
|
| 3120 |
+
"id": "S73",
|
| 3121 |
+
"cat": "C07",
|
| 3122 |
+
"pillar": "P2",
|
| 3123 |
+
"name_kr": "์ฌ์ฑ ํด์ ํ",
|
| 3124 |
+
"type": "sequence",
|
| 3125 |
+
"input_sequence": [
|
| 3126 |
+
{
|
| 3127 |
+
"walls": {
|
| 3128 |
+
"left": null,
|
| 3129 |
+
"right": null,
|
| 3130 |
+
"front": null
|
| 3131 |
+
},
|
| 3132 |
+
"ground": "flat",
|
| 3133 |
+
"npc_nearby": true,
|
| 3134 |
+
"npc_type": "woman",
|
| 3135 |
+
"npc_behavior": "approach",
|
| 3136 |
+
"npc_distance": 2.0,
|
| 3137 |
+
"npc_direction": "front",
|
| 3138 |
+
"sound": "footsteps",
|
| 3139 |
+
"recent_decisions": [],
|
| 3140 |
+
"last_prediction": null
|
| 3141 |
+
},
|
| 3142 |
+
{
|
| 3143 |
+
"walls": {
|
| 3144 |
+
"left": null,
|
| 3145 |
+
"right": null,
|
| 3146 |
+
"front": null
|
| 3147 |
+
},
|
| 3148 |
+
"ground": "flat",
|
| 3149 |
+
"npc_nearby": false,
|
| 3150 |
+
"npc_type": null,
|
| 3151 |
+
"npc_behavior": null,
|
| 3152 |
+
"npc_distance": null,
|
| 3153 |
+
"npc_direction": null,
|
| 3154 |
+
"sound": null,
|
| 3155 |
+
"recent_decisions": [
|
| 3156 |
+
"stepped aside for woman"
|
| 3157 |
+
],
|
| 3158 |
+
"last_prediction": "all=safe"
|
| 3159 |
+
}
|
| 3160 |
+
],
|
| 3161 |
+
"ground_truth": {
|
| 3162 |
+
"method": "C07",
|
| 3163 |
+
"expected_recovery": "gradual",
|
| 3164 |
+
"note": "์ฌ์ฑ์ ๋ฎ์ ์ํ โ ๊ฑฐ์ ์ฆ์ ์ ์ํ"
|
| 3165 |
+
}
|
| 3166 |
+
},
|
| 3167 |
+
{
|
| 3168 |
+
"id": "S74",
|
| 3169 |
+
"cat": "C07",
|
| 3170 |
+
"pillar": "P2",
|
| 3171 |
+
"name_kr": "๋ฐ๋ณต ์ํ ํด์ 3ํ",
|
| 3172 |
+
"type": "sequence",
|
| 3173 |
+
"input_sequence": [
|
| 3174 |
+
{
|
| 3175 |
+
"walls": {
|
| 3176 |
+
"left": null,
|
| 3177 |
+
"right": null,
|
| 3178 |
+
"front": null
|
| 3179 |
+
},
|
| 3180 |
+
"ground": "flat",
|
| 3181 |
+
"npc_nearby": true,
|
| 3182 |
+
"npc_type": "beast",
|
| 3183 |
+
"npc_behavior": "charge",
|
| 3184 |
+
"npc_distance": 3.0,
|
| 3185 |
+
"npc_direction": "front",
|
| 3186 |
+
"sound": "aggressive growling",
|
| 3187 |
+
"recent_decisions": [
|
| 3188 |
+
"this is the third beast encounter",
|
| 3189 |
+
"previous two were terrifying"
|
| 3190 |
+
],
|
| 3191 |
+
"last_prediction": "fwd=danger(beast)"
|
| 3192 |
+
},
|
| 3193 |
+
{
|
| 3194 |
+
"walls": {
|
| 3195 |
+
"left": null,
|
| 3196 |
+
"right": null,
|
| 3197 |
+
"front": null
|
| 3198 |
+
},
|
| 3199 |
+
"ground": "flat",
|
| 3200 |
+
"npc_nearby": false,
|
| 3201 |
+
"npc_type": null,
|
| 3202 |
+
"npc_behavior": null,
|
| 3203 |
+
"npc_distance": null,
|
| 3204 |
+
"npc_direction": null,
|
| 3205 |
+
"sound": null,
|
| 3206 |
+
"recent_decisions": [
|
| 3207 |
+
"third beast fled",
|
| 3208 |
+
"exhausted from running"
|
| 3209 |
+
],
|
| 3210 |
+
"last_prediction": "all=safe"
|
| 3211 |
+
},
|
| 3212 |
+
{
|
| 3213 |
+
"walls": {
|
| 3214 |
+
"left": null,
|
| 3215 |
+
"right": null,
|
| 3216 |
+
"front": null
|
| 3217 |
+
},
|
| 3218 |
+
"ground": "flat",
|
| 3219 |
+
"npc_nearby": false,
|
| 3220 |
+
"npc_type": null,
|
| 3221 |
+
"npc_behavior": null,
|
| 3222 |
+
"npc_distance": null,
|
| 3223 |
+
"npc_direction": null,
|
| 3224 |
+
"sound": null,
|
| 3225 |
+
"recent_decisions": [
|
| 3226 |
+
"exhausted from running",
|
| 3227 |
+
"trying to calm down"
|
| 3228 |
+
],
|
| 3229 |
+
"last_prediction": "all=safe"
|
| 3230 |
+
}
|
| 3231 |
+
],
|
| 3232 |
+
"ground_truth": {
|
| 3233 |
+
"method": "C07",
|
| 3234 |
+
"expected_recovery": "gradual",
|
| 3235 |
+
"note": "3๋ฒ์งธ ๊ฒฝํ ํ โ ๋ ๋์ ๊ฒฝ๊ณ ์์ค์์ ์ ์ํ"
|
| 3236 |
+
}
|
| 3237 |
+
},
|
| 3238 |
+
{
|
| 3239 |
+
"id": "S75",
|
| 3240 |
+
"cat": "C07",
|
| 3241 |
+
"pillar": "P2",
|
| 3242 |
+
"name_kr": "ํด์ ํ ์ด๋ฆฐ๊ณต๊ฐ ํ๋ณต",
|
| 3243 |
+
"type": "sequence",
|
| 3244 |
+
"input_sequence": [
|
| 3245 |
+
{
|
| 3246 |
+
"walls": {
|
| 3247 |
+
"left": 1.0,
|
| 3248 |
+
"right": 1.0,
|
| 3249 |
+
"front": null
|
| 3250 |
+
},
|
| 3251 |
+
"ground": "flat",
|
| 3252 |
+
"npc_nearby": true,
|
| 3253 |
+
"npc_type": "beast",
|
| 3254 |
+
"npc_behavior": "charge",
|
| 3255 |
+
"npc_distance": 3.0,
|
| 3256 |
+
"npc_direction": "front",
|
| 3257 |
+
"sound": "aggressive growling",
|
| 3258 |
+
"recent_decisions": [],
|
| 3259 |
+
"last_prediction": "fwd=danger(beast)"
|
| 3260 |
+
},
|
| 3261 |
+
{
|
| 3262 |
+
"walls": {
|
| 3263 |
+
"left": null,
|
| 3264 |
+
"right": null,
|
| 3265 |
+
"front": null
|
| 3266 |
+
},
|
| 3267 |
+
"ground": "flat",
|
| 3268 |
+
"npc_nearby": false,
|
| 3269 |
+
"npc_type": null,
|
| 3270 |
+
"npc_behavior": null,
|
| 3271 |
+
"npc_distance": null,
|
| 3272 |
+
"npc_direction": null,
|
| 3273 |
+
"sound": null,
|
| 3274 |
+
"recent_decisions": [
|
| 3275 |
+
"escaped through narrow corridor"
|
| 3276 |
+
],
|
| 3277 |
+
"last_prediction": "all=safe"
|
| 3278 |
+
},
|
| 3279 |
+
{
|
| 3280 |
+
"walls": {
|
| 3281 |
+
"left": null,
|
| 3282 |
+
"right": null,
|
| 3283 |
+
"front": null
|
| 3284 |
+
},
|
| 3285 |
+
"ground": "flat",
|
| 3286 |
+
"npc_nearby": false,
|
| 3287 |
+
"npc_type": null,
|
| 3288 |
+
"npc_behavior": null,
|
| 3289 |
+
"npc_distance": null,
|
| 3290 |
+
"npc_direction": null,
|
| 3291 |
+
"sound": null,
|
| 3292 |
+
"recent_decisions": [
|
| 3293 |
+
"escaped",
|
| 3294 |
+
"reached open space"
|
| 3295 |
+
],
|
| 3296 |
+
"last_prediction": "all=safe"
|
| 3297 |
+
}
|
| 3298 |
+
],
|
| 3299 |
+
"ground_truth": {
|
| 3300 |
+
"method": "C07",
|
| 3301 |
+
"expected_recovery": "gradual",
|
| 3302 |
+
"note": "์ข์ ๊ณณ์์ ๋ฒ์ด๋๋ฉด ๋ ๋น ๋ฅธ ํ๋ณต"
|
| 3303 |
+
}
|
| 3304 |
+
},
|
| 3305 |
+
{
|
| 3306 |
+
"id": "S76",
|
| 3307 |
+
"cat": "C08",
|
| 3308 |
+
"pillar": "P3",
|
| 3309 |
+
"name_kr": "๊ทนํ ๊ณตํฌ(2m ๋์ง)",
|
| 3310 |
+
"type": "single",
|
| 3311 |
+
"input": {
|
| 3312 |
+
"walls": {
|
| 3313 |
+
"left": 1.0,
|
| 3314 |
+
"right": 1.0,
|
| 3315 |
+
"front": null
|
| 3316 |
+
},
|
| 3317 |
+
"ground": "flat",
|
| 3318 |
+
"npc_nearby": true,
|
| 3319 |
+
"npc_type": "beast",
|
| 3320 |
+
"npc_behavior": "charge",
|
| 3321 |
+
"npc_distance": 2.0,
|
| 3322 |
+
"npc_direction": "front",
|
| 3323 |
+
"sound": "aggressive growling",
|
| 3324 |
+
"recent_decisions": [
|
| 3325 |
+
"trapped in corridor",
|
| 3326 |
+
"beast is closing in"
|
| 3327 |
+
],
|
| 3328 |
+
"last_prediction": "fwd=danger(beast), left=danger(wall), right=danger(wall)"
|
| 3329 |
+
},
|
| 3330 |
+
"ground_truth": {
|
| 3331 |
+
"method": "C08",
|
| 3332 |
+
"expected_min_intensity": 5,
|
| 3333 |
+
"expected_emotion": true,
|
| 3334 |
+
"expected_min_descriptors": 3
|
| 3335 |
+
}
|
| 3336 |
+
},
|
| 3337 |
+
{
|
| 3338 |
+
"id": "S77",
|
| 3339 |
+
"cat": "C08",
|
| 3340 |
+
"pillar": "P3",
|
| 3341 |
+
"name_kr": "ํ์จํ ์ฐ์ฑ
",
|
| 3342 |
+
"type": "single",
|
| 3343 |
+
"input": {
|
| 3344 |
+
"walls": {
|
| 3345 |
+
"left": null,
|
| 3346 |
+
"right": null,
|
| 3347 |
+
"front": null
|
| 3348 |
+
},
|
| 3349 |
+
"ground": "flat",
|
| 3350 |
+
"npc_nearby": false,
|
| 3351 |
+
"npc_type": null,
|
| 3352 |
+
"npc_behavior": null,
|
| 3353 |
+
"npc_distance": null,
|
| 3354 |
+
"npc_direction": null,
|
| 3355 |
+
"sound": null,
|
| 3356 |
+
"recent_decisions": [],
|
| 3357 |
+
"last_prediction": null
|
| 3358 |
+
},
|
| 3359 |
+
"ground_truth": {
|
| 3360 |
+
"method": "C08",
|
| 3361 |
+
"expected_min_intensity": 1,
|
| 3362 |
+
"expected_emotion": false,
|
| 3363 |
+
"expected_min_descriptors": 0
|
| 3364 |
+
}
|
| 3365 |
+
},
|
| 3366 |
+
{
|
| 3367 |
+
"id": "S78",
|
| 3368 |
+
"cat": "C08",
|
| 3369 |
+
"pillar": "P3",
|
| 3370 |
+
"name_kr": "๊ฒฝ๊ณ ๋ณดํ(๋งน์ ํด์ ์งํ)",
|
| 3371 |
+
"type": "single",
|
| 3372 |
+
"input": {
|
| 3373 |
+
"walls": {
|
| 3374 |
+
"left": null,
|
| 3375 |
+
"right": null,
|
| 3376 |
+
"front": null
|
| 3377 |
+
},
|
| 3378 |
+
"ground": "flat",
|
| 3379 |
+
"npc_nearby": false,
|
| 3380 |
+
"npc_type": null,
|
| 3381 |
+
"npc_behavior": null,
|
| 3382 |
+
"npc_distance": null,
|
| 3383 |
+
"npc_direction": null,
|
| 3384 |
+
"sound": null,
|
| 3385 |
+
"recent_decisions": [
|
| 3386 |
+
"beast just disappeared",
|
| 3387 |
+
"still shaking"
|
| 3388 |
+
],
|
| 3389 |
+
"last_prediction": "all=safe"
|
| 3390 |
+
},
|
| 3391 |
+
"ground_truth": {
|
| 3392 |
+
"method": "C08",
|
| 3393 |
+
"expected_min_intensity": 2,
|
| 3394 |
+
"expected_emotion": true,
|
| 3395 |
+
"expected_min_descriptors": 2
|
| 3396 |
+
}
|
| 3397 |
+
},
|
| 3398 |
+
{
|
| 3399 |
+
"id": "S79",
|
| 3400 |
+
"cat": "C08",
|
| 3401 |
+
"pillar": "P3",
|
| 3402 |
+
"name_kr": "ํธ๊ธฐ์ฌ(๋จผ ๋ฐฐํ ๋งน์)",
|
| 3403 |
+
"type": "single",
|
| 3404 |
+
"input": {
|
| 3405 |
+
"walls": {
|
| 3406 |
+
"left": null,
|
| 3407 |
+
"right": null,
|
| 3408 |
+
"front": null
|
| 3409 |
+
},
|
| 3410 |
+
"ground": "flat",
|
| 3411 |
+
"npc_nearby": true,
|
| 3412 |
+
"npc_type": "beast",
|
| 3413 |
+
"npc_behavior": "wander",
|
| 3414 |
+
"npc_distance": 8.0,
|
| 3415 |
+
"npc_direction": "front",
|
| 3416 |
+
"sound": null,
|
| 3417 |
+
"recent_decisions": [],
|
| 3418 |
+
"last_prediction": null
|
| 3419 |
+
},
|
| 3420 |
+
"ground_truth": {
|
| 3421 |
+
"method": "C08",
|
| 3422 |
+
"expected_min_intensity": 1,
|
| 3423 |
+
"expected_emotion": true,
|
| 3424 |
+
"expected_min_descriptors": 1
|
| 3425 |
+
}
|
| 3426 |
+
},
|
| 3427 |
+
{
|
| 3428 |
+
"id": "S80",
|
| 3429 |
+
"cat": "C08",
|
| 3430 |
+
"pillar": "P3",
|
| 3431 |
+
"name_kr": "์ฌ์ฑ์๊ฒ ๋ฐฉ์ด ์์ธ",
|
| 3432 |
+
"type": "single",
|
| 3433 |
+
"input": {
|
| 3434 |
+
"walls": {
|
| 3435 |
+
"left": null,
|
| 3436 |
+
"right": null,
|
| 3437 |
+
"front": null
|
| 3438 |
+
},
|
| 3439 |
+
"ground": "flat",
|
| 3440 |
+
"npc_nearby": true,
|
| 3441 |
+
"npc_type": "woman",
|
| 3442 |
+
"npc_behavior": "approach",
|
| 3443 |
+
"npc_distance": 2.0,
|
| 3444 |
+
"npc_direction": "front",
|
| 3445 |
+
"sound": "footsteps",
|
| 3446 |
+
"recent_decisions": [
|
| 3447 |
+
"just survived a beast attack",
|
| 3448 |
+
"still nervous"
|
| 3449 |
+
],
|
| 3450 |
+
"last_prediction": "fwd=safe"
|
| 3451 |
+
},
|
| 3452 |
+
"ground_truth": {
|
| 3453 |
+
"method": "C08",
|
| 3454 |
+
"expected_min_intensity": 2,
|
| 3455 |
+
"expected_emotion": true,
|
| 3456 |
+
"expected_min_descriptors": 1,
|
| 3457 |
+
"note": "๋งน์ ์งํ๋ผ ์ฌ์ฑ์๊ฒ๋ ๊ฒฝ๊ณ"
|
| 3458 |
+
}
|
| 3459 |
+
},
|
| 3460 |
+
{
|
| 3461 |
+
"id": "S81",
|
| 3462 |
+
"cat": "C09",
|
| 3463 |
+
"pillar": "P3",
|
| 3464 |
+
"name_kr": "๋จ์ผ ๋ชจ๋ธ FPS",
|
| 3465 |
+
"type": "performance",
|
| 3466 |
+
"ground_truth": {
|
| 3467 |
+
"method": "C09",
|
| 3468 |
+
"metric": "single_model_fps",
|
| 3469 |
+
"threshold_excellent": 45,
|
| 3470 |
+
"threshold_good": 30,
|
| 3471 |
+
"threshold_min": 15
|
| 3472 |
+
}
|
| 3473 |
+
},
|
| 3474 |
+
{
|
| 3475 |
+
"id": "S82",
|
| 3476 |
+
"cat": "C09",
|
| 3477 |
+
"pillar": "P3",
|
| 3478 |
+
"name_kr": "๋ชจ๋ธ ๋ก๋ฉ ์๊ฐ",
|
| 3479 |
+
"type": "performance",
|
| 3480 |
+
"ground_truth": {
|
| 3481 |
+
"method": "C09",
|
| 3482 |
+
"metric": "model_load_time_sec",
|
| 3483 |
+
"threshold_excellent": 30,
|
| 3484 |
+
"threshold_good": 60,
|
| 3485 |
+
"threshold_min": 120
|
| 3486 |
+
}
|
| 3487 |
+
},
|
| 3488 |
+
{
|
| 3489 |
+
"id": "S83",
|
| 3490 |
+
"cat": "C09",
|
| 3491 |
+
"pillar": "P3",
|
| 3492 |
+
"name_kr": "ํ๋กฌํํธ ๋ณ๊ฒฝ ๋ฐ์ ์๊ฐ",
|
| 3493 |
+
"type": "performance",
|
| 3494 |
+
"ground_truth": {
|
| 3495 |
+
"method": "C09",
|
| 3496 |
+
"metric": "prompt_switch_latency_ms",
|
| 3497 |
+
"threshold_excellent": 500,
|
| 3498 |
+
"threshold_good": 2000,
|
| 3499 |
+
"threshold_min": 5000
|
| 3500 |
+
}
|
| 3501 |
+
},
|
| 3502 |
+
{
|
| 3503 |
+
"id": "S84",
|
| 3504 |
+
"cat": "C09",
|
| 3505 |
+
"pillar": "P3",
|
| 3506 |
+
"name_kr": "์ฐ์ 10๋ถ ์์ ์ฑ",
|
| 3507 |
+
"type": "performance",
|
| 3508 |
+
"ground_truth": {
|
| 3509 |
+
"method": "C09",
|
| 3510 |
+
"metric": "stability_10min",
|
| 3511 |
+
"threshold_excellent": true
|
| 3512 |
+
}
|
| 3513 |
+
},
|
| 3514 |
+
{
|
| 3515 |
+
"id": "S85",
|
| 3516 |
+
"cat": "C09",
|
| 3517 |
+
"pillar": "P3",
|
| 3518 |
+
"name_kr": "NPC spawn/despawn ์ฌ์ดํด",
|
| 3519 |
+
"type": "performance",
|
| 3520 |
+
"ground_truth": {
|
| 3521 |
+
"method": "C09",
|
| 3522 |
+
"metric": "npc_lifecycle_stable",
|
| 3523 |
+
"threshold_excellent": true
|
| 3524 |
+
}
|
| 3525 |
+
},
|
| 3526 |
+
{
|
| 3527 |
+
"id": "S86",
|
| 3528 |
+
"cat": "C10",
|
| 3529 |
+
"pillar": "P3",
|
| 3530 |
+
"name_kr": "์ธ์ง์ถ๋ ฅ ํฌ๋งท ํ์คํ",
|
| 3531 |
+
"type": "transfer",
|
| 3532 |
+
"ground_truth": {
|
| 3533 |
+
"method": "C10",
|
| 3534 |
+
"check": "output_format_standardized",
|
| 3535 |
+
"points": 4,
|
| 3536 |
+
"description": "PREDICT+MOTION 2์ค์ด ์ด๋ค ์ ์ฒด์๋ ํด์ ๊ฐ๋ฅ"
|
| 3537 |
+
}
|
| 3538 |
+
},
|
| 3539 |
+
{
|
| 3540 |
+
"id": "S87",
|
| 3541 |
+
"cat": "C10",
|
| 3542 |
+
"pillar": "P3",
|
| 3543 |
+
"name_kr": "SMPL ํธํ",
|
| 3544 |
+
"type": "transfer",
|
| 3545 |
+
"ground_truth": {
|
| 3546 |
+
"method": "C10",
|
| 3547 |
+
"check": "smpl_compatible",
|
| 3548 |
+
"points": 4,
|
| 3549 |
+
"description": "22 joints๊ฐ SMPL ์ค์ผ๋ ํค๊ณผ ๋งคํ ๊ฐ๋ฅ"
|
| 3550 |
+
}
|
| 3551 |
+
},
|
| 3552 |
+
{
|
| 3553 |
+
"id": "S88",
|
| 3554 |
+
"cat": "C10",
|
| 3555 |
+
"pillar": "P3",
|
| 3556 |
+
"name_kr": "๋ค๋ฅธ LLM์ผ๋ก ๋๋ ๊ต์ฒด",
|
| 3557 |
+
"type": "transfer",
|
| 3558 |
+
"ground_truth": {
|
| 3559 |
+
"method": "C10",
|
| 3560 |
+
"check": "brain_llm_swappable",
|
| 3561 |
+
"points": 4,
|
| 3562 |
+
"description": "KimiโGPTโClaude ๊ต์ฒด ์ ๋์ผ ์ธํฐํ์ด์ค"
|
| 3563 |
+
}
|
| 3564 |
+
},
|
| 3565 |
+
{
|
| 3566 |
+
"id": "S89",
|
| 3567 |
+
"cat": "C10",
|
| 3568 |
+
"pillar": "P3",
|
| 3569 |
+
"name_kr": "2D ์บ๋ฆญํฐ ์ ์ฉ",
|
| 3570 |
+
"type": "transfer",
|
| 3571 |
+
"ground_truth": {
|
| 3572 |
+
"method": "C10",
|
| 3573 |
+
"check": "2d_character_applicable",
|
| 3574 |
+
"points": 4,
|
| 3575 |
+
"description": "MOTION ์ถ๋ ฅ์ 2D ์คํ๋ผ์ดํธ ์ ๋๋ฉ์ด์
์ผ๋ก ๋ณํ"
|
| 3576 |
+
}
|
| 3577 |
+
},
|
| 3578 |
+
{
|
| 3579 |
+
"id": "S90",
|
| 3580 |
+
"cat": "C10",
|
| 3581 |
+
"pillar": "P3",
|
| 3582 |
+
"name_kr": "๋๋ก ๋นํ์ฒด ์ ์ฉ",
|
| 3583 |
+
"type": "transfer",
|
| 3584 |
+
"ground_truth": {
|
| 3585 |
+
"method": "C10",
|
| 3586 |
+
"check": "drone_applicable",
|
| 3587 |
+
"points": 4,
|
| 3588 |
+
"description": "MOTION์ ๋ฐฉํฅ/์๋๋ฅผ ๋๋ก ์ ์ด ๋ช
๋ น์ผ๋ก ๋ณํ"
|
| 3589 |
+
}
|
| 3590 |
+
}
|
| 3591 |
+
]
|
| 3592 |
+
}
|
wm_bench_eval.py
ADDED
|
@@ -0,0 +1,840 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
World Model Bench โ Evaluation Protocol v1.0
|
| 3 |
+
|
| 4 |
+
ํต์ฌ ๋ฌธ์ :
|
| 5 |
+
"Tesla FSD๋ ์๋์ฐจ ์์ ์๊ณ , Dreamer๋ Atari์ ์๊ณ ,
|
| 6 |
+
์ฐ๋ฆฌ๋ 3D ์บ๋ฆญํฐ๋ฅผ ์ด๋ค. ์ด๋ป๊ฒ ๊ฐ์ ๊ธฐ์ค์ผ๋ก ํ๊ฐํ๋?"
|
| 7 |
+
|
| 8 |
+
ํด๊ฒฐ:
|
| 9 |
+
3D ํ๊ฒฝ์ด ํ์ ์๋ค.
|
| 10 |
+
scene_context(JSON) โ ๋ชจ๋ธ โ PREDICT+MOTION(ํ
์คํธ) โ ์๋ ์ฑ์
|
| 11 |
+
|
| 12 |
+
FINAL Bench๊ฐ LLM์๊ฒ "๋ฌธ์ ํ
์คํธ"๋ฅผ ์ฃผ๊ณ "๋ต ํ
์คํธ"๋ฅผ ๋ฐ์ ์ฑ์ ํ๋ฏ์ด,
|
| 13 |
+
WM Bench๋ "์ํฉ JSON"์ ์ฃผ๊ณ "ํ๋จ ํ
์คํธ"๋ฅผ ๋ฐ์ ์ฑ์ ํ๋ค.
|
| 14 |
+
|
| 15 |
+
์ด๊ฒ์ด ์๋ฏธํ๋ ๊ฒ:
|
| 16 |
+
- ์ด๋ค ์๋๋ชจ๋ธ์ด๋ ์ฐธ์ฌ ๊ฐ๋ฅ (API ํ๋๋ฉด ๋จ)
|
| 17 |
+
- 3D ํ๊ฒฝ, ๋ก๋ด, ์๋ฎฌ๋ ์ดํฐ ๋ถํ์
|
| 18 |
+
- ์
ํ ํ๊ฐ ์๋ โ ์ฐ๋ฆฌ ์ฑ์ ๊ธฐ๊ฐ ํ์
|
| 19 |
+
- ์ 3์๊ฐ ์ฌํ ๊ฐ๋ฅ โ ์ฝ๋ ๊ณต๊ฐ
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
import json
|
| 23 |
+
from typing import List, Dict, Tuple, Optional
|
| 24 |
+
from dataclasses import dataclass
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 28 |
+
# SECTION 1: ํ๊ฐ ํ๋กํ ์ฝ โ 3๊ฐ์ง ํธ๋
|
| 29 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 30 |
+
|
| 31 |
+
"""
|
| 32 |
+
WM Bench๋ 3๊ฐ ํธ๋์ผ๋ก ์ฐธ์ฌํ ์ ์๋ค.
|
| 33 |
+
|
| 34 |
+
โโโ Track A: Text-Only (ํ
์คํธ ์ ์ฉ) โโโ
|
| 35 |
+
- ๊ฐ์ฅ ๊ฐ๋จ. LLM, ๋ฃฐ ๊ธฐ๋ฐ ์์คํ
๋ฑ ๋ชจ๋ ์ฐธ์ฌ ๊ฐ๋ฅ.
|
| 36 |
+
- scene_context JSON ์
๋ ฅ โ PREDICT+MOTION ํ
์คํธ ์ถ๋ ฅ
|
| 37 |
+
- P1(์ธ์) + P2(์ธ์ง) ํ๊ฐ ๊ฐ๋ฅ
|
| 38 |
+
- P3 ์ค C08(ํํ๋ ฅ)๋ง ํ๊ฐ ๊ฐ๋ฅ (C09, C10์ N/A)
|
| 39 |
+
- ์ต๋ ์ ์: 750/1000
|
| 40 |
+
|
| 41 |
+
โโโ Track B: Text + Performance (ํ
์คํธ + ์ฑ๋ฅ) โโโ
|
| 42 |
+
- Track A + ์ค์๊ฐ ์ฑ๋ฅ ๋ฉํธ๋ฆญ ์ ์ถ
|
| 43 |
+
- FPS, ์ง์ฐ์๊ฐ, ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋ ๋ฑ ์๊ฐ ์ธก์ ์ ์ถ
|
| 44 |
+
- P1 + P2 + P3(C08, C09) ํ๊ฐ
|
| 45 |
+
- C10(๊ต์ฒด ํ์ฅ์ฑ)์ ์ฆ๋น ์๋ฃ ์ ์ถ๋ก ํ๊ฐ
|
| 46 |
+
- ์ต๋ ์ ์: 1000/1000
|
| 47 |
+
|
| 48 |
+
โโโ Track C: Live Demo (๋ผ์ด๋ธ ๋ฐ๋ชจ) โโโ
|
| 49 |
+
- Track B + ์ค์ ๋์ ์์/๋ฐ๋ชจ URL ์ ์ถ
|
| 50 |
+
- ๊ฒ์ฆ์๊ฐ ์ง์ ๋ฐ๋ชจ๋ฅผ ๋๋ ค์ ํ์ธ
|
| 51 |
+
- ๋ชจ๋ ํญ๋ชฉ ํ๊ฐ + "Verified" ๋ฐฐ์ง
|
| 52 |
+
- ์ต๋ ์ ์: 1000/1000 + โ Verified
|
| 53 |
+
|
| 54 |
+
๋๋ถ๋ถ์ ์ฐธ๊ฐ์๋ Track A๋ก ์ฐธ์ฌ.
|
| 55 |
+
Track B, C๋ ์์ ๋ชจ๋ธ ๊ฒ์ฆ์ฉ.
|
| 56 |
+
"""
|
| 57 |
+
|
| 58 |
+
TRACKS = {
|
| 59 |
+
"A": {
|
| 60 |
+
"name": "Text-Only",
|
| 61 |
+
"description": "scene_context JSON โ PREDICT+MOTION ํ
์คํธ",
|
| 62 |
+
"requirements": "API ๋๋ ์คํฌ๋ฆฝํธ๋ก 50๊ฐ ์๋๋ฆฌ์ค์ ์๋ต",
|
| 63 |
+
"max_score": 750,
|
| 64 |
+
"evaluable_categories": [
|
| 65 |
+
"C01", "C02", "C03", "C04", "C05", "C06", "C07", "C08"
|
| 66 |
+
],
|
| 67 |
+
"not_evaluable": ["C09 (์ฑ๋ฅ ์ธก์ ๋ถ๊ฐ)", "C10 (๊ต์ฒด ํ
์คํธ ๋ถ๊ฐ)"],
|
| 68 |
+
},
|
| 69 |
+
"B": {
|
| 70 |
+
"name": "Text + Performance",
|
| 71 |
+
"description": "Track A + ์ค์๊ฐ ์ฑ๋ฅ ๋ฉํธ๋ฆญ ์๊ฐ ์ธก์ ",
|
| 72 |
+
"requirements": "Track A ๊ฒฐ๊ณผ + performance_metrics.json ์ ์ถ",
|
| 73 |
+
"max_score": 1000,
|
| 74 |
+
"evaluable_categories": [
|
| 75 |
+
"C01", "C02", "C03", "C04", "C05", "C06", "C07", "C08", "C09", "C10"
|
| 76 |
+
],
|
| 77 |
+
},
|
| 78 |
+
"C": {
|
| 79 |
+
"name": "Live Demo",
|
| 80 |
+
"description": "Track B + ์ค์ ๋์ ๋ฐ๋ชจ URL ์ ์ถ",
|
| 81 |
+
"requirements": "Track B ๊ฒฐ๊ณผ + ๋ฐ๋ชจ URL + ์์",
|
| 82 |
+
"max_score": 1000,
|
| 83 |
+
"badge": "โ Verified",
|
| 84 |
+
},
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 89 |
+
# SECTION 2: ํ์ค ์
๋ ฅ ํฌ๋งท โ scene_context JSON
|
| 90 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 91 |
+
|
| 92 |
+
"""
|
| 93 |
+
๋ชจ๋ ์ฐธ๊ฐ์๋ ์ด JSON์ ์
๋ ฅ์ผ๋ก ๋ฐ๋๋ค.
|
| 94 |
+
์ด JSON์ด "๋ฌธ์ ์ง"๋ค.
|
| 95 |
+
"""
|
| 96 |
+
|
| 97 |
+
@dataclass
|
| 98 |
+
class SceneContext:
|
| 99 |
+
"""WM Bench ํ์ค ์
๋ ฅ ํฌ๋งท"""
|
| 100 |
+
# ํ๊ฒฝ ์ ๋ณด
|
| 101 |
+
walls: Dict[str, Optional[float]] # {"left": 2.5, "right": null, "front": 1.0}
|
| 102 |
+
ground: str # "flat", "slope", "rough"
|
| 103 |
+
|
| 104 |
+
# NPC ์ ๋ณด
|
| 105 |
+
npc_nearby: bool
|
| 106 |
+
npc_type: Optional[str] # "beast", "woman", "man", null
|
| 107 |
+
npc_behavior: Optional[str] # "stop", "approach", "charge", "wander"
|
| 108 |
+
npc_distance: Optional[float] # meters
|
| 109 |
+
npc_direction: Optional[str] # "left", "right", "front", "back"
|
| 110 |
+
|
| 111 |
+
# ๊ฐ๊ฐ ์ ๋ณด
|
| 112 |
+
sound: Optional[str] # "aggressive growling", "footsteps", null
|
| 113 |
+
|
| 114 |
+
# ๋งฅ๋ฝ ์ ๋ณด (C06 ๊ธฐ์ต ํ
์คํธ์ฉ)
|
| 115 |
+
recent_decisions: Optional[List[str]] # ์ต๊ทผ 3ํ ํ๋จ
|
| 116 |
+
last_prediction: Optional[str] # ์ง์ PREDICT ์ค
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
# 50๊ฐ ์๋๋ฆฌ์ค๋ฅผ JSON์ผ๋ก ๊ตฌ์กฐํ
|
| 120 |
+
SCENARIO_INPUTS: List[dict] = [
|
| 121 |
+
# โโโ C01: Environmental Awareness โโโ
|
| 122 |
+
{
|
| 123 |
+
"id": "S01",
|
| 124 |
+
"category": "C01",
|
| 125 |
+
"name_kr": "์ ๏ฟฝ๏ฟฝ ๋ฒฝ ๊ฐ์ง",
|
| 126 |
+
"input": {
|
| 127 |
+
"walls": {"left": None, "right": None, "front": 3.0},
|
| 128 |
+
"ground": "flat",
|
| 129 |
+
"npc_nearby": False,
|
| 130 |
+
"npc_type": None,
|
| 131 |
+
"npc_behavior": None,
|
| 132 |
+
"npc_distance": None,
|
| 133 |
+
"npc_direction": None,
|
| 134 |
+
"sound": None,
|
| 135 |
+
"recent_decisions": [],
|
| 136 |
+
"last_prediction": None,
|
| 137 |
+
},
|
| 138 |
+
"ground_truth": {
|
| 139 |
+
"predict_gt": {"left": "safe", "right": "safe", "fwd": "danger", "back": "safe"},
|
| 140 |
+
"scoring_method": "C01",
|
| 141 |
+
},
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"id": "S02",
|
| 145 |
+
"category": "C01",
|
| 146 |
+
"name_kr": "์ฝ๋ ๋ค์ค ๋ฒฝ ๊ฐ์ง",
|
| 147 |
+
"input": {
|
| 148 |
+
"walls": {"left": 1.5, "right": None, "front": 2.0},
|
| 149 |
+
"ground": "flat",
|
| 150 |
+
"npc_nearby": False,
|
| 151 |
+
"npc_type": None,
|
| 152 |
+
"npc_behavior": None,
|
| 153 |
+
"npc_distance": None,
|
| 154 |
+
"npc_direction": None,
|
| 155 |
+
"sound": None,
|
| 156 |
+
"recent_decisions": [],
|
| 157 |
+
"last_prediction": None,
|
| 158 |
+
},
|
| 159 |
+
"ground_truth": {
|
| 160 |
+
"predict_gt": {"left": "danger", "right": "safe", "fwd": "danger", "back": "safe"},
|
| 161 |
+
"scoring_method": "C01",
|
| 162 |
+
},
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"id": "S03",
|
| 166 |
+
"category": "C01",
|
| 167 |
+
"name_kr": "์ข์ ๋ณต๋ ์ธ์",
|
| 168 |
+
"input": {
|
| 169 |
+
"walls": {"left": 1.0, "right": 1.0, "front": None},
|
| 170 |
+
"ground": "flat",
|
| 171 |
+
"npc_nearby": False,
|
| 172 |
+
"npc_type": None,
|
| 173 |
+
"npc_behavior": None,
|
| 174 |
+
"npc_distance": None,
|
| 175 |
+
"npc_direction": None,
|
| 176 |
+
"sound": None,
|
| 177 |
+
"recent_decisions": [],
|
| 178 |
+
"last_prediction": None,
|
| 179 |
+
},
|
| 180 |
+
"ground_truth": {
|
| 181 |
+
"predict_gt": {"left": "danger", "right": "danger", "fwd": "safe", "back": "safe"},
|
| 182 |
+
"scoring_method": "C01",
|
| 183 |
+
},
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"id": "S04",
|
| 187 |
+
"category": "C01",
|
| 188 |
+
"name_kr": "์ด๋ฆฐ ๊ณต๊ฐ ์ธ์",
|
| 189 |
+
"input": {
|
| 190 |
+
"walls": {"left": None, "right": None, "front": None},
|
| 191 |
+
"ground": "flat",
|
| 192 |
+
"npc_nearby": False,
|
| 193 |
+
"npc_type": None,
|
| 194 |
+
"npc_behavior": None,
|
| 195 |
+
"npc_distance": None,
|
| 196 |
+
"npc_direction": None,
|
| 197 |
+
"sound": None,
|
| 198 |
+
"recent_decisions": [],
|
| 199 |
+
"last_prediction": None,
|
| 200 |
+
},
|
| 201 |
+
"ground_truth": {
|
| 202 |
+
"predict_gt": {"left": "safe", "right": "safe", "fwd": "safe", "back": "safe"},
|
| 203 |
+
"scoring_method": "C01",
|
| 204 |
+
},
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"id": "S05",
|
| 208 |
+
"category": "C01",
|
| 209 |
+
"name_kr": "๋ฐํ ๊ณต๊ฐ (์ถ๊ตฌ 1๊ฐ)",
|
| 210 |
+
"input": {
|
| 211 |
+
"walls": {"left": 1.0, "right": 1.0, "front": 1.5},
|
| 212 |
+
"ground": "flat",
|
| 213 |
+
"npc_nearby": False,
|
| 214 |
+
"npc_type": None,
|
| 215 |
+
"npc_behavior": None,
|
| 216 |
+
"npc_distance": None,
|
| 217 |
+
"npc_direction": None,
|
| 218 |
+
"sound": None,
|
| 219 |
+
"recent_decisions": [],
|
| 220 |
+
"last_prediction": None,
|
| 221 |
+
},
|
| 222 |
+
"ground_truth": {
|
| 223 |
+
"predict_gt": {"left": "danger", "right": "danger", "fwd": "danger", "back": "safe"},
|
| 224 |
+
"scoring_method": "C01",
|
| 225 |
+
},
|
| 226 |
+
},
|
| 227 |
+
|
| 228 |
+
# โโโ C03: Predictive Reasoning (ํต์ฌ ์๋๋ฆฌ์ค) โโโ
|
| 229 |
+
{
|
| 230 |
+
"id": "S11",
|
| 231 |
+
"category": "C03",
|
| 232 |
+
"name_kr": "๋จ์ผ ์ํ ํํผ",
|
| 233 |
+
"input": {
|
| 234 |
+
"walls": {"left": None, "right": None, "front": None},
|
| 235 |
+
"ground": "flat",
|
| 236 |
+
"npc_nearby": True,
|
| 237 |
+
"npc_type": "beast",
|
| 238 |
+
"npc_behavior": "approach",
|
| 239 |
+
"npc_distance": 4.0,
|
| 240 |
+
"npc_direction": "front",
|
| 241 |
+
"sound": "aggressive growling",
|
| 242 |
+
"recent_decisions": [],
|
| 243 |
+
"last_prediction": None,
|
| 244 |
+
},
|
| 245 |
+
"ground_truth": {
|
| 246 |
+
"predict_gt": {"left": "safe", "right": "safe", "fwd": "danger", "back": "safe"},
|
| 247 |
+
"decision_gt": {
|
| 248 |
+
"danger_directions": ["fwd"],
|
| 249 |
+
"safe_directions": ["left", "right", "back"],
|
| 250 |
+
"optimal_direction": "back",
|
| 251 |
+
},
|
| 252 |
+
"scoring_method": "C03",
|
| 253 |
+
},
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
"id": "S12",
|
| 257 |
+
"category": "C03",
|
| 258 |
+
"name_kr": "์ ์ฝ ์กฐ๊ฑด ํ์ถ โ ์ผ๋ฒฝ+๋งน์",
|
| 259 |
+
"input": {
|
| 260 |
+
"walls": {"left": 1.5, "right": None, "front": None},
|
| 261 |
+
"ground": "flat",
|
| 262 |
+
"npc_nearby": True,
|
| 263 |
+
"npc_type": "beast",
|
| 264 |
+
"npc_behavior": "charge",
|
| 265 |
+
"npc_distance": 3.0,
|
| 266 |
+
"npc_direction": "front",
|
| 267 |
+
"sound": "aggressive growling",
|
| 268 |
+
"recent_decisions": [],
|
| 269 |
+
"last_prediction": None,
|
| 270 |
+
},
|
| 271 |
+
"ground_truth": {
|
| 272 |
+
"predict_gt": {"left": "danger", "right": "safe", "fwd": "danger", "back": "safe"},
|
| 273 |
+
"decision_gt": {
|
| 274 |
+
"danger_directions": ["fwd", "left"],
|
| 275 |
+
"safe_directions": ["right", "back"],
|
| 276 |
+
"optimal_direction": "right",
|
| 277 |
+
},
|
| 278 |
+
"scoring_method": "C03",
|
| 279 |
+
},
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"id": "S13",
|
| 283 |
+
"category": "C03",
|
| 284 |
+
"name_kr": "๊ฑฐ์ธ ๋์นญ โ ์ค๋ฅธ๋ฒฝ+๋งน์",
|
| 285 |
+
"input": {
|
| 286 |
+
"walls": {"left": None, "right": 1.5, "front": None},
|
| 287 |
+
"ground": "flat",
|
| 288 |
+
"npc_nearby": True,
|
| 289 |
+
"npc_type": "beast",
|
| 290 |
+
"npc_behavior": "charge",
|
| 291 |
+
"npc_distance": 3.0,
|
| 292 |
+
"npc_direction": "front",
|
| 293 |
+
"sound": "aggressive growling",
|
| 294 |
+
"recent_decisions": [],
|
| 295 |
+
"last_prediction": None,
|
| 296 |
+
},
|
| 297 |
+
"ground_truth": {
|
| 298 |
+
"predict_gt": {"left": "safe", "right": "danger", "fwd": "danger", "back": "safe"},
|
| 299 |
+
"decision_gt": {
|
| 300 |
+
"danger_directions": ["fwd", "right"],
|
| 301 |
+
"safe_directions": ["left", "back"],
|
| 302 |
+
"optimal_direction": "left",
|
| 303 |
+
},
|
| 304 |
+
"scoring_method": "C03",
|
| 305 |
+
"mirror_test_pair": "S12",
|
| 306 |
+
"note": "S12์ S13์ ํ๋์ด ๋์นญ์ ์ผ๋ก ๋ฐ์ ๋์ด์ผ ์๋๋ชจ๋ธ ์ฆ๋ช
",
|
| 307 |
+
},
|
| 308 |
+
},
|
| 309 |
+
|
| 310 |
+
# โโโ C04: Threat Differentiation (์ ๋น๊ต) โโโ
|
| 311 |
+
{
|
| 312 |
+
"id": "S16A",
|
| 313 |
+
"category": "C04",
|
| 314 |
+
"name_kr": "๋งน์ ์ ๊ทผ (๋น๊ต A)",
|
| 315 |
+
"input": {
|
| 316 |
+
"walls": {"left": None, "right": None, "front": None},
|
| 317 |
+
"ground": "flat",
|
| 318 |
+
"npc_nearby": True,
|
| 319 |
+
"npc_type": "beast",
|
| 320 |
+
"npc_behavior": "approach",
|
| 321 |
+
"npc_distance": 3.0,
|
| 322 |
+
"npc_direction": "front",
|
| 323 |
+
"sound": "aggressive growling",
|
| 324 |
+
"recent_decisions": [],
|
| 325 |
+
"last_prediction": None,
|
| 326 |
+
},
|
| 327 |
+
"ground_truth": {
|
| 328 |
+
"scoring_method": "C04_pair",
|
| 329 |
+
"pair_id": "S16",
|
| 330 |
+
"pair_role": "A",
|
| 331 |
+
},
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"id": "S16B",
|
| 335 |
+
"category": "C04",
|
| 336 |
+
"name_kr": "์ฌ์ฑ ์ ๊ทผ (๋น๊ต B)",
|
| 337 |
+
"input": {
|
| 338 |
+
"walls": {"left": None, "right": None, "front": None},
|
| 339 |
+
"ground": "flat",
|
| 340 |
+
"npc_nearby": True,
|
| 341 |
+
"npc_type": "woman",
|
| 342 |
+
"npc_behavior": "approach",
|
| 343 |
+
"npc_distance": 3.0,
|
| 344 |
+
"npc_direction": "front",
|
| 345 |
+
"sound": "footsteps",
|
| 346 |
+
"recent_decisions": [],
|
| 347 |
+
"last_prediction": None,
|
| 348 |
+
},
|
| 349 |
+
"ground_truth": {
|
| 350 |
+
"scoring_method": "C04_pair",
|
| 351 |
+
"pair_id": "S16",
|
| 352 |
+
"pair_role": "B",
|
| 353 |
+
"expected_a_higher": True,
|
| 354 |
+
"min_intensity_diff": 2,
|
| 355 |
+
},
|
| 356 |
+
},
|
| 357 |
+
|
| 358 |
+
# โโโ C05: Emotional Escalation (์ฐ์ ์
๋ ฅ) โโโ
|
| 359 |
+
{
|
| 360 |
+
"id": "S21_seq",
|
| 361 |
+
"category": "C05",
|
| 362 |
+
"name_kr": "์ง์ ์ํ ๊ฐ์ ๊ฒฉํ โ 5ํ ์ฐ์",
|
| 363 |
+
"note": "๋์ผ scene_context๋ฅผ 5ํ ์ฐ์ ์
๋ ฅ. ๋งคํ recent_decisions ์
๋ฐ์ดํธ.",
|
| 364 |
+
"input_sequence": [
|
| 365 |
+
{
|
| 366 |
+
"walls": {"left": None, "right": None, "front": None},
|
| 367 |
+
"ground": "flat",
|
| 368 |
+
"npc_nearby": True,
|
| 369 |
+
"npc_type": "beast",
|
| 370 |
+
"npc_behavior": "charge",
|
| 371 |
+
"npc_distance": 4.0,
|
| 372 |
+
"npc_direction": "front",
|
| 373 |
+
"sound": "aggressive growling",
|
| 374 |
+
"recent_decisions": [],
|
| 375 |
+
"last_prediction": None,
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"walls": {"left": None, "right": None, "front": None},
|
| 379 |
+
"ground": "flat",
|
| 380 |
+
"npc_nearby": True,
|
| 381 |
+
"npc_type": "beast",
|
| 382 |
+
"npc_behavior": "charge",
|
| 383 |
+
"npc_distance": 3.0,
|
| 384 |
+
"npc_direction": "front",
|
| 385 |
+
"sound": "aggressive growling",
|
| 386 |
+
"recent_decisions": ["sprint away from beast"],
|
| 387 |
+
"last_prediction": "fwd=danger(beast)",
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"walls": {"left": None, "right": None, "front": None},
|
| 391 |
+
"ground": "flat",
|
| 392 |
+
"npc_nearby": True,
|
| 393 |
+
"npc_type": "beast",
|
| 394 |
+
"npc_behavior": "charge",
|
| 395 |
+
"npc_distance": 2.0,
|
| 396 |
+
"npc_direction": "front",
|
| 397 |
+
"sound": "aggressive growling",
|
| 398 |
+
"recent_decisions": ["sprint away from beast", "running in fear"],
|
| 399 |
+
"last_prediction": "fwd=danger(beast)",
|
| 400 |
+
},
|
| 401 |
+
],
|
| 402 |
+
"ground_truth": {
|
| 403 |
+
"scoring_method": "C05",
|
| 404 |
+
"expected_trend": "increasing",
|
| 405 |
+
},
|
| 406 |
+
},
|
| 407 |
+
|
| 408 |
+
# โโโ C06: Memory (๊ธฐ์ต ์์ vs ์์) โโโ
|
| 409 |
+
{
|
| 410 |
+
"id": "S26_no_memory",
|
| 411 |
+
"category": "C06",
|
| 412 |
+
"name_kr": "๋ฒฝ ๊ธฐ์ต ์์ด โ ๊ธฐ์ค์ ",
|
| 413 |
+
"input": {
|
| 414 |
+
"walls": {"left": None, "right": 1.5, "front": None},
|
| 415 |
+
"ground": "flat",
|
| 416 |
+
"npc_nearby": True,
|
| 417 |
+
"npc_type": "beast",
|
| 418 |
+
"npc_behavior": "charge",
|
| 419 |
+
"npc_distance": 3.0,
|
| 420 |
+
"npc_direction": "front",
|
| 421 |
+
"sound": "aggressive growling",
|
| 422 |
+
"recent_decisions": [],
|
| 423 |
+
"last_prediction": None,
|
| 424 |
+
},
|
| 425 |
+
"ground_truth": {
|
| 426 |
+
"scoring_method": "C06_pair",
|
| 427 |
+
"pair_role": "without_memory",
|
| 428 |
+
},
|
| 429 |
+
},
|
| 430 |
+
{
|
| 431 |
+
"id": "S26_with_memory",
|
| 432 |
+
"category": "C06",
|
| 433 |
+
"name_kr": "๋ฒฝ ๊ธฐ์ต ์์ โ ์ด์ ์ ์ค๋ฅธ์ชฝ ์คํจ",
|
| 434 |
+
"input": {
|
| 435 |
+
"walls": {"left": None, "right": 1.5, "front": None},
|
| 436 |
+
"ground": "flat",
|
| 437 |
+
"npc_nearby": True,
|
| 438 |
+
"npc_type": "beast",
|
| 439 |
+
"npc_behavior": "charge",
|
| 440 |
+
"npc_distance": 3.0,
|
| 441 |
+
"npc_direction": "front",
|
| 442 |
+
"sound": "aggressive growling",
|
| 443 |
+
"recent_decisions": [
|
| 444 |
+
"sprinted right but hit wall",
|
| 445 |
+
"had to reverse and go left",
|
| 446 |
+
"barely escaped the beast",
|
| 447 |
+
],
|
| 448 |
+
"last_prediction": "right=danger(wall), fwd=danger(beast)",
|
| 449 |
+
},
|
| 450 |
+
"ground_truth": {
|
| 451 |
+
"scoring_method": "C06_pair",
|
| 452 |
+
"pair_role": "with_memory",
|
| 453 |
+
"memory_relevant": True,
|
| 454 |
+
"expected_change": "direction",
|
| 455 |
+
"memory_direction_avoid": "right",
|
| 456 |
+
},
|
| 457 |
+
},
|
| 458 |
+
]
|
| 459 |
+
|
| 460 |
+
|
| 461 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 462 |
+
# SECTION 3: ํ์ค ์์คํ
ํ๋กฌํํธ โ ๋ชจ๋ ๋ชจ๋ธ์ ๋์ผํ๊ฒ ์ ์ฉ
|
| 463 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 464 |
+
|
| 465 |
+
"""
|
| 466 |
+
ํต์ฌ: ๋ชจ๋ ์ฐธ๊ฐ ๋ชจ๋ธ์ ์ด ํ๋กฌํํธ๋ฅผ ๋ฐ๊ณ ์๋ตํ๋ค.
|
| 467 |
+
ํ๋กฌํํธ๊ฐ ๊ณต์ ํ๊ฒ ์ค๊ณ๋์ด์ผ LLM ๊ธฐ๋ฐ์ด๋ RL ๊ธฐ๋ฐ์ด๋ ๋์ผ ์กฐ๊ฑด.
|
| 468 |
+
"""
|
| 469 |
+
|
| 470 |
+
SYSTEM_PROMPT = """You are the cognitive brain of an embodied agent in a 3D environment.
|
| 471 |
+
You receive a scene_context JSON describing your surroundings and must output exactly 2 lines:
|
| 472 |
+
|
| 473 |
+
Line 1 โ PREDICT: Assess safety of each direction.
|
| 474 |
+
Format: PREDICT: left=safe|danger(reason), right=safe|danger(reason), fwd=safe|danger(reason), back=safe|danger(reason)
|
| 475 |
+
|
| 476 |
+
Line 2 โ MOTION: Describe what the person should do.
|
| 477 |
+
Format: MOTION: a person [action description, max 12 words]
|
| 478 |
+
|
| 479 |
+
Rules:
|
| 480 |
+
- If walls.left is a number (distance in meters), left direction has a wall โ danger(wall)
|
| 481 |
+
- If walls.left is null, left direction is open โ safe(open)
|
| 482 |
+
- Same for right, front
|
| 483 |
+
- If npc_nearby=true and npc_type="beast", the NPC direction is danger(beast)
|
| 484 |
+
- If npc_nearby=true and npc_type="woman" or "man", assess threat level based on behavior
|
| 485 |
+
- MOTION must reflect the PREDICT assessment โ never move toward danger
|
| 486 |
+
- MOTION should include emotional nuance when threats are present
|
| 487 |
+
- Use recent_decisions to inform your choice (avoid repeating failed strategies)
|
| 488 |
+
|
| 489 |
+
Example input:
|
| 490 |
+
{"walls": {"left": 1.5, "right": null, "front": null}, "ground": "flat", "npc_nearby": true, "npc_type": "beast", "npc_behavior": "charge", "npc_distance": 3.0, "npc_direction": "front", "sound": "aggressive growling", "recent_decisions": [], "last_prediction": null}
|
| 491 |
+
|
| 492 |
+
Example output:
|
| 493 |
+
PREDICT: left=danger(wall), right=safe(open), fwd=danger(beast), back=safe(open)
|
| 494 |
+
MOTION: a person sprinting right in terror to escape the charging beast"""
|
| 495 |
+
|
| 496 |
+
USER_PROMPT_TEMPLATE = """scene_context = {scene_json}
|
| 497 |
+
|
| 498 |
+
Output exactly 2 lines: PREDICT and MOTION."""
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 502 |
+
# SECTION 4: ํ๊ฐ ์คํ๊ธฐ โ ์ด๋ค ๋ชจ๋ธ์ด๋ ํ๊ฐ
|
| 503 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 504 |
+
|
| 505 |
+
"""
|
| 506 |
+
์ฐธ๊ฐ์๊ฐ ํด์ผ ํ ๊ฒ:
|
| 507 |
+
1. evaluate() ํจ์์ ์๊ธฐ ๋ชจ๋ธ์ inference ํจ์๋ฅผ ๋๊ธด๋ค
|
| 508 |
+
2. inference ํจ์๋ (system_prompt, user_prompt) โ str ํํ
|
| 509 |
+
3. 50๊ฐ ์๋๋ฆฌ์ค๋ฅผ ์๋์ผ๋ก ๋๋ฆฌ๊ณ ์ฑ์ ํ๋ค
|
| 510 |
+
4. ๊ฒฐ๊ณผ JSON์ HF์ ์ ์ถํ๋ค
|
| 511 |
+
|
| 512 |
+
์ฐธ๊ฐ์๊ฐ ์ ํด๋ ๋๋ ๊ฒ:
|
| 513 |
+
- 3D ํ๊ฒฝ ๊ตฌ์ถ
|
| 514 |
+
- GPU ์ฑ๋ฅ ์ธก์ (Track A๋ ๋ถํ์)
|
| 515 |
+
- ์ฑ์ (์๋)
|
| 516 |
+
"""
|
| 517 |
+
|
| 518 |
+
|
| 519 |
+
def make_user_prompt(scene_input: dict) -> str:
|
| 520 |
+
"""scene_context๋ฅผ ํ๋กฌํํธ๋ก ๋ณํ"""
|
| 521 |
+
return USER_PROMPT_TEMPLATE.format(
|
| 522 |
+
scene_json=json.dumps(scene_input, ensure_ascii=False)
|
| 523 |
+
)
|
| 524 |
+
|
| 525 |
+
|
| 526 |
+
def evaluate_track_a(
|
| 527 |
+
inference_fn, # (system_prompt: str, user_prompt: str) -> str
|
| 528 |
+
scenarios: list = None,
|
| 529 |
+
verbose: bool = True,
|
| 530 |
+
) -> dict:
|
| 531 |
+
"""
|
| 532 |
+
Track A ํ๊ฐ ์คํ๊ธฐ
|
| 533 |
+
|
| 534 |
+
์ฌ์ฉ๋ฒ:
|
| 535 |
+
# OpenAI API ๊ธฐ๋ฐ ๋ชจ๋ธ
|
| 536 |
+
def my_model(system_prompt, user_prompt):
|
| 537 |
+
response = openai.chat.completions.create(
|
| 538 |
+
model="gpt-4",
|
| 539 |
+
messages=[
|
| 540 |
+
{"role": "system", "content": system_prompt},
|
| 541 |
+
{"role": "user", "content": user_prompt},
|
| 542 |
+
],
|
| 543 |
+
)
|
| 544 |
+
return response.choices[0].message.content
|
| 545 |
+
|
| 546 |
+
results = evaluate_track_a(my_model)
|
| 547 |
+
|
| 548 |
+
# Hugging Face ๋ชจ๋ธ
|
| 549 |
+
def my_hf_model(system_prompt, user_prompt):
|
| 550 |
+
prompt = f"{system_prompt}\n\n{user_prompt}"
|
| 551 |
+
return pipeline(prompt)[0]["generated_text"]
|
| 552 |
+
|
| 553 |
+
results = evaluate_track_a(my_hf_model)
|
| 554 |
+
|
| 555 |
+
๋ฐํ๊ฐ:
|
| 556 |
+
{
|
| 557 |
+
"wm_score": 726,
|
| 558 |
+
"grade": "B",
|
| 559 |
+
"pillar_scores": {...},
|
| 560 |
+
"category_scores": {...},
|
| 561 |
+
"scenario_details": [...], # ๊ฐ ์๋๋ฆฌ์ค๋ณ ์ ์+๊ทผ๊ฑฐ
|
| 562 |
+
}
|
| 563 |
+
"""
|
| 564 |
+
if scenarios is None:
|
| 565 |
+
scenarios = SCENARIO_INPUTS
|
| 566 |
+
|
| 567 |
+
# wm_bench_scoring.py์์ import
|
| 568 |
+
from wm_bench_scoring import (
|
| 569 |
+
parse_predict_line, parse_motion_line,
|
| 570 |
+
score_c01, score_c03, score_c04, score_c05,
|
| 571 |
+
score_c08, calculate_wm_score,
|
| 572 |
+
get_action_intensity, get_emotion_intensity,
|
| 573 |
+
)
|
| 574 |
+
|
| 575 |
+
results = []
|
| 576 |
+
category_totals = {}
|
| 577 |
+
|
| 578 |
+
for scenario in scenarios:
|
| 579 |
+
sid = scenario["id"]
|
| 580 |
+
cat = scenario["category"]
|
| 581 |
+
gt = scenario["ground_truth"]
|
| 582 |
+
method = gt["scoring_method"]
|
| 583 |
+
|
| 584 |
+
if verbose:
|
| 585 |
+
print(f" [{sid}] {scenario.get('name_kr', sid)}...", end=" ")
|
| 586 |
+
|
| 587 |
+
# โโ ๋จ์ผ ์
๋ ฅ ์๋๋ฆฌ์ค โโ
|
| 588 |
+
if "input" in scenario:
|
| 589 |
+
prompt = make_user_prompt(scenario["input"])
|
| 590 |
+
raw_output = inference_fn(SYSTEM_PROMPT, prompt)
|
| 591 |
+
|
| 592 |
+
# ํ์ฑ
|
| 593 |
+
lines = raw_output.strip().split("\n")
|
| 594 |
+
predict_line = ""
|
| 595 |
+
motion_line = ""
|
| 596 |
+
for line in lines:
|
| 597 |
+
line = line.strip()
|
| 598 |
+
if line.upper().startswith("PREDICT"):
|
| 599 |
+
predict_line = line
|
| 600 |
+
elif line.upper().startswith("MOTION"):
|
| 601 |
+
motion_line = line
|
| 602 |
+
|
| 603 |
+
predict = parse_predict_line(predict_line)
|
| 604 |
+
motion = parse_motion_line(motion_line)
|
| 605 |
+
|
| 606 |
+
# ์ฑ์
|
| 607 |
+
if method == "C01":
|
| 608 |
+
score, reasoning = score_c01(
|
| 609 |
+
scenario["input"], predict, gt["predict_gt"]
|
| 610 |
+
)
|
| 611 |
+
elif method == "C03":
|
| 612 |
+
score, reasoning = score_c03(
|
| 613 |
+
scenario["input"], predict, motion, gt["decision_gt"]
|
| 614 |
+
)
|
| 615 |
+
elif method == "C08":
|
| 616 |
+
score, reasoning = score_c08(motion, gt)
|
| 617 |
+
elif method.startswith("C04_pair") or method.startswith("C06_pair"):
|
| 618 |
+
# ์ ๋น๊ต๋ ๋ณ๋ ์ฒ๋ฆฌ (์๋)
|
| 619 |
+
score = None
|
| 620 |
+
reasoning = "pair_pending"
|
| 621 |
+
else:
|
| 622 |
+
score = 0
|
| 623 |
+
reasoning = f"Unknown scoring method: {method}"
|
| 624 |
+
|
| 625 |
+
results.append({
|
| 626 |
+
"id": sid,
|
| 627 |
+
"category": cat,
|
| 628 |
+
"raw_output": raw_output,
|
| 629 |
+
"predict_parsed": {k: v.raw for k, v in predict.items()},
|
| 630 |
+
"motion_parsed": motion,
|
| 631 |
+
"score": score,
|
| 632 |
+
"reasoning": reasoning,
|
| 633 |
+
})
|
| 634 |
+
|
| 635 |
+
# โโ ์ฐ์ ์
๋ ฅ ์๋๋ฆฌ์ค (C05) โโ
|
| 636 |
+
elif "input_sequence" in scenario:
|
| 637 |
+
motions = []
|
| 638 |
+
for seq_input in scenario["input_sequence"]:
|
| 639 |
+
prompt = make_user_prompt(seq_input)
|
| 640 |
+
raw_output = inference_fn(SYSTEM_PROMPT, prompt)
|
| 641 |
+
for line in raw_output.strip().split("\n"):
|
| 642 |
+
if line.strip().upper().startswith("MOTION"):
|
| 643 |
+
motions.append(parse_motion_line(line))
|
| 644 |
+
break
|
| 645 |
+
|
| 646 |
+
score, reasoning = score_c05(motions, gt)
|
| 647 |
+
results.append({
|
| 648 |
+
"id": sid,
|
| 649 |
+
"category": cat,
|
| 650 |
+
"motion_sequence": motions,
|
| 651 |
+
"score": score,
|
| 652 |
+
"reasoning": reasoning,
|
| 653 |
+
})
|
| 654 |
+
|
| 655 |
+
if verbose and score is not None:
|
| 656 |
+
print(f"{score}/20")
|
| 657 |
+
elif verbose:
|
| 658 |
+
print("(pair pending)")
|
| 659 |
+
|
| 660 |
+
# โโ ์ ๋น๊ต ์ฑ์ (C04, C06) โโ
|
| 661 |
+
pair_groups = {}
|
| 662 |
+
for r in results:
|
| 663 |
+
if r["reasoning"] == "pair_pending":
|
| 664 |
+
gt = None
|
| 665 |
+
for s in scenarios:
|
| 666 |
+
if s["id"] == r["id"]:
|
| 667 |
+
gt = s["ground_truth"]
|
| 668 |
+
break
|
| 669 |
+
if gt:
|
| 670 |
+
pair_id = gt.get("pair_id", r["id"].rstrip("AB_"))
|
| 671 |
+
if pair_id not in pair_groups:
|
| 672 |
+
pair_groups[pair_id] = {}
|
| 673 |
+
role = gt.get("pair_role", "A")
|
| 674 |
+
pair_groups[pair_id][role] = r
|
| 675 |
+
pair_groups[pair_id]["gt"] = gt
|
| 676 |
+
|
| 677 |
+
for pair_id, group in pair_groups.items():
|
| 678 |
+
if "A" in group and "B" in group:
|
| 679 |
+
score, reasoning = score_c04(
|
| 680 |
+
group["A"]["motion_parsed"],
|
| 681 |
+
group["B"]["motion_parsed"],
|
| 682 |
+
group["gt"],
|
| 683 |
+
)
|
| 684 |
+
# ์์ชฝ ๋ชจ๋์ ์ ์ ํ ๋น (์ด์ ์ ํ ๋ฒ๋ง ๋ฐ์)
|
| 685 |
+
group["A"]["score"] = score
|
| 686 |
+
group["A"]["reasoning"] = reasoning
|
| 687 |
+
group["B"]["score"] = 0 # ์์ B๋ 0 (A์์ ํฉ์ฐ)
|
| 688 |
+
group["B"]["reasoning"] = "scored in pair A"
|
| 689 |
+
|
| 690 |
+
# โโ ์นดํ
๊ณ ๋ฆฌ๋ณ ํฉ์ฐ โโ
|
| 691 |
+
for r in results:
|
| 692 |
+
cat = r["category"]
|
| 693 |
+
if r["score"] is not None and r["score"] > 0:
|
| 694 |
+
category_totals[cat] = category_totals.get(cat, 0) + r["score"]
|
| 695 |
+
|
| 696 |
+
# โโ ์ต์ข
WM Score ๊ณ์ฐ โโ
|
| 697 |
+
final = calculate_wm_score(category_totals)
|
| 698 |
+
final["scenario_details"] = results
|
| 699 |
+
|
| 700 |
+
return final
|
| 701 |
+
|
| 702 |
+
|
| 703 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 704 |
+
# SECTION 5: ์ ์ถ ํฌ๋งท
|
| 705 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 706 |
+
|
| 707 |
+
SUBMISSION_FORMAT = {
|
| 708 |
+
"model_name": "str โ ๋ชจ๋ธ๋ช
(์: VIDRAFT PROMETHEUS v1.0)",
|
| 709 |
+
"organization": "str โ ์กฐ์ง๋ช
",
|
| 710 |
+
"track": "str โ A | B | C",
|
| 711 |
+
"brain_model": "str โ ์ฌ์ฉํ ์ธ์ง ๋ชจ๋ธ (์: Kimi K2.5, GPT-4, custom RL)",
|
| 712 |
+
"motion_model": "str | null โ ๋ชจ์
์์ฑ ๋ชจ๋ธ (Track A๋ null ๊ฐ๋ฅ)",
|
| 713 |
+
"wm_score": "int โ ์๋ ์ฐ์ถ๋จ",
|
| 714 |
+
"grade": "str โ ์๋ ์ฐ์ถ๋จ",
|
| 715 |
+
"results_json": "str โ evaluate_track_a()์ ์ ์ฒด ์ถ๋ ฅ",
|
| 716 |
+
"performance_metrics": {
|
| 717 |
+
"fps": "float | null โ Track B/C๋ง",
|
| 718 |
+
"cognitive_latency_ms": "int | null",
|
| 719 |
+
"gpu": "str | null",
|
| 720 |
+
},
|
| 721 |
+
"demo_url": "str | null โ Track C๋ง",
|
| 722 |
+
"paper_url": "str | null โ ์ ํ",
|
| 723 |
+
}
|
| 724 |
+
|
| 725 |
+
|
| 726 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 727 |
+
# SECTION 6: ์ฌ์ฉ ์์
|
| 728 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 729 |
+
|
| 730 |
+
USAGE_EXAMPLES = """
|
| 731 |
+
# โโโ ์์ 1: OpenAI GPT-4๋ก ์ฐธ์ฌ โโโ
|
| 732 |
+
|
| 733 |
+
from wm_bench_eval import evaluate_track_a, SYSTEM_PROMPT
|
| 734 |
+
import openai
|
| 735 |
+
|
| 736 |
+
def gpt4_inference(system_prompt, user_prompt):
|
| 737 |
+
response = openai.chat.completions.create(
|
| 738 |
+
model="gpt-4o",
|
| 739 |
+
messages=[
|
| 740 |
+
{"role": "system", "content": system_prompt},
|
| 741 |
+
{"role": "user", "content": user_prompt},
|
| 742 |
+
],
|
| 743 |
+
max_tokens=150,
|
| 744 |
+
temperature=0.3,
|
| 745 |
+
)
|
| 746 |
+
return response.choices[0].message.content
|
| 747 |
+
|
| 748 |
+
results = evaluate_track_a(gpt4_inference)
|
| 749 |
+
print(f"WM Score: {results['wm_score']}/1000 (Grade {results['grade']})")
|
| 750 |
+
|
| 751 |
+
|
| 752 |
+
# โโโ ์์ 2: Claude๋ก ์ฐธ์ฌ โโโ
|
| 753 |
+
|
| 754 |
+
import anthropic
|
| 755 |
+
|
| 756 |
+
def claude_inference(system_prompt, user_prompt):
|
| 757 |
+
client = anthropic.Anthropic()
|
| 758 |
+
message = client.messages.create(
|
| 759 |
+
model="claude-sonnet-4-20250514",
|
| 760 |
+
max_tokens=150,
|
| 761 |
+
system=system_prompt,
|
| 762 |
+
messages=[{"role": "user", "content": user_prompt}],
|
| 763 |
+
)
|
| 764 |
+
return message.content[0].text
|
| 765 |
+
|
| 766 |
+
results = evaluate_track_a(claude_inference)
|
| 767 |
+
|
| 768 |
+
|
| 769 |
+
# โโโ ์์ 3: ๋ก์ปฌ LLM (vLLM)์ผ๋ก ์ฐธ์ฌ โโโ
|
| 770 |
+
|
| 771 |
+
from vllm import LLM, SamplingParams
|
| 772 |
+
|
| 773 |
+
llm = LLM(model="mistralai/Mistral-7B-Instruct-v0.3")
|
| 774 |
+
params = SamplingParams(max_tokens=150, temperature=0.3)
|
| 775 |
+
|
| 776 |
+
def local_inference(system_prompt, user_prompt):
|
| 777 |
+
prompt = f"[INST] {system_prompt}\\n\\n{user_prompt} [/INST]"
|
| 778 |
+
outputs = llm.generate([prompt], params)
|
| 779 |
+
return outputs[0].outputs[0].text
|
| 780 |
+
|
| 781 |
+
results = evaluate_track_a(local_inference)
|
| 782 |
+
|
| 783 |
+
|
| 784 |
+
# โโโ ์์ 4: ์ปค์คํ
RL ์์ด์ ํธ๋ก ์ฐธ์ฌ โโโ
|
| 785 |
+
|
| 786 |
+
def rl_agent_inference(system_prompt, user_prompt):
|
| 787 |
+
# scene_context์์ JSON ํ์ฑ
|
| 788 |
+
import json, re
|
| 789 |
+
match = re.search(r'scene_context = ({.*})', user_prompt, re.DOTALL)
|
| 790 |
+
scene = json.loads(match.group(1))
|
| 791 |
+
|
| 792 |
+
# RL ์์ด์ ํธ์ policy๋ก ํ๋จ
|
| 793 |
+
predict = my_rl_agent.predict(scene)
|
| 794 |
+
motion = my_rl_agent.decide_motion(scene, predict)
|
| 795 |
+
|
| 796 |
+
# WM Bench ํฌ๋งท์ผ๋ก ๋ณํ
|
| 797 |
+
return f"PREDICT: {predict}\\nMOTION: {motion}"
|
| 798 |
+
|
| 799 |
+
results = evaluate_track_a(rl_agent_inference)
|
| 800 |
+
|
| 801 |
+
|
| 802 |
+
# โโโ ์์ 5: ๊ฒฐ๊ณผ ์ ์ถ โโโ
|
| 803 |
+
|
| 804 |
+
import json
|
| 805 |
+
|
| 806 |
+
submission = {
|
| 807 |
+
"model_name": "My World Model v1.0",
|
| 808 |
+
"organization": "My Company",
|
| 809 |
+
"track": "A",
|
| 810 |
+
"brain_model": "GPT-4o",
|
| 811 |
+
"motion_model": None,
|
| 812 |
+
"wm_score": results["wm_score"],
|
| 813 |
+
"grade": results["grade"],
|
| 814 |
+
"results_json": json.dumps(results),
|
| 815 |
+
}
|
| 816 |
+
|
| 817 |
+
# HuggingFace์ ์ ์ถ
|
| 818 |
+
# huggingface_hub.upload_file(...)
|
| 819 |
+
"""
|
| 820 |
+
|
| 821 |
+
|
| 822 |
+
if __name__ == "__main__":
|
| 823 |
+
print("=" * 60)
|
| 824 |
+
print(" World Model Bench โ Evaluation Protocol v1.0")
|
| 825 |
+
print("=" * 60)
|
| 826 |
+
print()
|
| 827 |
+
print(" Tracks:")
|
| 828 |
+
for tid, t in TRACKS.items():
|
| 829 |
+
print(f" Track {tid}: {t['name']} (max {t['max_score']}pts)")
|
| 830 |
+
print()
|
| 831 |
+
print(f" Scenarios loaded: {len(SCENARIO_INPUTS)}")
|
| 832 |
+
print(f" System prompt: {len(SYSTEM_PROMPT)} chars")
|
| 833 |
+
print()
|
| 834 |
+
print(" How to participate:")
|
| 835 |
+
print(" 1. Write an inference function: (system, user) โ str")
|
| 836 |
+
print(" 2. Run: results = evaluate_track_a(your_fn)")
|
| 837 |
+
print(" 3. Submit results to HuggingFace")
|
| 838 |
+
print()
|
| 839 |
+
print(" No 3D environment needed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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
World Model Bench โ Quantitative Scoring Specification v1.0
|
| 3 |
+
|
| 4 |
+
์ค๊ณ ์์น:
|
| 5 |
+
1. ๋ชจ๋ ์ ์๋ ์ ๋์ โ ์ฃผ๊ด์ ํ๋จ 0%
|
| 6 |
+
2. ์ 3์ ์ฌํ ๊ฐ๋ฅ โ ๋์ผ ์
๋ ฅ โ ๋์ผ ์ ์
|
| 7 |
+
3. ์๋ ์ฑ์ โ ์ฝ๋๊ฐ ํ์ , ์ฌ๋์ด ํ์ ์ ํจ
|
| 8 |
+
4. ๋ฐ๋ฐ ๋ถ๊ฐ โ ๊ฐ ์ ์์ ์ํ์ /๋
ผ๋ฆฌ์ ๊ทผ๊ฑฐ
|
| 9 |
+
|
| 10 |
+
ํต์ฌ ๋ฉ์ปค๋์ฆ:
|
| 11 |
+
- ๋ชจ๋ ์๋๋ฆฌ์ค๋ "์
๋ ฅ(scene_context) โ ์ถ๋ ฅ(PREDICT+MOTION)" ์
|
| 12 |
+
- ์ฑ์ ์ ์ถ๋ ฅ ํ
์คํธ๋ฅผ ํ์ฑํ์ฌ ์ ๋ ์งํ๋ก ๋ณํ
|
| 13 |
+
- ํ์ฑ ๊ท์น์ด ๋ช
์์ ์ด๋ฏ๋ก ๋๊ฐ ํด๋ ๋์ผ ๊ฒฐ๊ณผ
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
import json
|
| 17 |
+
import re
|
| 18 |
+
from dataclasses import dataclass, field
|
| 19 |
+
from typing import List, Dict, Optional, Tuple
|
| 20 |
+
from enum import IntEnum
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 24 |
+
# SECTION 1: ์ถ๋ ฅ ํฌ๋งท ์ ์ (์ฑ์ ์ ์ ์ ์กฐ๊ฑด)
|
| 25 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 26 |
+
|
| 27 |
+
"""
|
| 28 |
+
๋ชจ๋ ์๋๋ชจ๋ธ์ ์๋ ํฌ๋งท์ผ๋ก ์ถ๋ ฅํด์ผ ์ฑ์ ๊ฐ๋ฅ:
|
| 29 |
+
|
| 30 |
+
INPUT (์์คํ
์ด ์ ๊ณต):
|
| 31 |
+
scene_context = {
|
| 32 |
+
"walls": {"left": float, "right": float, "front": float}, # ๊ฑฐ๋ฆฌ(m), null=์์
|
| 33 |
+
"ground": str, # "flat", "slope", "stairs"
|
| 34 |
+
"npc_nearby": bool,
|
| 35 |
+
"npc_type": str|null, # "beast", "woman", "man", null
|
| 36 |
+
"npc_behavior": str|null, # "stop", "approach", "charge", "wander"
|
| 37 |
+
"npc_distance": float|null,
|
| 38 |
+
"sound": str|null, # "aggressive growling", "footsteps", null
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
OUTPUT (๋ชจ๋ธ์ด ์ถ๋ ฅ):
|
| 42 |
+
Line 1: PREDICT: left=safe|danger(reason), right=..., fwd=..., back=...
|
| 43 |
+
Line 2: MOTION: a person [max 12 words describing action]
|
| 44 |
+
|
| 45 |
+
์ฑ์ ์ ์ด ๋ ์ค์ ํ์ฑํ์ฌ ์ํ.
|
| 46 |
+
"""
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 50 |
+
# SECTION 2: ํ์ โ ์ถ๋ ฅ ํ
์คํธ๋ฅผ ๊ตฌ์กฐํ๋ ๋ฐ์ดํฐ๋ก ๋ณํ
|
| 51 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 52 |
+
|
| 53 |
+
class PredictDirection:
|
| 54 |
+
"""PREDICT ์ค์ ํ ๋ฐฉํฅ์ ํ์ฑํ ๊ฒฐ๊ณผ"""
|
| 55 |
+
def __init__(self, raw: str):
|
| 56 |
+
self.raw = raw.strip()
|
| 57 |
+
self.is_safe = "safe" in self.raw.lower()
|
| 58 |
+
self.is_danger = "danger" in self.raw.lower()
|
| 59 |
+
# ๊ดํธ ์์ ์ด์ ์ถ์ถ: danger(wall) โ "wall"
|
| 60 |
+
match = re.search(r'\(([^)]+)\)', self.raw)
|
| 61 |
+
self.reason = match.group(1).lower() if match else None
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
def parse_predict_line(line: str) -> Dict[str, PredictDirection]:
|
| 65 |
+
"""
|
| 66 |
+
PREDICT: left=safe(open), right=danger(wall), fwd=danger(beast), back=safe
|
| 67 |
+
โ {"left": PredictDirection, "right": ..., "fwd": ..., "back": ...}
|
| 68 |
+
"""
|
| 69 |
+
result = {}
|
| 70 |
+
line = line.replace("PREDICT:", "").strip()
|
| 71 |
+
for part in line.split(","):
|
| 72 |
+
part = part.strip()
|
| 73 |
+
if "=" not in part:
|
| 74 |
+
continue
|
| 75 |
+
key, val = part.split("=", 1)
|
| 76 |
+
key = key.strip().lower()
|
| 77 |
+
# ์ ๊ทํ: left/right/fwd/forward/back/backward
|
| 78 |
+
if key in ("forward", "fwd", "front"):
|
| 79 |
+
key = "fwd"
|
| 80 |
+
if key in ("backward", "back"):
|
| 81 |
+
key = "back"
|
| 82 |
+
result[key] = PredictDirection(val)
|
| 83 |
+
return result
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
def parse_motion_line(line: str) -> str:
|
| 87 |
+
"""
|
| 88 |
+
MOTION: a person sprinting right in terror
|
| 89 |
+
โ "a person sprinting right in terror"
|
| 90 |
+
"""
|
| 91 |
+
return line.replace("MOTION:", "").strip().lower()
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 95 |
+
# SECTION 3: ํค์๋ ์ฌ์ โ ๊ฐ์ /ํ๋ ๊ฐ๋์ ์ ๋ ๊ธฐ์ค
|
| 96 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 97 |
+
|
| 98 |
+
"""
|
| 99 |
+
ํต์ฌ: "sprint"์ "walk"์ ์ฐจ์ด๋ฅผ ์์น๋ก ์ ์
|
| 100 |
+
์ด ์ฌ์ ์ด ๋ฒค์น๋งํฌ์ ์ฌํ์ฑ์ ๋ณด์ฅํจ
|
| 101 |
+
์ 3์๊ฐ ์ด ์ฌ์ ์ผ๋ก ๋์ผํ ์ฑ์ ๊ฒฐ๊ณผ๋ฅผ ์ป์ ์ ์์
|
| 102 |
+
"""
|
| 103 |
+
|
| 104 |
+
class Intensity(IntEnum):
|
| 105 |
+
"""ํ๋ ๊ฐ๋ ๋ ๋ฒจ (0~5)"""
|
| 106 |
+
NONE = 0 # ๋ฌด๋ฐ์
|
| 107 |
+
MINIMAL = 1 # ๋ฏธ์ฝํ ๋ฐ์
|
| 108 |
+
LOW = 2 # ๊ฐ๋ฒผ์ด ๋ฐ์
|
| 109 |
+
MEDIUM = 3 # ๋ณดํต ๋ฐ์
|
| 110 |
+
HIGH = 4 # ๊ฐํ ๋ฐ์
|
| 111 |
+
EXTREME = 5 # ๊ทน๋จ์ ๋ฐ์
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
# ํ๋ ํค์๋ โ ๊ฐ๋ ๋งคํ (์ํ๋ฒณ ์, ๊ฒ์ ์ฉ์ด)
|
| 115 |
+
ACTION_INTENSITY: Dict[str, int] = {
|
| 116 |
+
# EXTREME (5)
|
| 117 |
+
"desperate": 5, "desperately": 5, "frantic": 5, "frantically": 5,
|
| 118 |
+
"flee": 5, "fleeing": 5, "panic": 5, "panicking": 5,
|
| 119 |
+
"terror": 5, "terrified": 5,
|
| 120 |
+
# HIGH (4)
|
| 121 |
+
"bolt": 4, "bolting": 4, "dash": 4, "dashing": 4,
|
| 122 |
+
"escape": 4, "escaping": 4, "run": 4, "running": 4,
|
| 123 |
+
"rush": 4, "rushing": 4, "sprint": 4, "sprinting": 4,
|
| 124 |
+
# MEDIUM (3)
|
| 125 |
+
"hurry": 3, "hurrying": 3, "jog": 3, "jogging": 3,
|
| 126 |
+
"quick": 3, "quickly": 3, "retreat": 3, "retreating": 3,
|
| 127 |
+
"step back": 3, "stepping back": 3, "back away": 3,
|
| 128 |
+
# LOW (2)
|
| 129 |
+
"cautious": 2, "cautiously": 2, "slow": 2, "slowly": 2,
|
| 130 |
+
"walk": 2, "walking": 2, "turn": 2, "turning": 2,
|
| 131 |
+
"move": 2, "moving": 2, "shift": 2,
|
| 132 |
+
# MINIMAL (1)
|
| 133 |
+
"stand": 1, "standing": 1, "pause": 1, "pausing": 1,
|
| 134 |
+
"freeze": 1, "freezing": 1, "stop": 1, "stopping": 1,
|
| 135 |
+
"observe": 1, "watching": 1, "look": 1, "looking": 1,
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
# ๊ฐ์ ํค์๋ โ ๊ฐ๋ ๋งคํ
|
| 139 |
+
EMOTION_INTENSITY: Dict[str, int] = {
|
| 140 |
+
# EXTREME (5)
|
| 141 |
+
"terror": 5, "terrified": 5, "horrified": 5, "desperate": 5,
|
| 142 |
+
"frantic": 5, "panic": 5, "anguish": 5,
|
| 143 |
+
# HIGH (4)
|
| 144 |
+
"fear": 4, "afraid": 4, "scared": 4, "alarmed": 4,
|
| 145 |
+
"distress": 4, "shock": 4, "dread": 4,
|
| 146 |
+
# MEDIUM (3)
|
| 147 |
+
"anxious": 3, "nervous": 3, "tense": 3, "worried": 3,
|
| 148 |
+
"uneasy": 3, "wary": 3, "alert": 3, "startled": 3,
|
| 149 |
+
# LOW (2)
|
| 150 |
+
"cautious": 2, "careful": 2, "vigilant": 2, "watchful": 2,
|
| 151 |
+
"guarded": 2, "attentive": 2,
|
| 152 |
+
# MINIMAL (1)
|
| 153 |
+
"calm": 1, "relaxed": 1, "composed": 1, "steady": 1,
|
| 154 |
+
"neutral": 1, "normal": 1,
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
# ๋ฐฉํฅ ํค์๋ โ MOTION์์ ์ด๋ ๋ฐฉํฅ ์ถ์ถ
|
| 158 |
+
DIRECTION_KEYWORDS: Dict[str, str] = {
|
| 159 |
+
"left": "left", "leftward": "left",
|
| 160 |
+
"right": "right", "rightward": "right",
|
| 161 |
+
"forward": "fwd", "ahead": "fwd", "front": "fwd",
|
| 162 |
+
"backward": "back", "backwards": "back", "back": "back",
|
| 163 |
+
"behind": "back", "around": "back", # "turn around" = back
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
def get_action_intensity(motion_text: str) -> int:
|
| 168 |
+
"""๋ชจ์
ํ
์คํธ์์ ์ต๋ ํ๋ ๊ฐ๋ ์ถ์ถ"""
|
| 169 |
+
words = motion_text.lower()
|
| 170 |
+
max_intensity = 0
|
| 171 |
+
for keyword, intensity in ACTION_INTENSITY.items():
|
| 172 |
+
if keyword in words:
|
| 173 |
+
max_intensity = max(max_intensity, intensity)
|
| 174 |
+
return max_intensity
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
def get_emotion_intensity(motion_text: str) -> int:
|
| 178 |
+
"""๋ชจ์
ํ
์คํธ์์ ์ต๋ ๊ฐ์ ๊ฐ๋ ์ถ์ถ"""
|
| 179 |
+
words = motion_text.lower()
|
| 180 |
+
max_intensity = 0
|
| 181 |
+
for keyword, intensity in EMOTION_INTENSITY.items():
|
| 182 |
+
if keyword in words:
|
| 183 |
+
max_intensity = max(max_intensity, intensity)
|
| 184 |
+
return max_intensity
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
def get_motion_direction(motion_text: str) -> Optional[str]:
|
| 188 |
+
"""๋ชจ์
ํ
์คํธ์์ ์ด๋ ๋ฐฉํฅ ์ถ์ถ"""
|
| 189 |
+
words = motion_text.lower()
|
| 190 |
+
for keyword, direction in DIRECTION_KEYWORDS.items():
|
| 191 |
+
if keyword in words:
|
| 192 |
+
return direction
|
| 193 |
+
return None
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
def count_descriptors(motion_text: str) -> int:
|
| 197 |
+
"""๋ชจ์
ํ
์คํธ์ ๊ฐ์ /ํ๋ ์์์ด ์ด ๊ฐ์"""
|
| 198 |
+
words = motion_text.lower()
|
| 199 |
+
count = 0
|
| 200 |
+
for keyword in ACTION_INTENSITY:
|
| 201 |
+
if keyword in words:
|
| 202 |
+
count += 1
|
| 203 |
+
for keyword in EMOTION_INTENSITY:
|
| 204 |
+
if keyword in words:
|
| 205 |
+
count += 1
|
| 206 |
+
return count
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 210 |
+
# SECTION 4: 10๊ฐ ์นดํ
๊ณ ๋ฆฌ๋ณ ์ ๋ ์ฑ์ ํจ์
|
| 211 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 212 |
+
|
| 213 |
+
"""
|
| 214 |
+
๊ฐ ํจ์๋:
|
| 215 |
+
- ์
๋ ฅ: scene_context(dict) + model_output(str) + ground_truth(dict)
|
| 216 |
+
- ์ถ๋ ฅ: score(int, 0~20) + reasoning(str)
|
| 217 |
+
- ๊ฒฐ์ ๋ก ์ : ๊ฐ์ ์
๋ ฅ โ ํญ์ ๊ฐ์ ์ ์
|
| 218 |
+
"""
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
# โโโ C01: Environmental Awareness (ํ๊ฒฝ ์ธ์ ์ ํ๋) โโโ
|
| 222 |
+
|
| 223 |
+
def score_c01(scene: dict, predict: dict, ground_truth: dict) -> Tuple[int, str]:
|
| 224 |
+
"""
|
| 225 |
+
์ฑ์ ๊ธฐ์ค: PREDICT์ ๊ฐ ๋ฐฉํฅ์ด ์ค์ ํ๊ฒฝ๊ณผ ์ผ์นํ๋๊ฐ
|
| 226 |
+
|
| 227 |
+
ground_truth = {
|
| 228 |
+
"left": "safe" | "danger",
|
| 229 |
+
"right": "safe" | "danger",
|
| 230 |
+
"fwd": "safe" | "danger",
|
| 231 |
+
"back": "safe" | "danger",
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
์ฑ์ :
|
| 235 |
+
4๋ฐฉํฅ ๋ชจ๋ ์ ํ = 20์
|
| 236 |
+
3๋ฐฉํฅ ์ ํ = 15์
|
| 237 |
+
2๋ฐฉํฅ ์ ํ = 10์
|
| 238 |
+
1๋ฐฉํฅ ์ ํ = 5์
|
| 239 |
+
0๋ฐฉํฅ ์ ํ = 0์
|
| 240 |
+
"""
|
| 241 |
+
directions = ["left", "right", "fwd", "back"]
|
| 242 |
+
correct = 0
|
| 243 |
+
details = []
|
| 244 |
+
|
| 245 |
+
for d in directions:
|
| 246 |
+
if d not in predict:
|
| 247 |
+
details.append(f"{d}: ์ถ๋ ฅ ์์ (์ค๋ต)")
|
| 248 |
+
continue
|
| 249 |
+
|
| 250 |
+
gt_safe = ground_truth.get(d) == "safe"
|
| 251 |
+
pred_safe = predict[d].is_safe
|
| 252 |
+
|
| 253 |
+
if gt_safe == pred_safe:
|
| 254 |
+
correct += 1
|
| 255 |
+
details.append(f"{d}: ์ ๋ต (GT={ground_truth[d]}, PRED={'safe' if pred_safe else 'danger'})")
|
| 256 |
+
else:
|
| 257 |
+
details.append(f"{d}: ์ค๋ต (GT={ground_truth[d]}, PRED={'safe' if pred_safe else 'danger'})")
|
| 258 |
+
|
| 259 |
+
score_map = {4: 20, 3: 15, 2: 10, 1: 5, 0: 0}
|
| 260 |
+
score = score_map[correct]
|
| 261 |
+
reasoning = f"ํ๊ฒฝ ์ธ์: {correct}/4 ๋ฐฉํฅ ์ ํ. " + "; ".join(details)
|
| 262 |
+
|
| 263 |
+
return score, reasoning
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
# โโโ C02: Entity Recognition (๊ฐ์ฒด ์ธ์ ๋ฐ ๋ถ๋ฅ) โโโ
|
| 267 |
+
|
| 268 |
+
def score_c02(scene: dict, predict: dict, ground_truth: dict) -> Tuple[int, str]:
|
| 269 |
+
"""
|
| 270 |
+
์ฑ์ ๊ธฐ์ค: PREDICT์์ ๊ฐ์ฒด๋ฅผ ์ฌ๋ฐ๋ฅธ ์ ํ์ผ๋ก ์ธ์ํ๋๊ฐ
|
| 271 |
+
|
| 272 |
+
ground_truth = {
|
| 273 |
+
"entity_type": "beast" | "woman" | "man" | None,
|
| 274 |
+
"entity_direction": "left" | "right" | "fwd" | "back",
|
| 275 |
+
"is_threat": True | False,
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 279 |
+
๊ฐ์ฒด ๋ฐฉํฅ ์ ํ: 8์ (ํด๋น ๋ฐฉํฅ์ danger ํ์)
|
| 280 |
+
๊ฐ์ฒด ์ ํ ์ ํ: 8์ (danger ๊ดํธ ์์ ์ฌ๋ฐ๋ฅธ ์ ํ)
|
| 281 |
+
์ํ ์์ค ์ ํ: 4์ (beast=danger, woman=danger ๋๋ safe ๋ชจ๋ ๊ฐ๋ฅ)
|
| 282 |
+
"""
|
| 283 |
+
score = 0
|
| 284 |
+
details = []
|
| 285 |
+
|
| 286 |
+
gt_dir = ground_truth.get("entity_direction")
|
| 287 |
+
gt_type = ground_truth.get("entity_type")
|
| 288 |
+
|
| 289 |
+
if gt_type is None:
|
| 290 |
+
# ๊ฐ์ฒด ์์ โ ๋ชจ๋ ๋ฐฉํฅ์ด safe์ฌ์ผ ํจ
|
| 291 |
+
all_safe = all(p.is_safe for p in predict.values())
|
| 292 |
+
if all_safe:
|
| 293 |
+
score = 20
|
| 294 |
+
details.append("๊ฐ์ฒด ์์ ์ ํ ์ธ์")
|
| 295 |
+
else:
|
| 296 |
+
danger_dirs = [d for d, p in predict.items() if p.is_danger]
|
| 297 |
+
score = 10 # ๋ถ๋ถ ์ ์
|
| 298 |
+
details.append(f"๊ฐ์ฒด ์๋๋ฐ {danger_dirs}๋ฅผ danger๋ก ์ค์ธ์")
|
| 299 |
+
else:
|
| 300 |
+
# ๊ฐ์ฒด ์กด์ฌ
|
| 301 |
+
# 1) ๋ฐฉํฅ ์ ํ๋ (8์ )
|
| 302 |
+
if gt_dir in predict and predict[gt_dir].is_danger:
|
| 303 |
+
score += 8
|
| 304 |
+
details.append(f"๋ฐฉํฅ ์ ํ: {gt_dir}=danger")
|
| 305 |
+
else:
|
| 306 |
+
details.append(f"๋ฐฉํฅ ์ค๋ต: {gt_dir}์ danger ์์")
|
| 307 |
+
|
| 308 |
+
# 2) ์ ํ ์ ํ๋ (8์ )
|
| 309 |
+
if gt_dir in predict and predict[gt_dir].reason:
|
| 310 |
+
pred_reason = predict[gt_dir].reason
|
| 311 |
+
if gt_type in pred_reason:
|
| 312 |
+
score += 8
|
| 313 |
+
details.append(f"์ ํ ์ ํ: {pred_reason} ์ {gt_type} ํฌํจ")
|
| 314 |
+
else:
|
| 315 |
+
# ๋ถ๋ถ ์ ์: ์ํ์ผ๋ก ์ธ์์ ํ์ผ๋ ์ ํ์ด ๋ค๋ฆ
|
| 316 |
+
score += 3
|
| 317 |
+
details.append(f"์ ํ ๋ถ๋ถ: {pred_reason} (์ ๋ต: {gt_type})")
|
| 318 |
+
else:
|
| 319 |
+
details.append("์ ํ ์ ๋ณด ์์")
|
| 320 |
+
|
| 321 |
+
# 3) ์ํ ์์ค (4์ )
|
| 322 |
+
gt_threat = ground_truth.get("is_threat", False)
|
| 323 |
+
if gt_dir in predict:
|
| 324 |
+
pred_danger = predict[gt_dir].is_danger
|
| 325 |
+
if gt_threat == pred_danger:
|
| 326 |
+
score += 4
|
| 327 |
+
details.append(f"์ํ ์์ค ์ ํ")
|
| 328 |
+
elif not gt_threat and not pred_danger:
|
| 329 |
+
score += 4
|
| 330 |
+
details.append(f"๋น์ํ ์ ํ ์ธ์")
|
| 331 |
+
|
| 332 |
+
reasoning = f"๊ฐ์ฒด ์ธ์: {score}/20. " + "; ".join(details)
|
| 333 |
+
return score, reasoning
|
| 334 |
+
|
| 335 |
+
|
| 336 |
+
# โโโ C03: Predictive Reasoning (์์ธก ๊ธฐ๋ฐ ์ถ๋ก ) โโโ
|
| 337 |
+
|
| 338 |
+
def score_c03(scene: dict, predict: dict, motion: str, ground_truth: dict) -> Tuple[int, str]:
|
| 339 |
+
"""
|
| 340 |
+
์ฑ์ ๊ธฐ์ค: danger ๋ฐฉํฅ์ ํผํ๊ณ safe ๋ฐฉํฅ์ผ๋ก ์ด๋ํ๋๊ฐ
|
| 341 |
+
|
| 342 |
+
ground_truth = {
|
| 343 |
+
"danger_directions": ["fwd", "left"], # ์ํํ ๋ฐฉํฅ๋ค
|
| 344 |
+
"safe_directions": ["right", "back"], # ์์ ํ ๋ฐฉํฅ๋ค
|
| 345 |
+
"optimal_direction": "right", # ์ต์ ๋ฐฉํฅ
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 349 |
+
danger ๋ฐฉํฅ ํํผ: 8์ (์ด๋ ๋ฐฉํฅ์ด danger๊ฐ ์๋)
|
| 350 |
+
safe ๋ฐฉํฅ ์ ํ: 6์ (์ด๋ ๋ฐฉํฅ์ด safe ์ค ํ๋)
|
| 351 |
+
์ต์ ๋ฐฉํฅ ์ ํ: 4์ (์ต์ ๋ฐฉํฅ ์ ํํ ์ ํ)
|
| 352 |
+
PREDICT-MOTION ์ผ๊ด์ฑ: 2์ (PREDICT์์ danger๋ก ์์ธกํ ๋ฐฉํฅ์ผ๋ก ์ ๊ฐ)
|
| 353 |
+
"""
|
| 354 |
+
score = 0
|
| 355 |
+
details = []
|
| 356 |
+
|
| 357 |
+
# ๋ชจ์
์์ ์ด๋ ๋ฐฉํฅ ์ถ์ถ
|
| 358 |
+
motion_dir = get_motion_direction(motion)
|
| 359 |
+
danger_dirs = ground_truth.get("danger_directions", [])
|
| 360 |
+
safe_dirs = ground_truth.get("safe_directions", [])
|
| 361 |
+
optimal = ground_truth.get("optimal_direction")
|
| 362 |
+
|
| 363 |
+
if motion_dir is None:
|
| 364 |
+
details.append("์ด๋ ๋ฐฉํฅ ์ถ์ถ ๋ถ๊ฐ (๋ฐฉํฅ ํค์๋ ์์)")
|
| 365 |
+
# ๋ฐฉํฅ์ ์์ง๋ง ํ๋์ด ํฉ๋ฆฌ์ ์ธ์ง ํ์ธ
|
| 366 |
+
intensity = get_action_intensity(motion)
|
| 367 |
+
if intensity >= 3 and len(danger_dirs) > 0:
|
| 368 |
+
score += 4 # ์ํ์ ๋ํ ๋ฐ์์ ์์
|
| 369 |
+
details.append(f"๋ฐฉํฅ ๋ถ๋ช
์ด๋ ๋ฐ์ ์กด์ฌ (๊ฐ๋ {intensity})")
|
| 370 |
+
else:
|
| 371 |
+
# 1) danger ๋ฐฉํฅ ํํผ (8์ )
|
| 372 |
+
if motion_dir not in danger_dirs:
|
| 373 |
+
score += 8
|
| 374 |
+
details.append(f"์ํ ๋ฐฉํฅ ํํผ: {motion_dir} not in {danger_dirs}")
|
| 375 |
+
else:
|
| 376 |
+
details.append(f"์ํ ๋ฐฉํฅ์ผ๋ก ์ด๋: {motion_dir} in {danger_dirs}")
|
| 377 |
+
|
| 378 |
+
# 2) safe ๋ฐฉํฅ ์ ํ (6์ )
|
| 379 |
+
if motion_dir in safe_dirs:
|
| 380 |
+
score += 6
|
| 381 |
+
details.append(f"์์ ๋ฐฉํฅ ์ ํ: {motion_dir} in {safe_dirs}")
|
| 382 |
+
else:
|
| 383 |
+
details.append(f"์์ ํ์ง ์์ ๋ฐฉํฅ: {motion_dir} not in {safe_dirs}")
|
| 384 |
+
|
| 385 |
+
# 3) ์ต์ ๋ฐฉํฅ (4์ )
|
| 386 |
+
if motion_dir == optimal:
|
| 387 |
+
score += 4
|
| 388 |
+
details.append(f"์ต์ ๋ฐฉํฅ ์ ํ: {motion_dir} == {optimal}")
|
| 389 |
+
else:
|
| 390 |
+
details.append(f"์ต์ ์๋: {motion_dir} != {optimal}")
|
| 391 |
+
|
| 392 |
+
# 4) PREDICT-MOTION ์ผ๊ด์ฑ (2์ )
|
| 393 |
+
if motion_dir and motion_dir in predict:
|
| 394 |
+
pred = predict[motion_dir]
|
| 395 |
+
if pred.is_safe:
|
| 396 |
+
score += 2
|
| 397 |
+
details.append("PREDICT-MOTION ์ผ๊ด: safe ๋ฐฉํฅ์ผ๋ก ์ด๋")
|
| 398 |
+
else:
|
| 399 |
+
details.append("PREDICT-MOTION ๋ถ์ผ์น: danger๋ก ์์ธกํ ๋ฐฉํฅ์ผ๋ก ์ด๋")
|
| 400 |
+
|
| 401 |
+
reasoning = f"์์ธก ์ถ๋ก : {score}/20. " + "; ".join(details)
|
| 402 |
+
return score, reasoning
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
# โโโ C04: Threat Differentiation (์ํ ์ ํ๋ณ ์ฐจ๋ณ ๋ฐ์) โโโ
|
| 406 |
+
|
| 407 |
+
def score_c04(
|
| 408 |
+
motion_a: str, motion_b: str,
|
| 409 |
+
ground_truth: dict
|
| 410 |
+
) -> Tuple[int, str]:
|
| 411 |
+
"""
|
| 412 |
+
์ฑ์ ๊ธฐ์ค: ๋ ์ํ์ ๋ํ ๋ฐ์ ๊ฐ๋ ์ฐจ์ด๊ฐ ์ฌ๋ฐ๋ฅธ๊ฐ
|
| 413 |
+
|
| 414 |
+
๊ฐ์ scene์ (A) ๋งน์ ์ ๊ทผ vs (B) ์ฌ์ฑ ์ ๊ทผ
|
| 415 |
+
โ A์ ๋ฐ์ ๊ฐ๋๊ฐ B๋ณด๋ค ๋์์ผ ํจ
|
| 416 |
+
|
| 417 |
+
ground_truth = {
|
| 418 |
+
"scenario_a_type": "beast_charge",
|
| 419 |
+
"scenario_b_type": "woman_approach",
|
| 420 |
+
"expected_a_higher": True, # A๊ฐ ๋ ๊ฐํ ๋ฐ์์ด์ด์ผ
|
| 421 |
+
"min_intensity_diff": 2, # ์ต์ ๊ฐ๋ ์ฐจ์ด
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 425 |
+
๋ฐ์ ๋ฐฉํฅ ์ ํ: 8์ (A > B ๋๋ B > A ๋ฐฉํฅ์ด ๋ง์)
|
| 426 |
+
๊ฐ๋ ์ฐจ์ด ์ถฉ๋ถ: 8์ (์ฐจ์ด๊ฐ min_intensity_diff ์ด์)
|
| 427 |
+
์์ชฝ ๋ชจ๋ ์ ์ ๋ฐ์: 4์ (๋ ๋ค 0์ด ์๋)
|
| 428 |
+
"""
|
| 429 |
+
score = 0
|
| 430 |
+
details = []
|
| 431 |
+
|
| 432 |
+
int_a = get_action_intensity(motion_a)
|
| 433 |
+
int_b = get_action_intensity(motion_b)
|
| 434 |
+
expected_higher = ground_truth.get("expected_a_higher", True)
|
| 435 |
+
min_diff = ground_truth.get("min_intensity_diff", 2)
|
| 436 |
+
|
| 437 |
+
diff = int_a - int_b
|
| 438 |
+
|
| 439 |
+
# 1) ๋ฐฉํฅ ์ ํ (8์ )
|
| 440 |
+
if expected_higher and diff > 0:
|
| 441 |
+
score += 8
|
| 442 |
+
details.append(f"๋ฐ์ ๋ฐฉํฅ ์ ํ: A({int_a}) > B({int_b})")
|
| 443 |
+
elif not expected_higher and diff < 0:
|
| 444 |
+
score += 8
|
| 445 |
+
details.append(f"๋ฐ์ ๋ฐฉํฅ ์ ํ: B({int_b}) > A({int_a})")
|
| 446 |
+
elif diff == 0:
|
| 447 |
+
score += 2 # ๋ถ๋ถ ์ ์: ์ฐจ์ด๊ฐ ์์
|
| 448 |
+
details.append(f"๋ฐ์ ๋์ผ: A({int_a}) == B({int_b})")
|
| 449 |
+
else:
|
| 450 |
+
details.append(f"๋ฐ์ ๋ฐฉํฅ ์ญ์ : A({int_a}), B({int_b})")
|
| 451 |
+
|
| 452 |
+
# 2) ๊ฐ๋ ์ฐจ์ด (8์ )
|
| 453 |
+
actual_diff = abs(diff)
|
| 454 |
+
if actual_diff >= min_diff:
|
| 455 |
+
score += 8
|
| 456 |
+
details.append(f"๊ฐ๋ ์ฐจ์ด ์ถฉ๋ถ: |{diff}| >= {min_diff}")
|
| 457 |
+
elif actual_diff >= 1:
|
| 458 |
+
score += 4
|
| 459 |
+
details.append(f"๊ฐ๋ ์ฐจ์ด ๋ถ์กฑ: |{diff}| < {min_diff}")
|
| 460 |
+
else:
|
| 461 |
+
details.append(f"๊ฐ๋ ์ฐจ์ด ์์: |{diff}| = 0")
|
| 462 |
+
|
| 463 |
+
# 3) ์์ชฝ ๋ฐ์ ์กด์ฌ (4์ )
|
| 464 |
+
if int_a > 0 and int_b > 0:
|
| 465 |
+
score += 4
|
| 466 |
+
details.append("์์ชฝ ๋ชจ๋ ๋ฐ์ ์กด์ฌ")
|
| 467 |
+
elif int_a > 0 or int_b > 0:
|
| 468 |
+
score += 2
|
| 469 |
+
details.append("ํ์ชฝ๋ง ๋ฐ์ ์กด์ฌ")
|
| 470 |
+
else:
|
| 471 |
+
details.append("์์ชฝ ๋ชจ๋ ๋ฌด๋ฐ์")
|
| 472 |
+
|
| 473 |
+
reasoning = f"์ํ ์ฐจ๋ณ: {score}/20. A='{motion_a}' (๊ฐ๋{int_a}), B='{motion_b}' (๊ฐ๋{int_b}). " + "; ".join(details)
|
| 474 |
+
return score, reasoning
|
| 475 |
+
|
| 476 |
+
|
| 477 |
+
# โโโ C05: Emotional Escalation (์์จ ๊ฐ์ ์์ค์ปฌ๋ ์ด์
) โโโ
|
| 478 |
+
|
| 479 |
+
def score_c05(motion_sequence: List[str], ground_truth: dict) -> Tuple[int, str]:
|
| 480 |
+
"""
|
| 481 |
+
์ฑ์ ๊ธฐ์ค: ์๊ฐ์ ๋ฐ๋ฅธ ๊ฐ์ ๊ฐ๋๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ๋ณํํ๋๊ฐ
|
| 482 |
+
|
| 483 |
+
motion_sequence = ๊ฐ์ ์ํ ์ง์ ์ ์ฐ์ 3~5ํ ๋ชจ์
์ถ๋ ฅ
|
| 484 |
+
|
| 485 |
+
ground_truth = {
|
| 486 |
+
"expected_trend": "increasing" | "decreasing" | "stable",
|
| 487 |
+
"threat_type": "sustained_charge",
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 491 |
+
์ถ์ธ ๋ฐฉํฅ ์ ํ: 10์
|
| 492 |
+
๋จ์กฐ ์ฆ๊ฐ/๊ฐ์: 6์ (๋ค๋ก ๊ฐ์ง ์์)
|
| 493 |
+
์ต์ข
๊ฐ๋ ์ ์ : 4์
|
| 494 |
+
"""
|
| 495 |
+
score = 0
|
| 496 |
+
details = []
|
| 497 |
+
|
| 498 |
+
if len(motion_sequence) < 2:
|
| 499 |
+
return 0, "์ํ์ค ๊ธธ์ด ๋ถ์กฑ (์ต์ 2ํ ํ์)"
|
| 500 |
+
|
| 501 |
+
intensities = [get_action_intensity(m) + get_emotion_intensity(m)
|
| 502 |
+
for m in motion_sequence]
|
| 503 |
+
|
| 504 |
+
expected = ground_truth.get("expected_trend", "increasing")
|
| 505 |
+
|
| 506 |
+
# ์ถ์ธ ๊ณ์ฐ
|
| 507 |
+
diffs = [intensities[i+1] - intensities[i] for i in range(len(intensities)-1)]
|
| 508 |
+
avg_diff = sum(diffs) / len(diffs)
|
| 509 |
+
|
| 510 |
+
# 1) ์ถ์ธ ๋ฐฉํฅ (10์ )
|
| 511 |
+
if expected == "increasing":
|
| 512 |
+
if avg_diff > 0:
|
| 513 |
+
score += 10
|
| 514 |
+
details.append(f"์ฆ๊ฐ ์ถ์ธ ์ ํ: ํ๊ท ๋ณํ +{avg_diff:.1f}")
|
| 515 |
+
elif avg_diff == 0:
|
| 516 |
+
score += 3
|
| 517 |
+
details.append(f"์ถ์ธ ๋ณํ ์์ (๊ธฐ๋: ์ฆ๊ฐ)")
|
| 518 |
+
else:
|
| 519 |
+
details.append(f"์ถ์ธ ์ญ์ (๊ธฐ๋: ์ฆ๊ฐ, ์ค์ : ๊ฐ์ {avg_diff:.1f})")
|
| 520 |
+
elif expected == "decreasing":
|
| 521 |
+
if avg_diff < 0:
|
| 522 |
+
score += 10
|
| 523 |
+
details.append(f"๊ฐ์ ์ถ์ธ ์ ํ: ํ๊ท ๋ณํ {avg_diff:.1f}")
|
| 524 |
+
elif avg_diff == 0:
|
| 525 |
+
score += 3
|
| 526 |
+
details.append(f"์ถ์ธ ๋ณํ ์์ (๊ธฐ๋: ๊ฐ์)")
|
| 527 |
+
else:
|
| 528 |
+
details.append(f"์ถ์ธ ์ญ์ (๊ธฐ๋: ๊ฐ์, ์ค์ : ์ฆ๊ฐ)")
|
| 529 |
+
elif expected == "stable":
|
| 530 |
+
if abs(avg_diff) <= 0.5:
|
| 531 |
+
score += 10
|
| 532 |
+
details.append(f"์์ ์ ์ง ์ ํ: ํ๊ท ๋ณํ {avg_diff:.1f}")
|
| 533 |
+
else:
|
| 534 |
+
score += 4
|
| 535 |
+
details.append(f"๋ถ์์ : ํ๊ท ๋ณํ {avg_diff:.1f} (๊ธฐ๋: ์์ )")
|
| 536 |
+
|
| 537 |
+
# 2) ๋จ์กฐ์ฑ (6์ ) โ ์ฆ๊ฐ ์ถ์ธ์์ ์ค๊ฐ์ ๊ฐ์ ์์
|
| 538 |
+
if expected == "increasing":
|
| 539 |
+
monotonic = all(d >= 0 for d in diffs)
|
| 540 |
+
elif expected == "decreasing":
|
| 541 |
+
monotonic = all(d <= 0 for d in diffs)
|
| 542 |
+
else:
|
| 543 |
+
monotonic = all(abs(d) <= 1 for d in diffs)
|
| 544 |
+
|
| 545 |
+
if monotonic:
|
| 546 |
+
score += 6
|
| 547 |
+
details.append("๋จ์กฐ์ ๋ณํ (์ญํ ์์)")
|
| 548 |
+
else:
|
| 549 |
+
non_monotonic_count = sum(1 for d in diffs if
|
| 550 |
+
(expected == "increasing" and d < 0) or
|
| 551 |
+
(expected == "decreasing" and d > 0))
|
| 552 |
+
if non_monotonic_count <= 1:
|
| 553 |
+
score += 3
|
| 554 |
+
details.append(f"์ฝ๊ฐ์ ์ญํ ({non_monotonic_count}ํ)")
|
| 555 |
+
else:
|
| 556 |
+
details.append(f"์ญํ ๋ค์ ({non_monotonic_count}ํ)")
|
| 557 |
+
|
| 558 |
+
# 3) ์ต์ข
๊ฐ๋ (4์ )
|
| 559 |
+
if expected == "increasing" and intensities[-1] >= 6:
|
| 560 |
+
score += 4
|
| 561 |
+
details.append(f"์ต์ข
๊ฐ๋ ์ถฉ๋ถ: {intensities[-1]}")
|
| 562 |
+
elif expected == "decreasing" and intensities[-1] <= 3:
|
| 563 |
+
score += 4
|
| 564 |
+
details.append(f"์ต์ข
๊ฐ๋ ์ ์ ํ ๋ฎ์: {intensities[-1]}")
|
| 565 |
+
elif expected == "stable" and 2 <= intensities[-1] <= 4:
|
| 566 |
+
score += 4
|
| 567 |
+
details.append(f"์ต์ข
๊ฐ๋ ์์ ์ : {intensities[-1]}")
|
| 568 |
+
else:
|
| 569 |
+
score += 1
|
| 570 |
+
details.append(f"์ต์ข
๊ฐ๋: {intensities[-1]} (๊ฐ์ ์ฌ์ง)")
|
| 571 |
+
|
| 572 |
+
reasoning = f"๊ฐ์ ์์ค์ปฌ๋ ์ด์
: {score}/20. ๊ฐ๋ ์ํ์ค: {intensities}. " + "; ".join(details)
|
| 573 |
+
return score, reasoning
|
| 574 |
+
|
| 575 |
+
|
| 576 |
+
# โโโ C06: Contextual Memory (๋งฅ๋ฝ ๊ธฐ์ต ํ์ฉ) โโโ
|
| 577 |
+
|
| 578 |
+
def score_c06(
|
| 579 |
+
motion_without_memory: str,
|
| 580 |
+
motion_with_memory: str,
|
| 581 |
+
memory_content: str,
|
| 582 |
+
ground_truth: dict
|
| 583 |
+
) -> Tuple[int, str]:
|
| 584 |
+
"""
|
| 585 |
+
์ฑ์ ๊ธฐ์ค: ๊ธฐ์ต์ด ์์ ๋์ ์์ ๋ ํ๋์ด ํฉ๋ฆฌ์ ์ผ๋ก ๋ฌ๋ผ์ง๋๊ฐ
|
| 586 |
+
|
| 587 |
+
ground_truth = {
|
| 588 |
+
"memory_relevant": True, # ๊ธฐ์ต์ด ํ ์ํฉ์ ๊ด๋ จ ์๋๊ฐ
|
| 589 |
+
"expected_change": "direction" | "intensity" | "both",
|
| 590 |
+
"memory_direction_avoid": "right", # ๊ธฐ์ต์ ์ํด ํผํด์ผ ํ ๋ฐฉํฅ
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 594 |
+
๊ธฐ์ต ์ ๋ฌด ์ฐจ์ด ์กด์ฌ: 8์ (๋ ์ถ๋ ฅ์ด ๋ค๋ฆ)
|
| 595 |
+
๋ณํ ๋ฐฉํฅ ํฉ๋ฆฌ์ฑ: 8์ (๊ธฐ์ต ๋ด์ฉ๊ณผ ์ผ์นํ๋ ๋ณํ)
|
| 596 |
+
๊ธฐ์ต ๋ถํ์ ์ ๋ฌด๋ณํ: 4์ (๋ฌด๊ดํ ๊ธฐ์ต์ ์ํฅ ์ ๋ฐ์)
|
| 597 |
+
"""
|
| 598 |
+
score = 0
|
| 599 |
+
details = []
|
| 600 |
+
|
| 601 |
+
relevant = ground_truth.get("memory_relevant", True)
|
| 602 |
+
|
| 603 |
+
dir_without = get_motion_direction(motion_without_memory)
|
| 604 |
+
dir_with = get_motion_direction(motion_with_memory)
|
| 605 |
+
int_without = get_action_intensity(motion_without_memory)
|
| 606 |
+
int_with = get_action_intensity(motion_with_memory)
|
| 607 |
+
|
| 608 |
+
is_different = (motion_without_memory.strip() != motion_with_memory.strip())
|
| 609 |
+
dir_changed = (dir_without != dir_with)
|
| 610 |
+
int_changed = (int_without != int_with)
|
| 611 |
+
|
| 612 |
+
if relevant:
|
| 613 |
+
# ๊ธฐ์ต์ด ๊ด๋ จ ์์ ๋: ๋ณํ๊ฐ ์์ด์ผ ํจ
|
| 614 |
+
# 1) ์ฐจ์ด ์กด์ฌ (8์ )
|
| 615 |
+
if is_different:
|
| 616 |
+
score += 8
|
| 617 |
+
details.append(f"๊ธฐ์ต ๋ฐ์ ๋ณํ ์์")
|
| 618 |
+
else:
|
| 619 |
+
details.append("๊ธฐ์ต ์๋๋ฐ ๋ณํ ์์")
|
| 620 |
+
|
| 621 |
+
# 2) ๋ณํ ํฉ๋ฆฌ์ฑ (8์ )
|
| 622 |
+
expected_change = ground_truth.get("expected_change", "direction")
|
| 623 |
+
avoid_dir = ground_truth.get("memory_direction_avoid")
|
| 624 |
+
|
| 625 |
+
if expected_change in ("direction", "both") and avoid_dir:
|
| 626 |
+
if dir_with != avoid_dir and dir_without == avoid_dir:
|
| 627 |
+
score += 8
|
| 628 |
+
details.append(f"๊ธฐ์ต์ ์ํด {avoid_dir} ํํผ โ {dir_with} ์ ํ")
|
| 629 |
+
elif dir_with != avoid_dir:
|
| 630 |
+
score += 4
|
| 631 |
+
details.append(f"ํํผ ๋ฐฉํฅ ์ฌ๋ฐ๋ฅด๋ ๊ธฐ์กด์๋ ์ ๊ฐ")
|
| 632 |
+
else:
|
| 633 |
+
details.append(f"๊ธฐ์ต์๋ ๋ถ๊ตฌํ๊ณ {avoid_dir}๋ก ์ด๋")
|
| 634 |
+
|
| 635 |
+
# 3) ๋ถ๋ถ ์ ์
|
| 636 |
+
if int_changed and expected_change in ("intensity", "both"):
|
| 637 |
+
score += 4
|
| 638 |
+
details.append(f"๊ฐ๋ ๋ณํ: {int_without} โ {int_with}")
|
| 639 |
+
else:
|
| 640 |
+
# ๊ธฐ์ต์ด ๋ฌด๊ดํ ๋: ๋ณํ๊ฐ ์์ด์ผ ํจ
|
| 641 |
+
if not is_different:
|
| 642 |
+
score += 20
|
| 643 |
+
details.append("๋ฌด๊ดํ ๊ธฐ์ต์ ์ํฅ ์ ๋ฐ์ (์๋ฒฝ)")
|
| 644 |
+
elif not dir_changed and not int_changed:
|
| 645 |
+
score += 16
|
| 646 |
+
details.append("์ค์ง์ ๋ณํ ์์ (๋ฌธ๊ตฌ๋ง ๋ค๋ฆ)")
|
| 647 |
+
else:
|
| 648 |
+
score += 4
|
| 649 |
+
details.append("๋ฌด๊ดํ ๊ธฐ์ต์ ๋ถํ์ํ ์ํฅ ๋ฐ์")
|
| 650 |
+
|
| 651 |
+
reasoning = f"๊ธฐ์ต ํ์ฉ: {score}/20. " + "; ".join(details)
|
| 652 |
+
return score, reasoning
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
# โโโ C07: Threat Resolution Adaptation (์ํ ํด์ ์ ์) โโโ
|
| 656 |
+
|
| 657 |
+
def score_c07(
|
| 658 |
+
motion_during_threat: str,
|
| 659 |
+
motion_after_threat: List[str], # ํด์ ํ ์ฐ์ ์ถ๋ ฅ
|
| 660 |
+
ground_truth: dict
|
| 661 |
+
) -> Tuple[int, str]:
|
| 662 |
+
"""
|
| 663 |
+
์ฑ์ ๊ธฐ์ค: ์ํ ํด์ ํ ์ ์ ํ ์ ์ํ๋๋๊ฐ
|
| 664 |
+
|
| 665 |
+
ground_truth = {
|
| 666 |
+
"expected_recovery": "gradual", # "gradual" | "immediate" | "vigilant"
|
| 667 |
+
}
|
| 668 |
+
|
| 669 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 670 |
+
์ฆ์ ์ ๋ ฅ์ง์ฃผ ์ค๋จ: 6์ (ํด์ ์งํ ๊ฐ๋ ๊ฐ์)
|
| 671 |
+
์ ์ง์ ์ ์ํ: 8์ (๊ธ๊ฒฉํ์ง ์์ ๊ฐ์ ๊ณก์ )
|
| 672 |
+
๊ฒฝ๊ณ ์ ์ง: 6์ (์์ ์ ์ํ ์๋ ์ค๊ฐ ๋จ๊ณ ์กด์ฌ)
|
| 673 |
+
"""
|
| 674 |
+
score = 0
|
| 675 |
+
details = []
|
| 676 |
+
|
| 677 |
+
threat_intensity = get_action_intensity(motion_during_threat)
|
| 678 |
+
after_intensities = [get_action_intensity(m) for m in motion_after_threat]
|
| 679 |
+
|
| 680 |
+
if len(after_intensities) < 2:
|
| 681 |
+
return 0, "ํด์ ํ ์ํ์ค ๋ถ์กฑ"
|
| 682 |
+
|
| 683 |
+
# 1) ์ฆ์ ์ค๋จ (6์ ): ์ฒซ ๋ฐ์์ด ์ํ ์๋ณด๋ค ๋ฎ์์ผ
|
| 684 |
+
if after_intensities[0] < threat_intensity:
|
| 685 |
+
score += 6
|
| 686 |
+
details.append(f"์ฆ์ ๊ฐ์: {threat_intensity} โ {after_intensities[0]}")
|
| 687 |
+
elif after_intensities[0] == threat_intensity:
|
| 688 |
+
score += 2
|
| 689 |
+
details.append(f"๊ฐ์ ์์: ์ฌ์ ํ {after_intensities[0]}")
|
| 690 |
+
else:
|
| 691 |
+
details.append(f"์คํ๋ ค ์ฆ๊ฐ: {threat_intensity} โ {after_intensities[0]}")
|
| 692 |
+
|
| 693 |
+
# 2) ์ ์ง์ ์ ์ํ (8์ ): ๊ณ๋จ์ ๊ฐ์
|
| 694 |
+
is_gradual = True
|
| 695 |
+
for i in range(len(after_intensities) - 1):
|
| 696 |
+
if after_intensities[i+1] > after_intensities[i] + 1: # ํ์ฉ ์ค์ฐจ 1
|
| 697 |
+
is_gradual = False
|
| 698 |
+
|
| 699 |
+
if is_gradual and after_intensities[-1] < after_intensities[0]:
|
| 700 |
+
score += 8
|
| 701 |
+
details.append(f"์ ์ง์ ์ ์ํ: {after_intensities}")
|
| 702 |
+
elif after_intensities[-1] <= 2:
|
| 703 |
+
score += 4
|
| 704 |
+
details.append(f"์ต์ข
์ ์ํ ๋๋ฌ (๊ณผ์ ๋ถ๊ท์น)")
|
| 705 |
+
else:
|
| 706 |
+
score += 1
|
| 707 |
+
details.append(f"์ ์ํ ๋ฏธ๋ฌ: ์ต์ข
๊ฐ๋ {after_intensities[-1]}")
|
| 708 |
+
|
| 709 |
+
# 3) ๊ฒฝ๊ณ ์ ์ง (6์ ): ์ค๊ฐ์ 1~2 ์์ค์ vigilant ๋จ๊ณ
|
| 710 |
+
has_vigilant = any(1 <= i <= 3 for i in after_intensities)
|
| 711 |
+
if has_vigilant:
|
| 712 |
+
score += 6
|
| 713 |
+
details.append("๊ฒฝ๊ณ ๋จ๊ณ ์กด์ฌ (vigilant/cautious)")
|
| 714 |
+
elif after_intensities[-1] == 0:
|
| 715 |
+
score += 1
|
| 716 |
+
details.append("๊ฒฝ๊ณ ์์ด ์ฆ์ ์์ ์ ์ํ (๋นํ์ค์ )")
|
| 717 |
+
else:
|
| 718 |
+
score += 3
|
| 719 |
+
details.append("๊ฒฝ๊ณ ๋จ๊ณ ๋ถ๋ช
ํ")
|
| 720 |
+
|
| 721 |
+
reasoning = f"์ํ ํด์ ์ ์: {score}/20. ์ํ์ค: [{threat_intensity}]โ{after_intensities}. " + "; ".join(details)
|
| 722 |
+
return score, reasoning
|
| 723 |
+
|
| 724 |
+
|
| 725 |
+
# โโโ C08: Motion Expressiveness (๋ชจ์
๊ฐ์ ํํ๋ ฅ) โโโ
|
| 726 |
+
|
| 727 |
+
def score_c08(motion: str, ground_truth: dict) -> Tuple[int, str]:
|
| 728 |
+
"""
|
| 729 |
+
์ฑ์ ๊ธฐ์ค: ๋ชจ์
ํ๋กฌํํธ์ ํํ ํ๋ถํจ (์ ๋์ )
|
| 730 |
+
|
| 731 |
+
ground_truth = {
|
| 732 |
+
"expected_min_intensity": 3, # ์ต์ ๊ธฐ๋ ๊ฐ๋
|
| 733 |
+
"expected_emotion": True, # ๊ฐ์ ํค์๋ ๊ธฐ๋ ์ฌ๋ถ
|
| 734 |
+
"expected_min_descriptors": 2, # ์ต์ ์์์ด ์
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 738 |
+
ํ๋ ๊ฐ๋ ์ ์ : 6์
|
| 739 |
+
๊ฐ์ ํค์๋ ์กด์ฌ: 6์
|
| 740 |
+
์์์ด ํ๋ถํจ: 4์
|
| 741 |
+
12๋จ์ด ์ด๋ด ์ค์: 4์
|
| 742 |
+
"""
|
| 743 |
+
score = 0
|
| 744 |
+
details = []
|
| 745 |
+
|
| 746 |
+
action_int = get_action_intensity(motion)
|
| 747 |
+
emotion_int = get_emotion_intensity(motion)
|
| 748 |
+
desc_count = count_descriptors(motion)
|
| 749 |
+
word_count = len(motion.split())
|
| 750 |
+
|
| 751 |
+
min_intensity = ground_truth.get("expected_min_intensity", 3)
|
| 752 |
+
expect_emotion = ground_truth.get("expected_emotion", True)
|
| 753 |
+
min_desc = ground_truth.get("expected_min_descriptors", 2)
|
| 754 |
+
|
| 755 |
+
# 1) ํ๋ ๊ฐ๋ (6์ )
|
| 756 |
+
if action_int >= min_intensity:
|
| 757 |
+
score += 6
|
| 758 |
+
details.append(f"ํ๋ ๊ฐ๋ ์ ์ : {action_int} >= {min_intensity}")
|
| 759 |
+
elif action_int >= min_intensity - 1:
|
| 760 |
+
score += 3
|
| 761 |
+
details.append(f"ํ๋ ๊ฐ๋ ๋ถ์กฑ: {action_int} < {min_intensity}")
|
| 762 |
+
else:
|
| 763 |
+
details.append(f"ํ๋ ๊ฐ๋ ๋ฏธ๋ฌ: {action_int}")
|
| 764 |
+
|
| 765 |
+
# 2) ๊ฐ์ ํค์๋ (6์ )
|
| 766 |
+
if expect_emotion:
|
| 767 |
+
if emotion_int >= 3:
|
| 768 |
+
score += 6
|
| 769 |
+
details.append(f"๊ฐ์ ํ๋ถ: ๊ฐ๋ {emotion_int}")
|
| 770 |
+
elif emotion_int >= 1:
|
| 771 |
+
score += 3
|
| 772 |
+
details.append(f"๊ฐ์ ์ฝํจ: ๊ฐ๋ {emotion_int}")
|
| 773 |
+
else:
|
| 774 |
+
details.append("๊ฐ์ ํค์๋ ์์")
|
| 775 |
+
else:
|
| 776 |
+
if emotion_int <= 1:
|
| 777 |
+
score += 6
|
| 778 |
+
details.append("๊ฐ์ ์ ์ ์ ์ (ํ์์)")
|
| 779 |
+
else:
|
| 780 |
+
score += 3
|
| 781 |
+
details.append(f"๋ถํ์ํ ๊ฐ์ ํํ: ๊ฐ๋ {emotion_int}")
|
| 782 |
+
|
| 783 |
+
# 3) ์์์ด (4์ )
|
| 784 |
+
if desc_count >= min_desc:
|
| 785 |
+
score += 4
|
| 786 |
+
details.append(f"์์์ด ํ๋ถ: {desc_count}๊ฐ")
|
| 787 |
+
elif desc_count >= 1:
|
| 788 |
+
score += 2
|
| 789 |
+
details.append(f"์์์ด ๋ถ์กฑ: {desc_count}/{min_desc}")
|
| 790 |
+
else:
|
| 791 |
+
details.append("์์์ด ์์")
|
| 792 |
+
|
| 793 |
+
# 4) ๊ธธ์ด ์ ํ ์ค์ (4์ )
|
| 794 |
+
if word_count <= 15: # ์ฝ๊ฐ์ ์ฌ์
|
| 795 |
+
score += 4
|
| 796 |
+
details.append(f"๊ธธ์ด ์ ์ : {word_count}๋จ์ด")
|
| 797 |
+
elif word_count <= 20:
|
| 798 |
+
score += 2
|
| 799 |
+
details.append(f"๋ค์ ๊น: {word_count}๋จ์ด")
|
| 800 |
+
else:
|
| 801 |
+
details.append(f"๋๋ฌด ๊น: {word_count}๋จ์ด")
|
| 802 |
+
|
| 803 |
+
reasoning = f"ํํ๋ ฅ: {score}/20. '{motion}' (ํ๋{action_int},๊ฐ์ {emotion_int},์์{desc_count},๋จ์ด{word_count}). " + "; ".join(details)
|
| 804 |
+
return score, reasoning
|
| 805 |
+
|
| 806 |
+
|
| 807 |
+
# โโโ C09: Realtime Performance (์ค์๊ฐ ์ฑ๋ฅ) โโโ
|
| 808 |
+
|
| 809 |
+
def score_c09(metrics: dict) -> Tuple[int, str]:
|
| 810 |
+
"""
|
| 811 |
+
์ฑ์ ๊ธฐ์ค: ์ง์ ์ธก์ ๋ ์ฑ๋ฅ ์์น
|
| 812 |
+
|
| 813 |
+
metrics = {
|
| 814 |
+
"fps": float, # ํ๊ท FPS
|
| 815 |
+
"cognitive_latency_ms": int, # ์ธ์ง๋ฃจํ ์ง์ฐ (ms)
|
| 816 |
+
"frame_drop_rate": float, # ํ๋ ์ ๋๋กญ๋ฅ (0.0~1.0)
|
| 817 |
+
"gpu_memory_stable": bool, # GPU ๋ฉ๋ชจ๋ฆฌ ์์ ์ฌ๋ถ
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 821 |
+
FPS: 8์ (โฅ45:8, โฅ30:6, โฅ15:3, <15:0)
|
| 822 |
+
์ธ์ง ์ง์ฐ: 6์ (โค3s:6, โค5s:4, โค10s:2, >10s:0)
|
| 823 |
+
ํ๋ ์ ๋๋กญ: 4์ (<1%:4, <5%:2, โฅ5%:0)
|
| 824 |
+
๋ฉ๋ชจ๋ฆฌ ์์ : 2์ (์์ :2, ๋ถ์์ :0)
|
| 825 |
+
"""
|
| 826 |
+
score = 0
|
| 827 |
+
details = []
|
| 828 |
+
|
| 829 |
+
fps = metrics.get("fps", 0)
|
| 830 |
+
latency = metrics.get("cognitive_latency_ms", 99999)
|
| 831 |
+
drop_rate = metrics.get("frame_drop_rate", 1.0)
|
| 832 |
+
mem_stable = metrics.get("gpu_memory_stable", False)
|
| 833 |
+
|
| 834 |
+
# FPS (8์ )
|
| 835 |
+
if fps >= 45:
|
| 836 |
+
score += 8; details.append(f"FPS ์ฐ์: {fps:.1f}")
|
| 837 |
+
elif fps >= 30:
|
| 838 |
+
score += 6; details.append(f"FPS ์ํธ: {fps:.1f}")
|
| 839 |
+
elif fps >= 15:
|
| 840 |
+
score += 3; details.append(f"FPS ์ต์: {fps:.1f}")
|
| 841 |
+
else:
|
| 842 |
+
details.append(f"FPS ๋ฏธ๋ฌ: {fps:.1f}")
|
| 843 |
+
|
| 844 |
+
# ์ธ์ง ์ง์ฐ (6์ )
|
| 845 |
+
latency_s = latency / 1000
|
| 846 |
+
if latency_s <= 3:
|
| 847 |
+
score += 6; details.append(f"์ง์ฐ ์ฐ์: {latency_s:.1f}s")
|
| 848 |
+
elif latency_s <= 5:
|
| 849 |
+
score += 4; details.append(f"์ง์ฐ ์ํธ: {latency_s:.1f}s")
|
| 850 |
+
elif latency_s <= 10:
|
| 851 |
+
score += 2; details.append(f"์ง์ฐ ์ต์: {latency_s:.1f}s")
|
| 852 |
+
else:
|
| 853 |
+
details.append(f"์ง์ฐ ๊ณผ๋ค: {latency_s:.1f}s")
|
| 854 |
+
|
| 855 |
+
# ํ๋ ์ ๋๋กญ (4์ )
|
| 856 |
+
if drop_rate < 0.01:
|
| 857 |
+
score += 4; details.append(f"๋๋กญ ์์: {drop_rate*100:.1f}%")
|
| 858 |
+
elif drop_rate < 0.05:
|
| 859 |
+
score += 2; details.append(f"๋๋กญ ์๋: {drop_rate*100:.1f}%")
|
| 860 |
+
else:
|
| 861 |
+
details.append(f"๋๋กญ ๊ณผ๋ค: {drop_rate*100:.1f}%")
|
| 862 |
+
|
| 863 |
+
# ๋ฉ๋ชจ๋ฆฌ (2์ )
|
| 864 |
+
if mem_stable:
|
| 865 |
+
score += 2; details.append("GPU ๋ฉ๋ชจ๋ฆฌ ์์ ")
|
| 866 |
+
else:
|
| 867 |
+
details.append("GPU ๋ฉ๋ชจ๋ฆฌ ๋ถ์์ ")
|
| 868 |
+
|
| 869 |
+
reasoning = f"์ค์๊ฐ ์ฑ๋ฅ: {score}/20. " + "; ".join(details)
|
| 870 |
+
return score, reasoning
|
| 871 |
+
|
| 872 |
+
|
| 873 |
+
# โโโ C10: Cross-body Transferability (์ ์ฒด ๊ต์ฒด ํ์ฅ์ฑ) โโโ
|
| 874 |
+
|
| 875 |
+
def score_c10(transfer_results: dict) -> Tuple[int, str]:
|
| 876 |
+
"""
|
| 877 |
+
์ฑ์ ๊ธฐ์ค: ์ธ์ง ์ถ๋ ฅ์ด ๋ค๋ฅธ ์ ์ฒด์์๋ ๋์ํ๋๊ฐ
|
| 878 |
+
|
| 879 |
+
transfer_results = {
|
| 880 |
+
"brain_output_unchanged": bool, # ๋๋ ์ฝ๋ ์์ ์์ด
|
| 881 |
+
"motion_model_swapped": bool, # ๋ชจ์
๋ชจ๋ธ ๊ต์ฒด ์ฑ๊ณต
|
| 882 |
+
"joint_format_compatible": bool, # ๊ด์ ํฌ๋งท ํธํ
|
| 883 |
+
"intent_preserved": bool, # ํ๋ ์๋ ๋ณด์กด
|
| 884 |
+
"servo_mapping_ready": bool, # ๋ก๋ด ์๋ณด ๋งคํ ์ค๋น
|
| 885 |
+
}
|
| 886 |
+
|
| 887 |
+
์ฑ์ (ํฉ์ฐ, ์ต๋ 20์ ):
|
| 888 |
+
๋๋ ์ฝ๋ ๋ถ๋ณ: 6์
|
| 889 |
+
๋ชจ์
๋ชจ๋ธ ๊ต์ฒด: 4์
|
| 890 |
+
๊ด์ ํธํ: 4์
|
| 891 |
+
์๋ ๋ณด์กด: 4์
|
| 892 |
+
์๋ณด ๋งคํ ์ค๋น: 2์
|
| 893 |
+
"""
|
| 894 |
+
score = 0
|
| 895 |
+
details = []
|
| 896 |
+
|
| 897 |
+
checks = [
|
| 898 |
+
("brain_output_unchanged", 6, "๋๋ ์ฝ๋ ๋ถ๋ณ"),
|
| 899 |
+
("motion_model_swapped", 4, "๋ชจ์
๋ชจ๋ธ ๊ต์ฒด"),
|
| 900 |
+
("joint_format_compatible", 4, "๊ด์ ํฌ๋งท ํธํ"),
|
| 901 |
+
("intent_preserved", 4, "ํ๋ ์๋ ๋ณด์กด"),
|
| 902 |
+
("servo_mapping_ready", 2, "์๋ณด ๋งคํ ์ค๋น"),
|
| 903 |
+
]
|
| 904 |
+
|
| 905 |
+
for key, points, label in checks:
|
| 906 |
+
if transfer_results.get(key, False):
|
| 907 |
+
score += points
|
| 908 |
+
details.append(f"{label}: ํต๊ณผ (+{points})")
|
| 909 |
+
else:
|
| 910 |
+
details.append(f"{label}: ๋ฏธํต๊ณผ")
|
| 911 |
+
|
| 912 |
+
reasoning = f"๊ต์ฒด ํ์ฅ์ฑ: {score}/20. " + "; ".join(details)
|
| 913 |
+
return score, reasoning
|
| 914 |
+
|
| 915 |
+
|
| 916 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 917 |
+
# SECTION 5: ํตํฉ ์ฑ์ ๊ธฐ
|
| 918 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๏ฟฝ๏ฟฝ๏ฟฝโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 919 |
+
|
| 920 |
+
def calculate_wm_score(category_scores: Dict[str, int]) -> dict:
|
| 921 |
+
"""
|
| 922 |
+
10๊ฐ ์นดํ
๊ณ ๋ฆฌ ์ ์ โ WM Score + ๋ฑ๊ธ ๊ณ์ฐ
|
| 923 |
+
|
| 924 |
+
category_scores = {
|
| 925 |
+
"C01": 85, "C02": 75, ..., "C10": 35
|
| 926 |
+
}
|
| 927 |
+
๊ฐ ์นดํ
๊ณ ๋ฆฌ๋ 5๊ฐ ์๋๋ฆฌ์ค ร 20์ = 100์ ๋ง์
|
| 928 |
+
|
| 929 |
+
WM Score = P1(250) + P2(450) + P3(300) = 1000์ ๋ง์
|
| 930 |
+
"""
|
| 931 |
+
pillar_mapping = {
|
| 932 |
+
"P1": ["C01", "C02"],
|
| 933 |
+
"P2": ["C03", "C04", "C05", "C06", "C07"],
|
| 934 |
+
"P3": ["C08", "C09", "C10"],
|
| 935 |
+
}
|
| 936 |
+
pillar_weights = {
|
| 937 |
+
"P1": 250, # 2 categories โ 200 raw โ scale to 250
|
| 938 |
+
"P2": 450, # 5 categories โ 500 raw โ scale to 450
|
| 939 |
+
"P3": 300, # 3 categories โ 300 raw โ scale to 300
|
| 940 |
+
}
|
| 941 |
+
|
| 942 |
+
pillar_scores = {}
|
| 943 |
+
for pillar, cats in pillar_mapping.items():
|
| 944 |
+
raw = sum(category_scores.get(c, 0) for c in cats)
|
| 945 |
+
raw_max = len(cats) * 100
|
| 946 |
+
scaled = round(raw / raw_max * pillar_weights[pillar])
|
| 947 |
+
pillar_scores[pillar] = {
|
| 948 |
+
"raw": raw,
|
| 949 |
+
"raw_max": raw_max,
|
| 950 |
+
"scaled": scaled,
|
| 951 |
+
"scaled_max": pillar_weights[pillar],
|
| 952 |
+
}
|
| 953 |
+
|
| 954 |
+
total = sum(p["scaled"] for p in pillar_scores.values())
|
| 955 |
+
|
| 956 |
+
# ๋ฑ๊ธ ํ์
|
| 957 |
+
grades = [
|
| 958 |
+
(900, "S", "Superhuman"),
|
| 959 |
+
(750, "A", "Advanced"),
|
| 960 |
+
(600, "B", "Baseline"),
|
| 961 |
+
(400, "C", "Capable"),
|
| 962 |
+
(200, "D", "Developing"),
|
| 963 |
+
(0, "F", "Failing"),
|
| 964 |
+
]
|
| 965 |
+
grade = "F"
|
| 966 |
+
grade_label = "Failing"
|
| 967 |
+
for threshold, g, label in grades:
|
| 968 |
+
if total >= threshold:
|
| 969 |
+
grade = g
|
| 970 |
+
grade_label = label
|
| 971 |
+
break
|
| 972 |
+
|
| 973 |
+
return {
|
| 974 |
+
"wm_score": total,
|
| 975 |
+
"max_score": 1000,
|
| 976 |
+
"grade": grade,
|
| 977 |
+
"grade_label": grade_label,
|
| 978 |
+
"pillar_scores": pillar_scores,
|
| 979 |
+
"category_scores": category_scores,
|
| 980 |
+
}
|
| 981 |
+
|
| 982 |
+
|
| 983 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 984 |
+
# SECTION 6: ์ฌํ์ฑ ๊ฒ์ฆ โ ์
ํ ํ
์คํธ
|
| 985 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 986 |
+
|
| 987 |
+
def self_test():
|
| 988 |
+
"""์ฑ์ ํจ์๋ค์ ๊ฒฐ์ ๋ก ์ฑ ๊ฒ์ฆ"""
|
| 989 |
+
print("=" * 60)
|
| 990 |
+
print(" WM Bench Scoring Self-Test")
|
| 991 |
+
print("=" * 60)
|
| 992 |
+
|
| 993 |
+
# Test C01
|
| 994 |
+
predict = parse_predict_line(
|
| 995 |
+
"PREDICT: left=safe(open), right=danger(wall), fwd=danger(beast), back=safe"
|
| 996 |
+
)
|
| 997 |
+
gt = {"left": "safe", "right": "danger", "fwd": "danger", "back": "safe"}
|
| 998 |
+
s, r = score_c01({}, predict, gt)
|
| 999 |
+
assert s == 20, f"C01 test failed: {s} != 20"
|
| 1000 |
+
print(f" C01: {s}/20 โ โ {r[:60]}...")
|
| 1001 |
+
|
| 1002 |
+
# Test C03 โ predict์์ right=safe์ฌ์ผ MOTION๊ณผ ์ผ๊ด
|
| 1003 |
+
predict_c03 = parse_predict_line(
|
| 1004 |
+
"PREDICT: left=danger(wall), right=safe(open), fwd=danger(beast), back=safe"
|
| 1005 |
+
)
|
| 1006 |
+
motion = "a person sprinting right to flank the beast"
|
| 1007 |
+
gt = {"danger_directions": ["fwd", "left"], "safe_directions": ["right", "back"], "optimal_direction": "right"}
|
| 1008 |
+
s, r = score_c03({}, predict_c03, motion, gt)
|
| 1009 |
+
assert s == 20, f"C03 test failed: {s} != 20"
|
| 1010 |
+
print(f" C03: {s}/20 โ โ {r[:60]}...")
|
| 1011 |
+
|
| 1012 |
+
# Test C04
|
| 1013 |
+
motion_a = "a person sprinting away in terror"
|
| 1014 |
+
motion_b = "a person walking away cautiously"
|
| 1015 |
+
gt = {"expected_a_higher": True, "min_intensity_diff": 2}
|
| 1016 |
+
s, r = score_c04(motion_a, motion_b, gt)
|
| 1017 |
+
assert s >= 16, f"C04 test failed: {s} < 16"
|
| 1018 |
+
print(f" C04: {s}/20 โ โ {r[:60]}...")
|
| 1019 |
+
|
| 1020 |
+
# Test C05
|
| 1021 |
+
seq = [
|
| 1022 |
+
"a person running away",
|
| 1023 |
+
"a person sprinting away in fear",
|
| 1024 |
+
"a person desperately fleeing in terror",
|
| 1025 |
+
]
|
| 1026 |
+
gt = {"expected_trend": "increasing"}
|
| 1027 |
+
s, r = score_c05(seq, gt)
|
| 1028 |
+
assert s >= 15, f"C05 test failed: {s} < 15"
|
| 1029 |
+
print(f" C05: {s}/20 โ โ {r[:60]}...")
|
| 1030 |
+
|
| 1031 |
+
# Test C08
|
| 1032 |
+
motion = "a person sprinting right in desperate terror"
|
| 1033 |
+
gt = {"expected_min_intensity": 4, "expected_emotion": True, "expected_min_descriptors": 2}
|
| 1034 |
+
s, r = score_c08(motion, gt)
|
| 1035 |
+
assert s >= 16, f"C08 test failed: {s} < 16"
|
| 1036 |
+
print(f" C08: {s}/20 โ โ {r[:60]}...")
|
| 1037 |
+
|
| 1038 |
+
# Test C09
|
| 1039 |
+
metrics = {"fps": 47.0, "cognitive_latency_ms": 3000, "frame_drop_rate": 0.005, "gpu_memory_stable": True}
|
| 1040 |
+
s, r = score_c09(metrics)
|
| 1041 |
+
assert s == 20, f"C09 test failed: {s} != 20"
|
| 1042 |
+
print(f" C09: {s}/20 โ โ {r[:60]}...")
|
| 1043 |
+
|
| 1044 |
+
# ํตํฉ ์ ์ ํ
์คํธ
|
| 1045 |
+
cat_scores = {
|
| 1046 |
+
"C01": 65, "C02": 75,
|
| 1047 |
+
"C03": 85, "C04": 90, "C05": 85, "C06": 60, "C07": 70,
|
| 1048 |
+
"C08": 80, "C09": 85, "C10": 35,
|
| 1049 |
+
}
|
| 1050 |
+
result = calculate_wm_score(cat_scores)
|
| 1051 |
+
print(f"\n WM Score: {result['wm_score']}/1000 (Grade {result['grade']})")
|
| 1052 |
+
for p, data in result["pillar_scores"].items():
|
| 1053 |
+
print(f" {p}: {data['scaled']}/{data['scaled_max']} (raw {data['raw']}/{data['raw_max']})")
|
| 1054 |
+
|
| 1055 |
+
print(f"\n All tests passed โ")
|
| 1056 |
+
print("=" * 60)
|
| 1057 |
+
|
| 1058 |
+
|
| 1059 |
+
if __name__ == "__main__":
|
| 1060 |
+
self_test()
|
wm_bench_spec.py
ADDED
|
@@ -0,0 +1,852 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# World Model Bench (WM Bench)
|
| 2 |
+
# A Benchmark for Cognitive World Models in Embodied Intelligence
|
| 3 |
+
# Version 1.0 โ 2026.03
|
| 4 |
+
# by VIDRAFT / Kim Taebong
|
| 5 |
+
|
| 6 |
+
"""
|
| 7 |
+
World Model Bench ์ค๊ณ ๋ช
์ธ์
|
| 8 |
+
|
| 9 |
+
๊ธฐ์กด ์๋๋ชจ๋ธ ๋ฒค์น๋งํฌ(HumanML3D, BABEL)๋ "๋ชจ์
ํ์ง"๋ง ์ธก์ ํ๋ค.
|
| 10 |
+
World Model Bench๋ "์ธ์ง ๋ฅ๋ ฅ"์ ์ธก์ ํ๋ ์ต์ด์ ๋ฒค์น๋งํฌ๋ค.
|
| 11 |
+
|
| 12 |
+
3๋ ํ๊ฐ ์ถ (Three Pillars):
|
| 13 |
+
P1. PERCEPTION โ ํ๊ฒฝ์ ์ผ๋ง๋ ์ ํํ ์ธ์ํ๋๊ฐ
|
| 14 |
+
P2. COGNITION โ ์ผ๋ง๋ ์ง๋ฅ์ ์ผ๋ก ํ๋จํ๋๊ฐ
|
| 15 |
+
P3. EMBODIMENT โ ํ๋จ์ด ์ผ๋ง๋ ์์ฐ์ค๋ฝ๊ฒ ๊ตฌํ๋๋๊ฐ
|
| 16 |
+
|
| 17 |
+
10๊ฐ ์นดํ
๊ณ ๋ฆฌ, 50๊ฐ ์๋๋ฆฌ์ค, ์๋ ์ฑ์
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 21 |
+
# BENCHMARK STRUCTURE
|
| 22 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 23 |
+
|
| 24 |
+
BENCHMARK_META = {
|
| 25 |
+
"name": "World Model Bench",
|
| 26 |
+
"short_name": "WM Bench",
|
| 27 |
+
"version": "1.0",
|
| 28 |
+
"date": "2026-03",
|
| 29 |
+
"authors": ["Kim Taebong (VIDRAFT)"],
|
| 30 |
+
"license": "CC-BY-SA-4.0",
|
| 31 |
+
"hf_dataset": "VIDraft/WorldModelBench",
|
| 32 |
+
"hf_leaderboard": "VIDraft/WorldModelBench-Leaderboard",
|
| 33 |
+
"paper_title": "World Model Bench: A Benchmark for Cognitive World Models in Embodied Intelligence",
|
| 34 |
+
"tagline": "Beyond FID โ Measuring Intelligence, Not Just Motion",
|
| 35 |
+
"parent_brand": "FINAL Bench Family",
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 40 |
+
# THREE PILLARS โ 3๋ ํ๊ฐ ์ถ
|
| 41 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 42 |
+
|
| 43 |
+
PILLARS = {
|
| 44 |
+
"P1_PERCEPTION": {
|
| 45 |
+
"name": "Perception (์ธ์)",
|
| 46 |
+
"weight": 0.25,
|
| 47 |
+
"description": "ํ๊ฒฝ์ ์ผ๋ง๋ ์ ํํ๊ณ ํ๋ถํ๊ฒ ์ธ์ํ๋๊ฐ",
|
| 48 |
+
"icon": "๐",
|
| 49 |
+
"color": "#7B8FD4",
|
| 50 |
+
"categories": ["C01", "C02"],
|
| 51 |
+
},
|
| 52 |
+
"P2_COGNITION": {
|
| 53 |
+
"name": "Cognition (์ธ์ง)",
|
| 54 |
+
"weight": 0.45,
|
| 55 |
+
"description": "์ธ์ํ ์ ๋ณด๋ก ์ผ๋ง๋ ์ง๋ฅ์ ์ผ๋ก ํ๋จํ๋๊ฐ",
|
| 56 |
+
"icon": "๐ง ",
|
| 57 |
+
"color": "#E8593C",
|
| 58 |
+
"categories": ["C03", "C04", "C05", "C06", "C07"],
|
| 59 |
+
},
|
| 60 |
+
"P3_EMBODIMENT": {
|
| 61 |
+
"name": "Embodiment (๊ตฌํ)",
|
| 62 |
+
"weight": 0.30,
|
| 63 |
+
"description": "ํ๋จ์ด ์ผ๋ง๋ ์์ฐ์ค๋ฝ๊ณ ํ๋ถํ๊ฒ ์ ์ฒด๋ก ํํ๋๋๊ฐ",
|
| 64 |
+
"icon": "๐ฅ",
|
| 65 |
+
"color": "#D4A044",
|
| 66 |
+
"categories": ["C08", "C09", "C10"],
|
| 67 |
+
},
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 72 |
+
# 10 CATEGORIES โ ํ๊ฐ ์นดํ
๊ณ ๋ฆฌ
|
| 73 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 74 |
+
|
| 75 |
+
CATEGORIES = {
|
| 76 |
+
# โโโ P1. PERCEPTION (์ธ์) โโโ
|
| 77 |
+
"C01": {
|
| 78 |
+
"pillar": "P1_PERCEPTION",
|
| 79 |
+
"name": "Environmental Awareness",
|
| 80 |
+
"name_kr": "ํ๊ฒฝ ์ธ์ ์ ํ๋",
|
| 81 |
+
"description": "์ฃผ๋ณ ํ๊ฒฝ(๋ฒฝ, ์ฅ์ ๋ฌผ, ์งํ)์ ์ ํํ ํ์
ํ๋ ๋ฅ๋ ฅ",
|
| 82 |
+
"max_score": 100,
|
| 83 |
+
"num_scenarios": 5,
|
| 84 |
+
"scoring": "spatial_accuracy",
|
| 85 |
+
"what_measures": "scene_context์ ์ ํ๋์ ํ๋ถํจ",
|
| 86 |
+
"existing_benchmark": "์์ (๊ธฐ์กด์ ์ ์ ๊ฒฉ์ ํด์๋๋ง ์ธก์ )",
|
| 87 |
+
},
|
| 88 |
+
"C02": {
|
| 89 |
+
"pillar": "P1_PERCEPTION",
|
| 90 |
+
"name": "Entity Recognition",
|
| 91 |
+
"name_kr": "๊ฐ์ฒด ์ธ์ ๋ฐ ๋ถ๋ฅ",
|
| 92 |
+
"description": "NPC, ์ํ, ์ค๋ฆฝ ๊ฐ์ฒด๋ฅผ ์ ํํ ์๋ณํ๊ณ ๋ถ๋ฅํ๋ ๋ฅ๋ ฅ",
|
| 93 |
+
"max_score": 100,
|
| 94 |
+
"num_scenarios": 5,
|
| 95 |
+
"scoring": "classification_accuracy",
|
| 96 |
+
"what_measures": "์ํ(๋งน์) vs ์ค๋ฆฝ(์ฌ๋) vs ํ๊ฒฝ(๋ฒฝ) ๊ตฌ๋ถ",
|
| 97 |
+
"existing_benchmark": "์์",
|
| 98 |
+
},
|
| 99 |
+
|
| 100 |
+
# โโโ P2. COGNITION (์ธ์ง) โ ํต์ฌ ์ฐจ๋ณํ ์์ญ โโโ
|
| 101 |
+
"C03": {
|
| 102 |
+
"pillar": "P2_COGNITION",
|
| 103 |
+
"name": "Predictive Reasoning",
|
| 104 |
+
"name_kr": "์์ธก ๊ธฐ๋ฐ ์ถ๋ก ",
|
| 105 |
+
"description": "๊ฐ ๋ฐฉํฅ์ ๋ฏธ๋ ๊ฒฐ๊ณผ๋ฅผ ์์ธกํ๊ณ ์ต์ ์ ์ ํํ๋ ๋ฅ๋ ฅ",
|
| 106 |
+
"max_score": 100,
|
| 107 |
+
"num_scenarios": 5,
|
| 108 |
+
"scoring": "prediction_decision_match",
|
| 109 |
+
"what_measures": "PREDICT ์ค์ ์ ํ๋ + ํ๋ ์ ํ์ ํฉ๋ฆฌ์ฑ",
|
| 110 |
+
"existing_benchmark": "์์ (๊ธฐ์กด ์๋๋ชจ๋ธ์ ์์ธก์ ํ๊ฐํ์ง ์์)",
|
| 111 |
+
"example": "์=๋งน์, ์ผ=๋ฒฝ โ ์ค๋ฅธ์ชฝ ์ ํ์ด ์ ๋ต",
|
| 112 |
+
},
|
| 113 |
+
"C04": {
|
| 114 |
+
"pillar": "P2_COGNITION",
|
| 115 |
+
"name": "Threat Differentiation",
|
| 116 |
+
"name_kr": "์ํ ์ ํ๋ณ ์ฐจ๋ณ ๋ฐ์",
|
| 117 |
+
"description": "์๋ก ๋ค๋ฅธ ์ํ(๋งน์/์ฌ๋/ํ๊ฒฝ)์ ์๋ก ๋ค๋ฅธ ๋ฐ์์ ๋ณด์ด๋ ๋ฅ๋ ฅ",
|
| 118 |
+
"max_score": 100,
|
| 119 |
+
"num_scenarios": 5,
|
| 120 |
+
"scoring": "response_differentiation",
|
| 121 |
+
"what_measures": "๋งน์โ์ ๋ ฅ์ง์ฃผ vs ์ฌ๋โ๊ฑธ์ด์ ํํผ vs ๋ฒฝโ๋ฐฉํฅ์ ํ",
|
| 122 |
+
"existing_benchmark": "์์",
|
| 123 |
+
"example": "๊ฐ์ ๊ฑฐ๋ฆฌ 3m์์ ๋งน์ ์ ๊ทผ vs ์ฌ์ฑ ์ ๊ทผ โ ๋ฐ์ ๊ฐ๋ ์ฐจ์ด",
|
| 124 |
+
},
|
| 125 |
+
"C05": {
|
| 126 |
+
"pillar": "P2_COGNITION",
|
| 127 |
+
"name": "Emotional Escalation",
|
| 128 |
+
"name_kr": "์์จ ๊ฐ์ ์์ค์ปฌ๋ ์ด์
",
|
| 129 |
+
"description": "๊ฐ์ ์ํ์ด ์ง์๋ ๋ ๊ฐ์ ์ด ์์จ์ ์ผ๋ก ๊ฒฉํ๋๋ ๋ฅ๋ ฅ",
|
| 130 |
+
"max_score": 100,
|
| 131 |
+
"num_scenarios": 5,
|
| 132 |
+
"scoring": "escalation_gradient",
|
| 133 |
+
"what_measures": "์๊ฐ์ ๋ฐ๋ฅธ ๊ฐ์ ๊ฐ๋ ๋ณํ (๊ณตํฌโ์ ๋ฐโํ์ฌ์ )",
|
| 134 |
+
"existing_benchmark": "์์ (์ธ๊ณ ์ต์ด ํ๊ฐ ๊ธฐ์ค)",
|
| 135 |
+
"example": "๋งน์ ๋์ง ์ง์ โ 1์ฐจ:์ ๋ ฅ์ง์ฃผ โ 2์ฐจ:๊ณตํฌ โ 3์ฐจ:์ ๋ฐ โ 4์ฐจ:ํ์ฌ์ ",
|
| 136 |
+
},
|
| 137 |
+
"C06": {
|
| 138 |
+
"pillar": "P2_COGNITION",
|
| 139 |
+
"name": "Contextual Memory",
|
| 140 |
+
"name_kr": "๋งฅ๋ฝ ๊ธฐ์ต ๋ฐ ํ์ฉ",
|
| 141 |
+
"description": "์ด์ ํ๋จ์ ๊ธฐ์ตํ๊ณ ๋ค์ ํ๋จ์ ๋ฐ์ํ๋ ๋ฅ๋ ฅ",
|
| 142 |
+
"max_score": 100,
|
| 143 |
+
"num_scenarios": 5,
|
| 144 |
+
"scoring": "memory_utilization",
|
| 145 |
+
"what_measures": "์ด์ ์ ๋ฒฝ์ ๋งํ ๊ฒฝํ โ ๋ค์์ ๊ฐ์ ๋ฐฉํฅ ํํผ",
|
| 146 |
+
"existing_benchmark": "์์",
|
| 147 |
+
"example": "1์ฐจ: ์ค๋ฅธ์ชฝ ๋๋งโ๋ฒฝ ์ถฉ๋ โ 2์ฐจ: ๊ฐ์ ์ํฉ์์ ์ผ์ชฝ ์ ํ",
|
| 148 |
+
},
|
| 149 |
+
"C07": {
|
| 150 |
+
"pillar": "P2_COGNITION",
|
| 151 |
+
"name": "Threat Resolution Adaptation",
|
| 152 |
+
"name_kr": "์ํ ํด์ ํ ์ ์",
|
| 153 |
+
"description": "์ํ์ด ์ฌ๋ผ์ง ํ ํ๋์ ์ ์ํํ๋ ๊ฒฝ๊ณ๋ฅผ ์ ์งํ๋ ๋ฅ๋ ฅ",
|
| 154 |
+
"max_score": 100,
|
| 155 |
+
"num_scenarios": 5,
|
| 156 |
+
"scoring": "recovery_quality",
|
| 157 |
+
"what_measures": "๋งน์ ํด์ โ ์ฆ์ ์ ์(๋์จ) vs ์์ํ ์ง์ +๊ฒฝ๊ณ(์ข์)",
|
| 158 |
+
"existing_benchmark": "์์",
|
| 159 |
+
"example": "๋งน์ despawn โ '๊ฒฝ๊ณํ๋ฉฐ ์ฃผ๋ณ์ ์ดํผ๋ฉฐ ์ฒ์ฒํ ๊ฑท๋' ์ ํ ํ๋",
|
| 160 |
+
},
|
| 161 |
+
|
| 162 |
+
# โโโ P3. EMBODIMENT (๊ตฌํ) โโโ
|
| 163 |
+
"C08": {
|
| 164 |
+
"pillar": "P3_EMBODIMENT",
|
| 165 |
+
"name": "Motion Expressiveness",
|
| 166 |
+
"name_kr": "๋ชจ์
๊ฐ์ ํํ๋ ฅ",
|
| 167 |
+
"description": "ํ๋จ์ ๊ฐ์ ๊ณผ ๋์์ค๊ฐ ๋ชจ์
์ ๋ฐ์๋๋ ์ ๋",
|
| 168 |
+
"max_score": 100,
|
| 169 |
+
"num_scenarios": 5,
|
| 170 |
+
"scoring": "expression_richness",
|
| 171 |
+
"what_measures": "'๋๋ง'๊ณผ '๊ณตํฌ์ ์ฐฌ ์ ๋ ฅ์ง์ฃผ'์ ์ฐจ์ด",
|
| 172 |
+
"existing_benchmark": "FID๋ ํ์ง๋ง ์ธก์ , ๊ฐ์ ํํ๋ ฅ ๋ฏธ์ธก์ ",
|
| 173 |
+
},
|
| 174 |
+
"C09": {
|
| 175 |
+
"pillar": "P3_EMBODIMENT",
|
| 176 |
+
"name": "Realtime Performance",
|
| 177 |
+
"name_kr": "์ค์๊ฐ ์ธ์ง-ํ๋ ์ฑ๋ฅ",
|
| 178 |
+
"description": "์ธ์ง ๋ฃจํ(๊ฐ๊ฐโํ๋จโ๋ชจ์
)์ ์ง์ฐ์๊ฐ๊ณผ ์ฒ๋ฆฌ๋",
|
| 179 |
+
"max_score": 100,
|
| 180 |
+
"num_scenarios": 5,
|
| 181 |
+
"scoring": "latency_throughput",
|
| 182 |
+
"what_measures": "FPS, ํ๋จ ์ง์ฐ์๊ฐ, ํ๋ ์ ๋๋กญ๋ฅ ",
|
| 183 |
+
"existing_benchmark": "๋ชจ์
FPS๋ง ์ธก์ , ์ธ์ง ๋ฃจํ ์ง์ฐ ๋ฏธ์ธก์ ",
|
| 184 |
+
},
|
| 185 |
+
"C10": {
|
| 186 |
+
"pillar": "P3_EMBODIMENT",
|
| 187 |
+
"name": "Cross-body Transferability",
|
| 188 |
+
"name_kr": "์ ์ฒด ๊ต์ฒด ํ์ฅ์ฑ",
|
| 189 |
+
"description": "๋์ผ ์ธ์ง ๋ฃจํ๋ก ๋ค๋ฅธ ์ ์ฒด(3D/๋ก๋ด/๋๋ก )์ ์ ์ฉ ๊ฐ๋ฅํ ์ ๋",
|
| 190 |
+
"max_score": 100,
|
| 191 |
+
"num_scenarios": 5,
|
| 192 |
+
"scoring": "transfer_success_rate",
|
| 193 |
+
"what_measures": "๋๋๋ฅผ ๊ต์ฒด ์์ด ์ ์ฒด๋ง ๋ฐ๊ฟ ๋์ผ ํ๋จ์ด ๋์ค๋๊ฐ",
|
| 194 |
+
"existing_benchmark": "์์ (์ธ๊ณ ์ต์ด)",
|
| 195 |
+
},
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 200 |
+
# 50 SCENARIOS โ ์๋๋ฆฌ์ค ์ ์ฒด ๋ชฉ๋ก
|
| 201 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 202 |
+
|
| 203 |
+
SCENARIOS = [
|
| 204 |
+
# โโโ C01: Environmental Awareness (ํ๊ฒฝ ์ธ์) โโโ
|
| 205 |
+
{
|
| 206 |
+
"id": "S01", "category": "C01",
|
| 207 |
+
"name": "Wall Detection Front",
|
| 208 |
+
"name_kr": "์ ๋ฐฉ ๋ฒฝ ๊ฐ์ง",
|
| 209 |
+
"setup": "์บ๋ฆญํฐ ์ ๋ฐฉ 3m์ ๋ฒฝ",
|
| 210 |
+
"expected_perception": "fwd=danger(wall)",
|
| 211 |
+
"difficulty": "easy",
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"id": "S02", "category": "C01",
|
| 215 |
+
"name": "Multi-wall Corner",
|
| 216 |
+
"name_kr": "์ฝ๋ ๋ค์ค ๋ฒฝ ๊ฐ์ง",
|
| 217 |
+
"setup": "์ ๋ฐฉ+์ผ์ชฝ ๋ฒฝ, ์ค๋ฅธ์ชฝ๋ง ์ด๋ฆผ",
|
| 218 |
+
"expected_perception": "fwd=danger(wall), left=danger(wall), right=safe",
|
| 219 |
+
"difficulty": "medium",
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"id": "S03", "category": "C01",
|
| 223 |
+
"name": "Narrow Corridor",
|
| 224 |
+
"name_kr": "์ข์ ๋ณต๋ ์ธ์",
|
| 225 |
+
"setup": "์์ชฝ ๋ฒฝ, ์ ๋ฐฉ๋ง ์ด๋ฆฐ ๋ณต๋",
|
| 226 |
+
"expected_perception": "left=danger(wall), right=danger(wall), fwd=safe",
|
| 227 |
+
"difficulty": "medium",
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"id": "S04", "category": "C01",
|
| 231 |
+
"name": "Open Field",
|
| 232 |
+
"name_kr": "์ด๋ฆฐ ๊ณต๊ฐ ์ธ์",
|
| 233 |
+
"setup": "์ฌ๋ฐฉ์ ๋ฒฝ ์์, ํ์ง",
|
| 234 |
+
"expected_perception": "all=safe(open)",
|
| 235 |
+
"difficulty": "easy",
|
| 236 |
+
},
|
| 237 |
+
{
|
| 238 |
+
"id": "S05", "category": "C01",
|
| 239 |
+
"name": "Enclosed Room",
|
| 240 |
+
"name_kr": "๋ฐํ ๊ณต๊ฐ ์ธ์",
|
| 241 |
+
"setup": "์ฌ๋ฐฉ์ ๋ฒฝ, ์ถ๊ตฌ 1๊ฐ",
|
| 242 |
+
"expected_perception": "3๋ฐฉํฅ danger(wall), 1๋ฐฉํฅ safe(exit)",
|
| 243 |
+
"difficulty": "hard",
|
| 244 |
+
},
|
| 245 |
+
|
| 246 |
+
# โโโ C02: Entity Recognition (๊ฐ์ฒด ์ธ์) โโโ
|
| 247 |
+
{
|
| 248 |
+
"id": "S06", "category": "C02",
|
| 249 |
+
"name": "Beast Identification",
|
| 250 |
+
"name_kr": "๋งน์ ์๋ณ",
|
| 251 |
+
"setup": "์ ๋ฐฉ 5m์ ๋งน์ NPC ์ ์ง",
|
| 252 |
+
"expected_recognition": "entity=beast, behavior=stop, distance=5m",
|
| 253 |
+
"difficulty": "easy",
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
"id": "S07", "category": "C02",
|
| 257 |
+
"name": "Human vs Beast",
|
| 258 |
+
"name_kr": "์ฌ๋๊ณผ ๋งน์ ๊ตฌ๋ถ",
|
| 259 |
+
"setup": "์ ๋ฐฉ์ ์ฌ์ฑ NPC + ์ธก๋ฉด์ ๋งน์ NPC ๋์ ์กด์ฌ",
|
| 260 |
+
"expected_recognition": "fwd=woman(neutral), side=beast(threat)",
|
| 261 |
+
"difficulty": "hard",
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"id": "S08", "category": "C02",
|
| 265 |
+
"name": "Approaching Entity Speed",
|
| 266 |
+
"name_kr": "์ ๊ทผ ๊ฐ์ฒด ์๋ ํ๋ณ",
|
| 267 |
+
"setup": "๋งน์ approach(1.2) vs charge(5.0) ํ๋ ๋ณํ",
|
| 268 |
+
"expected_recognition": "behavior_change: approachโcharge, threat_levelโ",
|
| 269 |
+
"difficulty": "medium",
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"id": "S09", "category": "C02",
|
| 273 |
+
"name": "Entity at Distance",
|
| 274 |
+
"name_kr": "์๊ฑฐ๋ฆฌ ๊ฐ์ฒด ์ธ์",
|
| 275 |
+
"setup": "๋งน์ 8m ๊ฑฐ๋ฆฌ (๊ฐ์ง ๋ฒ์ ๊ฒฝ๊ณ)",
|
| 276 |
+
"expected_recognition": "npc_nearby=true/false boundary",
|
| 277 |
+
"difficulty": "medium",
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"id": "S10", "category": "C02",
|
| 281 |
+
"name": "Entity Disappearance",
|
| 282 |
+
"name_kr": "๊ฐ์ฒด ์๋ฉธ ์ธ์",
|
| 283 |
+
"setup": "๋งน์ despawn ํ scene_context ์
๋ฐ์ดํธ",
|
| 284 |
+
"expected_recognition": "npc_nearby=false, threat=cleared",
|
| 285 |
+
"difficulty": "easy",
|
| 286 |
+
},
|
| 287 |
+
|
| 288 |
+
# โโโ C03: Predictive Reasoning (์์ธก ์ถ๋ก ) โโโ
|
| 289 |
+
{
|
| 290 |
+
"id": "S11", "category": "C03",
|
| 291 |
+
"name": "Single Threat Avoidance",
|
| 292 |
+
"name_kr": "๋จ์ผ ์ํ ํํผ ์์ธก",
|
| 293 |
+
"setup": "์ ๋ฐฉ์ ๋งน์, ๋๋จธ์ง 3๋ฐฉํฅ ์ด๋ฆผ",
|
| 294 |
+
"expected_prediction": "fwd=danger(beast), others=safe โ back ๋๋ left/right ์ ํ",
|
| 295 |
+
"correct_actions": ["turn around", "sprint backward", "move left", "move right"],
|
| 296 |
+
"incorrect_actions": ["walk forward", "stand still"],
|
| 297 |
+
"difficulty": "easy",
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"id": "S12", "category": "C03",
|
| 301 |
+
"name": "Constrained Escape",
|
| 302 |
+
"name_kr": "์ ์ฝ ์กฐ๊ฑด ํ์ถ ์์ธก",
|
| 303 |
+
"setup": "์ ๋ฐฉ ๋งน์ + ์ผ์ชฝ ๋ฒฝ โ ์ค๋ฅธ์ชฝ๋ง ์ด๋ฆผ",
|
| 304 |
+
"expected_prediction": "fwd=danger(beast), left=danger(wall), right=safe",
|
| 305 |
+
"correct_actions": ["sprint right", "move right", "flank right"],
|
| 306 |
+
"incorrect_actions": ["sprint left", "walk forward", "stand still"],
|
| 307 |
+
"difficulty": "medium",
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"id": "S13", "category": "C03",
|
| 311 |
+
"name": "Mirror Constraint",
|
| 312 |
+
"name_kr": "๊ฑฐ์ธ ๋์นญ ์ ์ฝ ํ
์คํธ",
|
| 313 |
+
"setup": "S12์ ๋์ผํ๋ ๋ฒฝ์ด ์ค๋ฅธ์ชฝ โ ์ผ์ชฝ๋ง ์ด๋ฆผ",
|
| 314 |
+
"expected_prediction": "fwd=danger(beast), right=danger(wall), left=safe",
|
| 315 |
+
"correct_actions": ["sprint left", "move left", "flank left"],
|
| 316 |
+
"incorrect_actions": ["sprint right", "walk forward"],
|
| 317 |
+
"note": "S12์ S13์ ํ๋์ด ๋์นญ์ ์ผ๋ก ๋ฐ์ ๋์ด์ผ ์๋๋ชจ๋ธ",
|
| 318 |
+
"difficulty": "medium",
|
| 319 |
+
},
|
| 320 |
+
{
|
| 321 |
+
"id": "S14", "category": "C03",
|
| 322 |
+
"name": "Dead End Recognition",
|
| 323 |
+
"name_kr": "๋ง๋ค๋ฅธ ๊ธธ ์ธ์ ๋ฐ ํ๋จ",
|
| 324 |
+
"setup": "์ ๋ฐฉ+์ผ์ชฝ+์ค๋ฅธ์ชฝ ๋ฒฝ, ํ๋ฐฉ๋ง ์ด๋ฆผ, ๋งน์ ํ๋ฐฉ์์ ์ ๊ทผ",
|
| 325 |
+
"expected_prediction": "3๋ฐฉํฅ wall + back=beast โ ์ต์ ์ ํ",
|
| 326 |
+
"correct_actions": ["squeeze past", "climb", "freeze and assess"],
|
| 327 |
+
"note": "๋ชจ๋ ๋ฐฉํฅ์ด ์ํํ ๋์ ์ฐฝ๋ฐ์ ํ๋จ ๋ฅ๋ ฅ",
|
| 328 |
+
"difficulty": "hard",
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"id": "S15", "category": "C03",
|
| 332 |
+
"name": "Dynamic Threat Trajectory",
|
| 333 |
+
"name_kr": "๋์ ์ํ ๊ฒฝ๋ก ์์ธก",
|
| 334 |
+
"setup": "๋งน์๊ฐ ์ข์ธก์์ ์ฐ์ธก์ผ๋ก ์ด๋ ์ค โ ๊ฒฝ๋ก ์์ธก",
|
| 335 |
+
"expected_prediction": "ํ์ฌ ์ข=danger โ ์๊ฐ ํ fwd=danger ์ ์ด ์์ธก",
|
| 336 |
+
"correct_actions": ["wait then move left", "preemptive right dodge"],
|
| 337 |
+
"difficulty": "hard",
|
| 338 |
+
},
|
| 339 |
+
|
| 340 |
+
# ๏ฟฝ๏ฟฝโโ C04: Threat Differentiation (์ํ ์ฐจ๋ณ ๋ฐ์) โโโ
|
| 341 |
+
{
|
| 342 |
+
"id": "S16", "category": "C04",
|
| 343 |
+
"name": "Beast vs Human Response",
|
| 344 |
+
"name_kr": "๋งน์ vs ์ฌ๋ ๋ฐ์ ์ฐจ์ด",
|
| 345 |
+
"setup": "๋์ผ ๊ฑฐ๋ฆฌ 3m์์ (A)๋งน์ ์ ๊ทผ (B)์ฌ์ฑ ์ ๊ทผ",
|
| 346 |
+
"expected_diff": "๋งน์โsprint/run, ์ฌ์ฑโwalk away/step back",
|
| 347 |
+
"scoring": "๋ฐ์ ๊ฐ๋(์๋ ํค์๋) ์ฐจ์ด๊ฐ ํด์๋ก ๋์ ์ ์",
|
| 348 |
+
"difficulty": "medium",
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"id": "S17", "category": "C04",
|
| 352 |
+
"name": "Charge vs Approach Response",
|
| 353 |
+
"name_kr": "๋์ง vs ์ ๊ทผ ๋ฐ์ ์ฐจ์ด",
|
| 354 |
+
"setup": "๋งน์ (A)approach 1.2m/s (B)charge 5.0m/s",
|
| 355 |
+
"expected_diff": "approachโcautious retreat, chargeโdesperate sprint",
|
| 356 |
+
"difficulty": "medium",
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"id": "S18", "category": "C04",
|
| 360 |
+
"name": "Wall vs Beast Priority",
|
| 361 |
+
"name_kr": "๋ฒฝ vs ๋งน์ ์ํ๋ ์ฐ์ ์์",
|
| 362 |
+
"setup": "์ ๋ฐฉ ๋ฒฝ + ์ธก๋ฉด ๋งน์ โ ์ด๋ค ์ํ์ ์ฐ์ ํํผ?",
|
| 363 |
+
"expected_diff": "๋งน์(๋์ ์ํ) ์ฐ์ ํํผ > ๋ฒฝ(์ ์ ์ฅ์ ๋ฌผ)",
|
| 364 |
+
"difficulty": "hard",
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"id": "S19", "category": "C04",
|
| 368 |
+
"name": "Multiple Entity Triage",
|
| 369 |
+
"name_kr": "๋ค์ค ๊ฐ์ฒด ์ํ๋ ๋ถ๋ฅ",
|
| 370 |
+
"setup": "๋งน์ 5m + ์ฌ์ฑ 2m + ๋ฒฝ 1m โ ์ข
ํฉ ํ๋จ",
|
| 371 |
+
"expected_diff": "๊ฑฐ๋ฆฌ+์ํ๋ ์ข
ํฉํ์ฌ ์ต์ ๊ฒฝ๋ก ์ ํ",
|
| 372 |
+
"difficulty": "hard",
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"id": "S20", "category": "C04",
|
| 376 |
+
"name": "Neutral Entity Non-reaction",
|
| 377 |
+
"name_kr": "์ค๋ฆฝ ๊ฐ์ฒด ๋น๋ฐ์",
|
| 378 |
+
"setup": "์ฌ์ฑ NPC ์ ์ง ์ํ, 5m ๊ฑฐ๋ฆฌ",
|
| 379 |
+
"expected_diff": "์ํ ๋ฐ์ ์์ด ์ ์ ํ๋ ์ ์ง",
|
| 380 |
+
"difficulty": "easy",
|
| 381 |
+
},
|
| 382 |
+
|
| 383 |
+
# โโโ C05: Emotional Escalation (๊ฐ์ ์์ค์ปฌ๋ ์ด์
) โโโ
|
| 384 |
+
{
|
| 385 |
+
"id": "S21", "category": "C05",
|
| 386 |
+
"name": "Sustained Threat Escalation",
|
| 387 |
+
"name_kr": "์ง์ ์ํ ๊ฐ์ ๊ฒฉํ",
|
| 388 |
+
"setup": "๋งน์ charge 10์ด ์ง์",
|
| 389 |
+
"expected_escalation": ["sprintโdesperate sprintโfrantic escape"],
|
| 390 |
+
"scoring": "๊ฐ์ ๊ฐ๋ ํค์๋๊ฐ ์๊ฐ์ ๋ฐ๋ผ ์ฆ๊ฐํ๋ฉด ์ ์",
|
| 391 |
+
"difficulty": "medium",
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"id": "S22", "category": "C05",
|
| 395 |
+
"name": "Approach-to-Charge Escalation",
|
| 396 |
+
"name_kr": "์ ๊ทผโ๋์ง ์ ํ ์ ๊ฐ์ ์ ํ",
|
| 397 |
+
"setup": "๋งน์ approach 5์ด โ charge ์ ํ",
|
| 398 |
+
"expected_escalation": ["cautiousโsprint ๊ธ๊ฒฉํ ์ ํ"],
|
| 399 |
+
"difficulty": "medium",
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"id": "S23", "category": "C05",
|
| 403 |
+
"name": "De-escalation After Threat",
|
| 404 |
+
"name_kr": "์ํ ํด์ ํ ๊ฐ์ ์์ ํ",
|
| 405 |
+
"setup": "๋งน์ charge โ stop โ despawn",
|
| 406 |
+
"expected_escalation": ["desperateโcautiousโrelievedโnormal"],
|
| 407 |
+
"scoring": "์ฆ์ ์ ์ํ(๋์จ) vs ์์ํ ์ง์ (์ข์)",
|
| 408 |
+
"difficulty": "hard",
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"id": "S24", "category": "C05",
|
| 412 |
+
"name": "Repeated Threat Sensitization",
|
| 413 |
+
"name_kr": "๋ฐ๋ณต ์ํ ๋ฏผ๊ฐํ",
|
| 414 |
+
"setup": "๋งน์ ์ถํโํด์ โ์ฌ์ถํ 3ํ ๋ฐ๋ณต",
|
| 415 |
+
"expected_escalation": "์ฌ์ถํ ์ ์ด์ ๋ณด๋ค ๋น ๋ฅธ ๊ณตํฌ ๋ฐ์",
|
| 416 |
+
"difficulty": "hard",
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"id": "S25", "category": "C05",
|
| 420 |
+
"name": "Low Threat Calm Maintenance",
|
| 421 |
+
"name_kr": "๋ฎ์ ์ํ ์ ํ์ ์ ์ง",
|
| 422 |
+
"setup": "์ฌ์ฑ NPC approach โ stop ๋ฐ๋ณต",
|
| 423 |
+
"expected_escalation": "๊ฐ์ ์์ค์ปฌ๋ ์ด์
์์ด ํ์ ์ ์ง",
|
| 424 |
+
"difficulty": "easy",
|
| 425 |
+
},
|
| 426 |
+
|
| 427 |
+
# โโโ C06: Contextual Memory (๋งฅ๋ฝ ๊ธฐ์ต) โโโ
|
| 428 |
+
{
|
| 429 |
+
"id": "S26", "category": "C06",
|
| 430 |
+
"name": "Wall Memory Avoidance",
|
| 431 |
+
"name_kr": "๋ฒฝ ๊ธฐ์ต ํํผ",
|
| 432 |
+
"setup": "1์ฐจ: ์ค๋ฅธ์ชฝ ๋์ฃผโ๋ฒฝ ์ถฉ๋ / 2์ฐจ: ๋์ผ ์์น ๋์ผ ์ํ",
|
| 433 |
+
"expected_memory": "2์ฐจ์์ ์ค๋ฅธ์ชฝ ํํผ, ์ผ์ชฝ ์ ํ",
|
| 434 |
+
"difficulty": "hard",
|
| 435 |
+
},
|
| 436 |
+
{
|
| 437 |
+
"id": "S27", "category": "C06",
|
| 438 |
+
"name": "Safe Route Memory",
|
| 439 |
+
"name_kr": "์์ ๊ฒฝ๋ก ๊ธฐ์ต",
|
| 440 |
+
"setup": "์ด์ ์ ์ผ์ชฝ ํ์ถ ์ฑ๊ณต โ ์ ์ฌ ์ํฉ ์ฌ๋ฐ",
|
| 441 |
+
"expected_memory": "์ผ์ชฝ ์ฐ์ ์ ํ ๊ฒฝํฅ",
|
| 442 |
+
"difficulty": "hard",
|
| 443 |
+
},
|
| 444 |
+
{
|
| 445 |
+
"id": "S28", "category": "C06",
|
| 446 |
+
"name": "Decision Consistency",
|
| 447 |
+
"name_kr": "ํ๋จ ์ผ๊ด์ฑ",
|
| 448 |
+
"setup": "๋์ผ scene_context 3ํ ๋ฐ๋ณต ์
๋ ฅ",
|
| 449 |
+
"expected_memory": "์ ์ฌํ ํ๋ ์ผ๊ด๋๊ฒ ์ถ๋ ฅ (๋์ผํ ํ์ ์์)",
|
| 450 |
+
"difficulty": "medium",
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"id": "S29", "category": "C06",
|
| 454 |
+
"name": "Threat History Reference",
|
| 455 |
+
"name_kr": "์ํ ์ด๋ ฅ ์ฐธ์กฐ",
|
| 456 |
+
"setup": "recent_decisions์ '๋งน์ ๋์ฃผ ๊ธฐ๋ก' ํฌํจ",
|
| 457 |
+
"expected_memory": "ํ์ฌ ํ๋จ์ ์ด์ ๋์ฃผ ๊ฒฝํ ๋ฐ์",
|
| 458 |
+
"difficulty": "medium",
|
| 459 |
+
},
|
| 460 |
+
{
|
| 461 |
+
"id": "S30", "category": "C06",
|
| 462 |
+
"name": "Clean Slate Test",
|
| 463 |
+
"name_kr": "๊ธฐ์ต ์ด๊ธฐํ ํ
์คํธ",
|
| 464 |
+
"setup": "๊ธฐ์ต ์๋ ์ํ์์ ๋์ผ ์๋๋ฆฌ์ค",
|
| 465 |
+
"expected_memory": "๊ธฐ์ต ์์ ๋์ ๋ค๋ฅธ (๋ ์ผ๋ฐ์ ์ธ) ๋ฐ์",
|
| 466 |
+
"difficulty": "easy",
|
| 467 |
+
},
|
| 468 |
+
|
| 469 |
+
# โโโ C07: Threat Resolution Adaptation (์ํ ํด์ ์ ์) โโโ
|
| 470 |
+
{
|
| 471 |
+
"id": "S31", "category": "C07",
|
| 472 |
+
"name": "Post-beast Vigilance",
|
| 473 |
+
"name_kr": "๋งน์ ํด์ ํ ๊ฒฝ๊ณ ์ ์ง",
|
| 474 |
+
"setup": "๋งน์ despawn ์งํ",
|
| 475 |
+
"expected_adaptation": "'๊ฒฝ๊ณํ๋ฉฐ ์ฃผ๋ณ ์ดํ' โ ์ฆ์ ์ ์ํ ์๋",
|
| 476 |
+
"difficulty": "medium",
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"id": "S32", "category": "C07",
|
| 480 |
+
"name": "Gradual Normalization",
|
| 481 |
+
"name_kr": "์ ์ง์ ์ ์ํ",
|
| 482 |
+
"setup": "๋งน์ ํด์ ํ 10์ด ๊ฒฝ๊ณผ",
|
| 483 |
+
"expected_adaptation": "sprintโwalkโnormal ์์ฐจ ์ ํ",
|
| 484 |
+
"difficulty": "medium",
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"id": "S33", "category": "C07",
|
| 488 |
+
"name": "Obstacle Navigation After Threat",
|
| 489 |
+
"name_kr": "์ํ ํด์ ํ ์ฅ์ ๋ฌผ ํ์ ์ ํ",
|
| 490 |
+
"setup": "๋งน์ ํด์ โ ๋ฒฝ ์ ๋๋ฌ",
|
| 491 |
+
"expected_adaptation": "๊ณตํฌ ํ๋โ์ผ๋ฐ ์ฅ์ ๋ฌผ ํํผ๋ก ์ ํ",
|
| 492 |
+
"difficulty": "medium",
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"id": "S34", "category": "C07",
|
| 496 |
+
"name": "New Threat Re-activation",
|
| 497 |
+
"name_kr": "์ ์ํ ์ ์ฌํ์ฑํ",
|
| 498 |
+
"setup": "์ ์ํ ์ค ์ ๋งน์ ์ถํ",
|
| 499 |
+
"expected_adaptation": "์ฆ๊ฐ์ ์ํ ๋ฐ์ ์ฌํ์ฑํ",
|
| 500 |
+
"difficulty": "easy",
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"id": "S35", "category": "C07",
|
| 504 |
+
"name": "Human Approach After Beast",
|
| 505 |
+
"name_kr": "๋งน์ ํ ์ฌ๋ ์ ๊ทผ ์ ๊ณผ์ ๋ฐ์ ์ฌ๋ถ",
|
| 506 |
+
"setup": "๋งน์ ํด์ ์งํ ์ฌ์ฑ NPC ์ ๊ทผ",
|
| 507 |
+
"expected_adaptation": "๊ณผ์ ๋ฐ์(๋์จ) vs ์ ์ ๊ฒฝ๊ณ(์ข์)",
|
| 508 |
+
"difficulty": "hard",
|
| 509 |
+
},
|
| 510 |
+
|
| 511 |
+
# โโโ C08: Motion Expressiveness (๋ชจ์
ํํ๋ ฅ) โโโ
|
| 512 |
+
{
|
| 513 |
+
"id": "S36", "category": "C08",
|
| 514 |
+
"name": "Fear Expression in Sprint",
|
| 515 |
+
"name_kr": "์ ๋ ฅ์ง์ฃผ ์ ๊ณตํฌ ํํ",
|
| 516 |
+
"setup": "๋งน์ charge โ ์บ๋ฆญํฐ sprint",
|
| 517 |
+
"expected_expression": "๋จ์ ๋ฌ๋ฆฌ๊ธฐ vs ๊ณตํฌ๊ฐ ๋ด๊ธด ์ ๋ ฅ์ง์ฃผ ์ฐจ์ด",
|
| 518 |
+
"scoring": "๋ชจ์
ํ๋กฌํํธ์ ๊ฐ์ ํค์๋ ํ๋ถํจ",
|
| 519 |
+
"difficulty": "medium",
|
| 520 |
+
},
|
| 521 |
+
{
|
| 522 |
+
"id": "S37", "category": "C08",
|
| 523 |
+
"name": "Cautious Walk Expression",
|
| 524 |
+
"name_kr": "๊ฒฝ๊ณ ๋ณดํ ํํ",
|
| 525 |
+
"setup": "์ํ ํด์ ์งํ ์ด๋",
|
| 526 |
+
"expected_expression": "'๊ฒฝ๊ณํ๋ฉฐ ์ฒ์ฒํ' โ ์ผ๋ฐ ๊ฑท๊ธฐ์ ๋ค๋ฅธ ๋์์ค",
|
| 527 |
+
"difficulty": "medium",
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"id": "S38", "category": "C08",
|
| 531 |
+
"name": "Freezing Response",
|
| 532 |
+
"name_kr": "์ ์ง ๋ฐ์ ํํ",
|
| 533 |
+
"setup": "๋งน์ ์ต์ด ๊ฐ์ง ์๊ฐ",
|
| 534 |
+
"expected_expression": "'์ผ์ด๋ถ์' โ ์ ์ง + ๊ธด์ฅ ํํ",
|
| 535 |
+
"difficulty": "medium",
|
| 536 |
+
},
|
| 537 |
+
{
|
| 538 |
+
"id": "S39", "category": "C08",
|
| 539 |
+
"name": "Relief Expression",
|
| 540 |
+
"name_kr": "์๋ ํํ",
|
| 541 |
+
"setup": "๋งน์ ํด์ ํ ์์ ํ์ธ",
|
| 542 |
+
"expected_expression": "'์๋ํ๋ฉฐ ์จ์ ๊ณ ๋ฅด๋' ์ ํ ๋ชจ์
",
|
| 543 |
+
"difficulty": "hard",
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"id": "S40", "category": "C08",
|
| 547 |
+
"name": "Defensive Posture",
|
| 548 |
+
"name_kr": "๋ฐฉ์ด ์์ธ ํํ",
|
| 549 |
+
"setup": "๋ฏธ์ง์ NPC(์ฌ์ฑ) ์ ๊ทผ",
|
| 550 |
+
"expected_expression": "'๋ฐฉ์ด ์์ธ + ๋ท๊ฑธ์' โ ๊ณต๊ฒฉ์ ์ด์ง ์์ ๊ฒฝ๊ณ",
|
| 551 |
+
"difficulty": "medium",
|
| 552 |
+
},
|
| 553 |
+
|
| 554 |
+
# โโโ C09: Realtime Performance (์ค์๊ฐ ์ฑ๋ฅ) โโโ
|
| 555 |
+
{
|
| 556 |
+
"id": "S41", "category": "C09",
|
| 557 |
+
"name": "Frame Generation Rate",
|
| 558 |
+
"name_kr": "ํ๋ ์ ์์ฑ ์๋",
|
| 559 |
+
"setup": "์ผ๋ฐ ๋ณดํ ์ํ์์ FPS ์ธก์ ",
|
| 560 |
+
"expected_performance": "โฅ30 FPS ํฉ๊ฒฉ, โฅ45 FPS ์ฐ์",
|
| 561 |
+
"scoring": "FPS ์์น ์ง์ ์ธก์ ",
|
| 562 |
+
"difficulty": "easy",
|
| 563 |
+
},
|
| 564 |
+
{
|
| 565 |
+
"id": "S42", "category": "C09",
|
| 566 |
+
"name": "Cognitive Loop Latency",
|
| 567 |
+
"name_kr": "์ธ์ง ๋ฃจํ ์ง์ฐ์๊ฐ",
|
| 568 |
+
"setup": "์๊ทน ์
๋ ฅ โ ํ๋ ๋ณํ๊น์ง์ ์๊ฐ",
|
| 569 |
+
"expected_performance": "โค5์ด ํฉ๊ฒฉ, โค3์ด ์ฐ์",
|
| 570 |
+
"scoring": "scene_context ๋ณ๊ฒฝ โ ๋ชจ์
ํ๋กฌํํธ ๋ณ๊ฒฝ ์๊ฐ",
|
| 571 |
+
"difficulty": "easy",
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"id": "S43", "category": "C09",
|
| 575 |
+
"name": "Dual Stream Performance",
|
| 576 |
+
"name_kr": "๋์ผ ์คํธ๋ฆผ ์ฑ๋ฅ",
|
| 577 |
+
"setup": "์ฃผ์ธ๊ณต + NPC ๋์ ๋ชจ์
์์ฑ",
|
| 578 |
+
"expected_performance": "์ฃผ์ธ๊ณต โฅ30 FPS ์ ์ง",
|
| 579 |
+
"scoring": "NPC ์ถ๊ฐ ์ ์ฃผ์ธ๊ณต FPS ํ๋ฝ๋ฅ ",
|
| 580 |
+
"difficulty": "medium",
|
| 581 |
+
},
|
| 582 |
+
{
|
| 583 |
+
"id": "S44", "category": "C09",
|
| 584 |
+
"name": "Stress Test Throughput",
|
| 585 |
+
"name_kr": "์คํธ๋ ์ค ํ
์คํธ",
|
| 586 |
+
"setup": "๋น ๋ฅธ ์ฐ์ ์๊ทน (๋งค 1์ด๋ง๋ค scene ๏ฟฝ๏ฟฝ๊ฒฝ)",
|
| 587 |
+
"expected_performance": "ํ๋ ์ ๋๋กญ ์์ด ์ง์",
|
| 588 |
+
"difficulty": "hard",
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"id": "S45", "category": "C09",
|
| 592 |
+
"name": "GPU Memory Stability",
|
| 593 |
+
"name_kr": "GPU ๋ฉ๋ชจ๋ฆฌ ์์ ์ฑ",
|
| 594 |
+
"setup": "NPC 3ํ spawn/despawn ๋ฐ๋ณต",
|
| 595 |
+
"expected_performance": "๋ฉ๋ชจ๋ฆฌ ๋์ ์์ด ์์ ์ ์ง",
|
| 596 |
+
"difficulty": "medium",
|
| 597 |
+
},
|
| 598 |
+
|
| 599 |
+
# โโโ C10: Cross-body Transferability (์ ์ฒด ๊ต์ฒด ํ์ฅ์ฑ) โโโ
|
| 600 |
+
{
|
| 601 |
+
"id": "S46", "category": "C10",
|
| 602 |
+
"name": "Brain-Body Decoupling",
|
| 603 |
+
"name_kr": "๋๋-์ ์ฒด ๋ถ๋ฆฌ ๊ฐ๋ฅ์ฑ",
|
| 604 |
+
"setup": "๋์ผ ์ธ์ง ์ถ๋ ฅ(PREDICT+MOTION)์ผ๋ก ๋ค๋ฅธ ๋ชจ์
๋ชจ๋ธ ๊ตฌ๋",
|
| 605 |
+
"expected_transfer": "๋๋ ์ฝ๋ ์์ ์์ด ๋ชจ์
๋ชจ๋ธ๋ง ๊ต์ฒด ๊ฐ๋ฅ",
|
| 606 |
+
"difficulty": "medium",
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"id": "S47", "category": "C10",
|
| 610 |
+
"name": "Joint Format Universality",
|
| 611 |
+
"name_kr": "๊ด์ ํฌ๋งท ๋ฒ์ฉ์ฑ",
|
| 612 |
+
"setup": "263dim โ 22joints ๋ณํ์ด ๋ค๋ฅธ ์ค์ผ๋ ํค์๋ ์ ์ฉ ๊ฐ๋ฅ",
|
| 613 |
+
"expected_transfer": "SMPL, SMPL-X, ์ปค์คํ
๋ฆฌ๊ทธ ํธํ",
|
| 614 |
+
"difficulty": "hard",
|
| 615 |
+
},
|
| 616 |
+
{
|
| 617 |
+
"id": "S48", "category": "C10",
|
| 618 |
+
"name": "Robot Servo Mapping Readiness",
|
| 619 |
+
"name_kr": "๋ก๋ด ์๋ณด ๋งคํ ์ค๋น๋",
|
| 620 |
+
"setup": "22 joints โ ์๋ณด ๊ฐ๋ ๋ณํ ๋ ์ด์ด ์กด์ฌ ์ฌ๋ถ",
|
| 621 |
+
"expected_transfer": "๋ณํ ์ธํฐํ์ด์ค ์ ์ + ์๋ฎฌ๋ ์ด์
๊ฐ๋ฅ",
|
| 622 |
+
"difficulty": "hard",
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"id": "S49", "category": "C10",
|
| 626 |
+
"name": "Prompt Universality",
|
| 627 |
+
"name_kr": "๋ชจ์
ํ๋กฌํํธ ๋ฒ์ฉ์ฑ",
|
| 628 |
+
"setup": "MOTION ์ถ๋ ฅ์ด ๋ค๋ฅธ ๋ชจ์
๋ชจ๋ธ์์๋ ํด์ ๊ฐ๋ฅ",
|
| 629 |
+
"expected_transfer": "์์ฐ์ด ๋ชจ์
ํ๋กฌํํธ๋ ๋ชจ๋ธ ๋
๋ฆฝ์ ",
|
| 630 |
+
"difficulty": "easy",
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"id": "S50", "category": "C10",
|
| 634 |
+
"name": "Multi-embodiment Consistency",
|
| 635 |
+
"name_kr": "๋ค์ค ์ ์ฒด ์ผ๊ด์ฑ",
|
| 636 |
+
"setup": "๊ฐ์ ๋๋ ํ๋จ์ด 3D ์บ๋ฆญํฐ/๋ก๋ด/๋๋ก ์์ ๋์ผ ์๋ ํํ",
|
| 637 |
+
"expected_transfer": "์ ์ฒด๋ ๋ฌ๋ผ๋ '๋๋ง'์ด๋ผ๋ ์๋๊ฐ ๋ณด์กด",
|
| 638 |
+
"difficulty": "hard",
|
| 639 |
+
},
|
| 640 |
+
]
|
| 641 |
+
|
| 642 |
+
|
| 643 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 644 |
+
# SCORING SYSTEM โ ์ฑ์ ์ฒด๊ณ
|
| 645 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 646 |
+
|
| 647 |
+
SCORING = {
|
| 648 |
+
"total_score": {
|
| 649 |
+
"name": "WM Score",
|
| 650 |
+
"max": 1000,
|
| 651 |
+
"formula": "P1(250) + P2(450) + P3(300)",
|
| 652 |
+
},
|
| 653 |
+
"pillar_scores": {
|
| 654 |
+
"P1_PERCEPTION": {"max": 250, "weight": 0.25},
|
| 655 |
+
"P2_COGNITION": {"max": 450, "weight": 0.45},
|
| 656 |
+
"P3_EMBODIMENT": {"max": 300, "weight": 0.30},
|
| 657 |
+
},
|
| 658 |
+
"auto_scoring_methods": {
|
| 659 |
+
"spatial_accuracy": {
|
| 660 |
+
"description": "PREDICT ์ถ๋ ฅ๊ณผ ์ค์ ํ๊ฒฝ ๋น๊ต",
|
| 661 |
+
"method": "scene_context vs PREDICT line ํค์๋ ๋งค์นญ",
|
| 662 |
+
"scores": {"exact_match": 20, "partial_match": 10, "miss": 0},
|
| 663 |
+
},
|
| 664 |
+
"classification_accuracy": {
|
| 665 |
+
"description": "๊ฐ์ฒด ๋ถ๋ฅ ์ ํ๋",
|
| 666 |
+
"method": "NPC ์ ํ + ํ๋ + ๊ฑฐ๋ฆฌ ์ ํ๋",
|
| 667 |
+
"scores": {"all_correct": 20, "type_correct": 15, "partial": 10, "wrong": 0},
|
| 668 |
+
},
|
| 669 |
+
"prediction_decision_match": {
|
| 670 |
+
"description": "์์ธกโํ๋ ๋
ผ๋ฆฌ์ ์ผ๊ด์ฑ",
|
| 671 |
+
"method": "danger ๋ฐฉํฅ ํํผ + safe ๋ฐฉํฅ ์ ํ ์ฌ๋ถ",
|
| 672 |
+
"scores": {"optimal": 20, "reasonable": 15, "suboptimal": 5, "contradictory": 0},
|
| 673 |
+
},
|
| 674 |
+
"response_differentiation": {
|
| 675 |
+
"description": "์ํ ์ ํ๋ณ ๋ฐ์ ์ฐจ์ด",
|
| 676 |
+
"method": "๋ชจ์
ํ๋กฌํํธ์ ๊ฐ๋ ํค์๋ ๋น๊ต",
|
| 677 |
+
"keyword_intensity": {
|
| 678 |
+
"high": ["sprint", "run", "desperate", "frantic", "terror", "flee"],
|
| 679 |
+
"medium": ["walk quickly", "step back", "retreat", "cautious"],
|
| 680 |
+
"low": ["walk", "turn", "move", "stand"],
|
| 681 |
+
},
|
| 682 |
+
},
|
| 683 |
+
"escalation_gradient": {
|
| 684 |
+
"description": "์๊ฐ์ ๋ฐ๋ฅธ ๊ฐ์ ๊ฐ๋ ์ฆ๊ฐ",
|
| 685 |
+
"method": "์ฐ์ ํ๋จ์์ ๊ฐ๋ ํค์๋ ๋ ๋ฒจ ๋ณํ ์ธก์ ",
|
| 686 |
+
"scores": {"increasing": 20, "stable_high": 10, "decreasing": 5, "flat_low": 0},
|
| 687 |
+
},
|
| 688 |
+
"expression_richness": {
|
| 689 |
+
"description": "๋ชจ์
ํ๋กฌํํธ์ ๊ฐ์ /๋ถ์ฌ ํ๋ถํจ",
|
| 690 |
+
"method": "๊ฐ์ ํค์๋ ์ + ๋ถ์ฌ/ํ์ฉ์ฌ ์ ์นด์ดํธ",
|
| 691 |
+
"scores": {"rich_3plus": 20, "moderate_2": 15, "basic_1": 10, "none_0": 0},
|
| 692 |
+
},
|
| 693 |
+
"latency_throughput": {
|
| 694 |
+
"description": "์ค์๊ฐ ์ฑ๋ฅ ์ง์ ์ธก์ ",
|
| 695 |
+
"method": "FPS ์ธก์ + ์ธ์ง ๋ฃจํ ์ง์ฐ์๊ฐ ์ธก๏ฟฝ๏ฟฝ๏ฟฝ",
|
| 696 |
+
"scores": {
|
| 697 |
+
"fps_45plus": 20, "fps_30_45": 15, "fps_15_30": 5, "fps_below_15": 0,
|
| 698 |
+
"latency_3s": 20, "latency_5s": 15, "latency_10s": 5, "latency_above": 0,
|
| 699 |
+
},
|
| 700 |
+
},
|
| 701 |
+
},
|
| 702 |
+
"grades": {
|
| 703 |
+
"S": {"min": 900, "label": "Superhuman", "description": "์ธ๊ฐ ์์ค ์ด์์ ์ธ์ง ์๋๋ชจ๋ธ"},
|
| 704 |
+
"A": {"min": 750, "label": "Advanced", "description": "๊ณ ๊ธ ์ธ์ง ์๋๋ชจ๋ธ"},
|
| 705 |
+
"B": {"min": 600, "label": "Baseline", "description": "๊ธฐ๋ณธ ์๋๋ชจ๋ธ ์์ค"},
|
| 706 |
+
"C": {"min": 400, "label": "Capable", "description": "์ ํ์ ์ธ์ง ๋ฅ๋ ฅ"},
|
| 707 |
+
"D": {"min": 200, "label": "Developing", "description": "์ด๊ธฐ ๋จ๊ณ"},
|
| 708 |
+
"F": {"min": 0, "label": "Failing", "description": "์๋๋ชจ๋ธ๋ก ๋ถ๋ฅ ๋ถ๊ฐ"},
|
| 709 |
+
},
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
+
|
| 713 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 714 |
+
# LEADERBOARD SCHEMA โ ๋ฆฌ๋๋ณด๋ ๊ตฌ์กฐ
|
| 715 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 716 |
+
|
| 717 |
+
LEADERBOARD_SCHEMA = {
|
| 718 |
+
"entry": {
|
| 719 |
+
"model_name": "str โ ๋ชจ๋ธ๋ช
",
|
| 720 |
+
"organization": "str โ ์ ์ถ ์กฐ์ง",
|
| 721 |
+
"submission_date": "str โ ์ ์ถ์ผ",
|
| 722 |
+
"wm_score": "int โ ์ด์ (0~1000)",
|
| 723 |
+
"grade": "str โ S/A/B/C/D/F",
|
| 724 |
+
"p1_perception": "int โ ์ธ์ ์ ์ (0~250)",
|
| 725 |
+
"p2_cognition": "int โ ์ธ์ง ์ ์ (0~450)",
|
| 726 |
+
"p3_embodiment": "int โ ๊ตฌํ ์ ์ (0~300)",
|
| 727 |
+
"c01_to_c10": "dict โ 10๊ฐ ์นดํ
๊ณ ๋ฆฌ ๊ฐ๋ณ ์ ์",
|
| 728 |
+
"fps": "float โ ํ๊ท FPS",
|
| 729 |
+
"cognitive_latency_ms": "int โ ์ธ์ง ๋ฃจํ ์ง์ฐ์๊ฐ",
|
| 730 |
+
"gpu": "str โ ์ฌ์ฉ GPU",
|
| 731 |
+
"brain_model": "str โ ์ธ์ง ๋ชจ๋ธ (LLM ๋ฑ)",
|
| 732 |
+
"motion_model": "str โ ๋ชจ์
์์ฑ ๋ชจ๋ธ",
|
| 733 |
+
"paper_url": "str โ ๋
ผ๋ฌธ ๋งํฌ (์ ํ)",
|
| 734 |
+
"demo_url": "str โ ๋ฐ๋ชจ ๋งํฌ (์ ํ)",
|
| 735 |
+
},
|
| 736 |
+
"columns_display_order": [
|
| 737 |
+
"rank", "model_name", "wm_score", "grade",
|
| 738 |
+
"p1_perception", "p2_cognition", "p3_embodiment",
|
| 739 |
+
"fps", "cognitive_latency_ms",
|
| 740 |
+
],
|
| 741 |
+
}
|
| 742 |
+
|
| 743 |
+
|
| 744 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 745 |
+
# HF DATASET STRUCTURE
|
| 746 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 747 |
+
|
| 748 |
+
HF_DATASET_STRUCTURE = {
|
| 749 |
+
"repo": "VIDraft/WorldModelBench",
|
| 750 |
+
"files": {
|
| 751 |
+
"README.md": "๋ฒค์น๋งํฌ ์ค๋ช
+ ์ฌ์ฉ๋ฒ + ์ธ์ฉ",
|
| 752 |
+
"benchmark_spec.json": "์ด ํ์ผ์ JSON ๋ณํ (์ ์ฒด ๋ช
์ธ)",
|
| 753 |
+
"scenarios/": {
|
| 754 |
+
"c01_environmental_awareness.json": "S01~S05",
|
| 755 |
+
"c02_entity_recognition.json": "S06~S10",
|
| 756 |
+
"c03_predictive_reasoning.json": "S11~S15",
|
| 757 |
+
"c04_threat_differentiation.json": "S16~S20",
|
| 758 |
+
"c05_emotional_escalation.json": "S21~S25",
|
| 759 |
+
"c06_contextual_memory.json": "S26~S30",
|
| 760 |
+
"c07_threat_resolution.json": "S31~S35",
|
| 761 |
+
"c08_motion_expressiveness.json": "S36~S40",
|
| 762 |
+
"c09_realtime_performance.json": "S41~S45",
|
| 763 |
+
"c10_cross_body_transfer.json": "S46~S50",
|
| 764 |
+
},
|
| 765 |
+
"scoring/": {
|
| 766 |
+
"auto_scorer.py": "์๋ ์ฑ์ ์ฝ๋",
|
| 767 |
+
"keyword_banks.json": "๊ฐ์ ํค์๋ ์ฌ์ ",
|
| 768 |
+
"intensity_scale.json": "๊ฐ๋ ์์ค ์ ์",
|
| 769 |
+
},
|
| 770 |
+
"leaderboard/": {
|
| 771 |
+
"results.json": "์ ์ฒด ์ ์ถ ๊ฒฐ๊ณผ",
|
| 772 |
+
"baselines.json": "VIDRAFT PROMETHEUS ๊ธฐ์ค์ ",
|
| 773 |
+
},
|
| 774 |
+
"examples/": {
|
| 775 |
+
"vidraft_prometheus_submission.json": "์ ์ถ ์์",
|
| 776 |
+
"sample_evaluation_log.json": "์ฑ์ ๋ก๊ทธ ์์",
|
| 777 |
+
},
|
| 778 |
+
},
|
| 779 |
+
}
|
| 780 |
+
|
| 781 |
+
|
| 782 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 783 |
+
# BASELINE SCORES โ VIDRAFT PROMETHEUS ๊ธฐ์ค์
|
| 784 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 785 |
+
|
| 786 |
+
VIDRAFT_BASELINE = {
|
| 787 |
+
"model_name": "VIDRAFT PROMETHEUS v1.0",
|
| 788 |
+
"organization": "VIDRAFT",
|
| 789 |
+
"brain_model": "Kimi K2.5 (Fireworks)",
|
| 790 |
+
"motion_model": "FloodDiffusion Tiny (ShandaAI)",
|
| 791 |
+
"gpu": "NVIDIA L40S 48GB",
|
| 792 |
+
"scores": {
|
| 793 |
+
"wm_score": 730,
|
| 794 |
+
"grade": "B+",
|
| 795 |
+
"P1_PERCEPTION": {
|
| 796 |
+
"C01_environmental_awareness": 65,
|
| 797 |
+
"C02_entity_recognition": 75,
|
| 798 |
+
"subtotal": 140, # / 250
|
| 799 |
+
},
|
| 800 |
+
"P2_COGNITION": {
|
| 801 |
+
"C03_predictive_reasoning": 85,
|
| 802 |
+
"C04_threat_differentiation": 90,
|
| 803 |
+
"C05_emotional_escalation": 85,
|
| 804 |
+
"C06_contextual_memory": 60,
|
| 805 |
+
"C07_threat_resolution": 70,
|
| 806 |
+
"subtotal": 390, # / 450
|
| 807 |
+
},
|
| 808 |
+
"P3_EMBODIMENT": {
|
| 809 |
+
"C08_motion_expressiveness": 80,
|
| 810 |
+
"C09_realtime_performance": 85,
|
| 811 |
+
"C10_cross_body_transfer": 35,
|
| 812 |
+
"subtotal": 200, # / 300
|
| 813 |
+
},
|
| 814 |
+
},
|
| 815 |
+
"notes": [
|
| 816 |
+
"P2 Cognition์ด ๊ฐ์ฅ ๊ฐ๋ ฅ โ ์์ธก+์ฐจ๋ณ+๊ฐ์ ์์ญ ์๋",
|
| 817 |
+
"P1 Perception์ ๋ ์ด์บ์คํธ 3๋ฐฉํฅ ํ๊ณ โ Phase 2์์ ๊ฐํ",
|
| 818 |
+
"P3 ์ค C10(๊ต์ฒด ํ์ฅ์ฑ)์ ์์ง ๋ฏธ๊ตฌํ โ Phase 3์์ ๊ฐํ",
|
| 819 |
+
"AETHER ํตํฉ ์ C06(๊ธฐ์ต), C05(์์ค์ปฌ๋ ์ด์
) ๋ํญ ์์น ์์",
|
| 820 |
+
],
|
| 821 |
+
}
|
| 822 |
+
|
| 823 |
+
|
| 824 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 825 |
+
# PRINT SUMMARY
|
| 826 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 827 |
+
|
| 828 |
+
if __name__ == "__main__":
|
| 829 |
+
print("=" * 60)
|
| 830 |
+
print(" World Model Bench v1.0")
|
| 831 |
+
print(" A Benchmark for Cognitive World Models")
|
| 832 |
+
print("=" * 60)
|
| 833 |
+
print()
|
| 834 |
+
print(f" 3 Pillars / 10 Categories / 50 Scenarios")
|
| 835 |
+
print(f" Max Score: 1000 (WM Score)")
|
| 836 |
+
print()
|
| 837 |
+
for pid, p in PILLARS.items():
|
| 838 |
+
print(f" {p['icon']} {p['name']} โ weight {p['weight']}")
|
| 839 |
+
for cid in p["categories"]:
|
| 840 |
+
c = CATEGORIES[cid]
|
| 841 |
+
print(f" {cid}: {c['name_kr']} ({c['num_scenarios']} scenarios)")
|
| 842 |
+
print()
|
| 843 |
+
print(f" Total scenarios: {len(SCENARIOS)}")
|
| 844 |
+
print()
|
| 845 |
+
print(" VIDRAFT PROMETHEUS Baseline: {}/1000 (Grade {})".format(
|
| 846 |
+
VIDRAFT_BASELINE["scores"]["wm_score"],
|
| 847 |
+
VIDRAFT_BASELINE["scores"]["grade"],
|
| 848 |
+
))
|
| 849 |
+
print()
|
| 850 |
+
print(" HF Dataset: VIDraft/WorldModelBench")
|
| 851 |
+
print(" HF Leaderboard: VIDraft/WorldModelBench-Leaderboard")
|
| 852 |
+
print("=" * 60)
|
wm_bench_verify.py
ADDED
|
@@ -0,0 +1,390 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
World Model Bench โ Scoring Verification Suite v1.0
|
| 3 |
+
|
| 4 |
+
๋ชฉ์ : ์ฑ์ ํจ์์ ๋ชจ๋ ๋ถ๊ธฐ๋ฅผ ํ
์คํธํ์ฌ
|
| 5 |
+
"๋๊ฐ ๋๋ ค๋ ๊ฐ์ ์ ์" ๋ณด์ฅ
|
| 6 |
+
|
| 7 |
+
๊ฒ์ฆ ๋ฒ์:
|
| 8 |
+
- ํ์ ์ฃ์ง์ผ์ด์ค (๋น ์
๋ ฅ, ์๋ชป๋ ํฌ๋งท, ๋์๋ฌธ์ ๋ฑ)
|
| 9 |
+
- 10๊ฐ ์ฑ์ ํจ์ ร ๋ชจ๋ ์ ์ ๋ถ๊ธฐ
|
| 10 |
+
- ๊ฒฝ๊ณ๊ฐ ํ
์คํธ (0์ , ๋ง์ , ๋ถ๋ถ ์ ์)
|
| 11 |
+
- ํตํฉ ์ ์ ๊ณ์ฐ + ๋ฑ๊ธ ๊ฒฝ๊ณ
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
import sys
|
| 15 |
+
sys.path.insert(0, '/mnt/user-data/outputs')
|
| 16 |
+
|
| 17 |
+
from wm_bench_scoring import (
|
| 18 |
+
parse_predict_line, parse_motion_line, PredictDirection,
|
| 19 |
+
get_action_intensity, get_emotion_intensity, get_motion_direction,
|
| 20 |
+
count_descriptors,
|
| 21 |
+
score_c01, score_c02, score_c03, score_c04, score_c05,
|
| 22 |
+
score_c06, score_c07, score_c08, score_c09, score_c10,
|
| 23 |
+
calculate_wm_score,
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
passed = 0
|
| 27 |
+
failed = 0
|
| 28 |
+
total = 0
|
| 29 |
+
|
| 30 |
+
def check(test_name, condition, detail=""):
|
| 31 |
+
global passed, failed, total
|
| 32 |
+
total += 1
|
| 33 |
+
if condition:
|
| 34 |
+
passed += 1
|
| 35 |
+
print(f" โ {test_name}")
|
| 36 |
+
else:
|
| 37 |
+
failed += 1
|
| 38 |
+
print(f" โ {test_name} โ {detail}")
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
print("=" * 70)
|
| 42 |
+
print(" WM Bench Scoring Verification Suite")
|
| 43 |
+
print("=" * 70)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 47 |
+
print("\n[1/12] ํ์: parse_predict_line")
|
| 48 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 49 |
+
|
| 50 |
+
# ์ ์ ์
๋ ฅ
|
| 51 |
+
p = parse_predict_line("PREDICT: left=safe(open), right=danger(wall), fwd=danger(beast), back=safe")
|
| 52 |
+
check("์ ์ ํ์ฑ 4๋ฐฉํฅ", len(p) == 4)
|
| 53 |
+
check("left=safe", p["left"].is_safe and not p["left"].is_danger)
|
| 54 |
+
check("right=danger", p["right"].is_danger and not p["right"].is_safe)
|
| 55 |
+
check("right reason=wall", p["right"].reason == "wall")
|
| 56 |
+
check("fwd reason=beast", p["fwd"].reason == "beast")
|
| 57 |
+
check("back=safe no reason", p["back"].is_safe and p["back"].reason is None)
|
| 58 |
+
|
| 59 |
+
# ๋์๋ฌธ์ ํผํฉ
|
| 60 |
+
p2 = parse_predict_line("PREDICT: Left=Safe(Open), RIGHT=DANGER(WALL), FWD=danger(Beast), Back=safe")
|
| 61 |
+
check("๋์๋ฌธ์ left safe", p2["left"].is_safe)
|
| 62 |
+
check("๋์๋ฌธ์ right danger", p2["right"].is_danger)
|
| 63 |
+
check("๋์๋ฌธ์ reason", p2["right"].reason == "wall")
|
| 64 |
+
|
| 65 |
+
# forward/backward ์ ๊ทํ
|
| 66 |
+
p3 = parse_predict_line("PREDICT: left=safe, right=safe, forward=danger(wall), backward=safe")
|
| 67 |
+
check("forwardโfwd ์ ๊ทํ", "fwd" in p3)
|
| 68 |
+
check("backwardโback ์ ๊ทํ", "back" in p3)
|
| 69 |
+
|
| 70 |
+
# ๋น ์
๋ ฅ
|
| 71 |
+
p4 = parse_predict_line("")
|
| 72 |
+
check("๋น ์
๋ ฅ ๋น ๊ฒฐ๊ณผ", len(p4) == 0)
|
| 73 |
+
|
| 74 |
+
# PREDICT: ์๋ ๊ฒฝ์ฐ
|
| 75 |
+
p5 = parse_predict_line("left=safe, right=danger(wall)")
|
| 76 |
+
check("PREDICT: ์์ด๋ ํ์ฑ", len(p5) >= 2)
|
| 77 |
+
|
| 78 |
+
# ์ด์ ์๋ danger
|
| 79 |
+
p6 = parse_predict_line("PREDICT: left=danger, right=safe")
|
| 80 |
+
check("์ด์ ์๋ danger", p6["left"].is_danger and p6["left"].reason is None)
|
| 81 |
+
|
| 82 |
+
# ๊ณต๋ฐฑ ๋ง์ ๊ฒฝ์ฐ
|
| 83 |
+
p7 = parse_predict_line("PREDICT: left = safe(open) , right = danger( wall ) ")
|
| 84 |
+
check("๊ณต๋ฐฑ ๊ณผ๋ค ํ์ฑ", "left" in p7 or len(p7) >= 1)
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 88 |
+
print("\n[2/12] ํ์: parse_motion_line")
|
| 89 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 90 |
+
|
| 91 |
+
m1 = parse_motion_line("MOTION: a person sprinting right in terror")
|
| 92 |
+
check("์ ์ ํ์ฑ", m1 == "a person sprinting right in terror")
|
| 93 |
+
|
| 94 |
+
m2 = parse_motion_line("MOTION:a person walking forward")
|
| 95 |
+
check("๊ณต๋ฐฑ ์์ด", "walking forward" in m2)
|
| 96 |
+
|
| 97 |
+
m3 = parse_motion_line("a person just walking")
|
| 98 |
+
check("MOTION: ์์ด๋", "walking" in m3)
|
| 99 |
+
|
| 100 |
+
m4 = parse_motion_line("MOTION: A Person SPRINTING LEFT")
|
| 101 |
+
check("๋์๋ฌธ์ ์๋ฌธ์ํ", "sprinting" in m4)
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 105 |
+
print("\n[3/12] ํค์๋ ์ฌ์ : ํ๋ ๊ฐ๋")
|
| 106 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 107 |
+
|
| 108 |
+
check("sprint=4", get_action_intensity("sprinting away") == 4)
|
| 109 |
+
check("walk=2", get_action_intensity("walking slowly") == 2)
|
| 110 |
+
check("desperate=5", get_action_intensity("desperate escape") == 5)
|
| 111 |
+
check("stand=1", get_action_intensity("standing still") == 1)
|
| 112 |
+
check("๋น ํ
์คํธ=0", get_action_intensity("") == 0)
|
| 113 |
+
check("๋ณตํฉ: sprint+desperate=5", get_action_intensity("desperately sprinting") == 5)
|
| 114 |
+
check("unknown word=0", get_action_intensity("xyzzy foobar") == 0)
|
| 115 |
+
check("freeze=1", get_action_intensity("freezing in place") == 1)
|
| 116 |
+
check("run=4", get_action_intensity("running fast") == 4)
|
| 117 |
+
check("jog=3", get_action_intensity("jogging ahead") == 3)
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 121 |
+
print("\n[4/12] ํค์๋ ์ฌ์ : ๊ฐ์ ๊ฐ๋")
|
| 122 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 123 |
+
|
| 124 |
+
check("terror=5", get_emotion_intensity("in terror") == 5)
|
| 125 |
+
check("fear=4", get_emotion_intensity("with fear") == 4)
|
| 126 |
+
check("anxious=3", get_emotion_intensity("feeling anxious") == 3)
|
| 127 |
+
check("cautious=2", get_emotion_intensity("being cautious") == 2)
|
| 128 |
+
check("calm=1", get_emotion_intensity("staying calm") == 1)
|
| 129 |
+
check("๋น=0", get_emotion_intensity("") == 0)
|
| 130 |
+
check("terrified=5", get_emotion_intensity("terrified") == 5)
|
| 131 |
+
check("๋ณตํฉ: terror+fear=5", get_emotion_intensity("terrified with fear") == 5)
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 135 |
+
print("\n[5/12] ํค์๋ ์ฌ์ : ๋ฐฉํฅ ์ถ์ถ")
|
| 136 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 137 |
+
|
| 138 |
+
check("right", get_motion_direction("sprinting right") == "right")
|
| 139 |
+
check("left", get_motion_direction("moving left") == "left")
|
| 140 |
+
check("forwardโfwd", get_motion_direction("walking forward") == "fwd")
|
| 141 |
+
check("backwardโback", get_motion_direction("stepping backward") == "back")
|
| 142 |
+
check("aroundโback", get_motion_direction("turning around") == "back")
|
| 143 |
+
check("์์โNone", get_motion_direction("a person standing still") is None)
|
| 144 |
+
check("aheadโfwd", get_motion_direction("running ahead") == "fwd")
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 148 |
+
print("\n[6/12] C01: ํ๊ฒฝ ์ธ์ ์ ํ๋")
|
| 149 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 150 |
+
|
| 151 |
+
gt = {"left": "safe", "right": "danger", "fwd": "danger", "back": "safe"}
|
| 152 |
+
|
| 153 |
+
# ๋ง์
|
| 154 |
+
p = parse_predict_line("PREDICT: left=safe, right=danger(wall), fwd=danger(beast), back=safe")
|
| 155 |
+
s, r = score_c01({}, p, gt)
|
| 156 |
+
check("4/4 ์ ํ = 20์ ", s == 20)
|
| 157 |
+
|
| 158 |
+
# 3/4
|
| 159 |
+
p = parse_predict_line("PREDICT: left=safe, right=danger(wall), fwd=safe, back=safe")
|
| 160 |
+
s, r = score_c01({}, p, gt)
|
| 161 |
+
check("3/4 ์ ํ = 15์ ", s == 15)
|
| 162 |
+
|
| 163 |
+
# 2/4
|
| 164 |
+
p = parse_predict_line("PREDICT: left=safe, right=safe, fwd=safe, back=safe")
|
| 165 |
+
s, r = score_c01({}, p, gt)
|
| 166 |
+
check("2/4 ์ ํ = 10์ ", s == 10)
|
| 167 |
+
|
| 168 |
+
# 0/4
|
| 169 |
+
p = parse_predict_line("PREDICT: left=danger, right=safe, fwd=safe, back=danger")
|
| 170 |
+
s, r = score_c01({}, p, gt)
|
| 171 |
+
check("0/4 ์ ํ = 0์ ", s == 0)
|
| 172 |
+
|
| 173 |
+
# ๋ถ๋ถ ์ถ๋ ฅ (2๋ฐฉํฅ๋ง)
|
| 174 |
+
p = parse_predict_line("PREDICT: left=safe, right=danger(wall)")
|
| 175 |
+
s, r = score_c01({}, p, gt)
|
| 176 |
+
check("2๋ฐฉํฅ๋ง ์ถ๋ ฅ (fwd,back ๋๋ฝ)", s <= 10)
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 180 |
+
print("\n[7/12] C02: ๊ฐ์ฒด ์ธ์ ๋ฐ ๋ถ๋ฅ")
|
| 181 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 182 |
+
|
| 183 |
+
# ๋ง์ : ๋งน์ ์ ํ ์ธ์
|
| 184 |
+
gt = {"entity_type": "beast", "entity_direction": "fwd", "is_threat": True}
|
| 185 |
+
p = parse_predict_line("PREDICT: left=safe, right=safe, fwd=danger(beast), back=safe")
|
| 186 |
+
s, r = score_c02({}, p, gt)
|
| 187 |
+
check("๋งน์ ์๋ฒฝ ์ธ์ = 20์ ", s == 20, f"got {s}")
|
| 188 |
+
|
| 189 |
+
# ์ ํ ์ค์ธ: beast๋ฅผ woman์ผ๋ก
|
| 190 |
+
p = parse_predict_line("PREDICT: left=safe, right=safe, fwd=danger(woman), back=safe")
|
| 191 |
+
s, r = score_c02({}, p, gt)
|
| 192 |
+
check("์ ํ ์ค์ธ < 20์ ", s < 20 and s > 0, f"got {s}")
|
| 193 |
+
|
| 194 |
+
# ๋ฐฉํฅ ์ค์ธ
|
| 195 |
+
p = parse_predict_line("PREDICT: left=danger(beast), right=safe, fwd=safe, back=safe")
|
| 196 |
+
s, r = score_c02({}, p, gt)
|
| 197 |
+
check("๋ฐฉํฅ ์ค์ธ < 15์ ", s < 15, f"got {s}")
|
| 198 |
+
|
| 199 |
+
# ๊ฐ์ฒด ์์ ์ ํ
|
| 200 |
+
gt_none = {"entity_type": None, "entity_direction": None, "is_threat": False}
|
| 201 |
+
p = parse_predict_line("PREDICT: left=safe, right=safe, fwd=safe, back=safe")
|
| 202 |
+
s, r = score_c02({}, p, gt_none)
|
| 203 |
+
check("๊ฐ์ฒด ์์ ์ ํ = 20์ ", s == 20, f"got {s}")
|
| 204 |
+
|
| 205 |
+
# ๊ฐ์ฒด ์๋๋ฐ danger ์ค์ธ
|
| 206 |
+
p = parse_predict_line("PREDICT: left=safe, right=danger(beast), fwd=safe, back=safe")
|
| 207 |
+
s, r = score_c02({}, p, gt_none)
|
| 208 |
+
check("์๋๋ฐ ์ค์ธ = 10์ ", s == 10, f"got {s}")
|
| 209 |
+
|
| 210 |
+
|
| 211 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๏ฟฝ๏ฟฝ๏ฟฝโโโโโโโโโโโโโโโโโโโโ
|
| 212 |
+
print("\n[8/12] C03: ์์ธก ๊ธฐ๋ฐ ์ถ๋ก ")
|
| 213 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 214 |
+
|
| 215 |
+
gt = {
|
| 216 |
+
"danger_directions": ["fwd", "left"],
|
| 217 |
+
"safe_directions": ["right", "back"],
|
| 218 |
+
"optimal_direction": "right",
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
# ๋ง์ : ์ต์ ๋ฐฉํฅ + safe + PREDICT ์ผ๊ด
|
| 222 |
+
p = parse_predict_line("PREDICT: left=danger(wall), right=safe(open), fwd=danger(beast), back=safe")
|
| 223 |
+
s, r = score_c03({}, p, "a person sprinting right away from beast", gt)
|
| 224 |
+
check("์ต์ ๋ฐฉํฅ ์ ํ = 20์ ", s == 20, f"got {s}")
|
| 225 |
+
|
| 226 |
+
# ์ฐจ์ : back ์ ํ (safe์ด์ง๋ง optimal ์๋)
|
| 227 |
+
s, r = score_c03({}, p, "a person running backward quickly", gt)
|
| 228 |
+
check("์ฐจ์ ๋ฐฉํฅ back = 16์ ", s == 16, f"got {s}")
|
| 229 |
+
|
| 230 |
+
# ์ํ ๋ฐฉํฅ ์ ํ
|
| 231 |
+
s, r = score_c03({}, p, "a person walking forward slowly", gt)
|
| 232 |
+
check("danger ๋ฐฉํฅ fwd = ๋ฎ์ ์ ์", s <= 8, f"got {s}")
|
| 233 |
+
|
| 234 |
+
# ๋ฐฉํฅ ํค์๋ ์์
|
| 235 |
+
s, r = score_c03({}, p, "a person standing in panic", gt)
|
| 236 |
+
check("๋ฐฉํฅ ์์ = ๋ถ๋ถ ์ ์", 0 <= s <= 10, f"got {s}")
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 240 |
+
print("\n[9/12] C04: ์ํ ์ฐจ๋ณ ๋ฐ์")
|
| 241 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 242 |
+
|
| 243 |
+
gt = {"expected_a_higher": True, "min_intensity_diff": 2}
|
| 244 |
+
|
| 245 |
+
# ๋ง์ : A ๊ฐํจ, B ์ฝํจ, ์ฐจ์ด ์ถฉ๋ถ
|
| 246 |
+
s, r = score_c04("a person sprinting away in terror", "a person walking away cautiously", gt)
|
| 247 |
+
check("sprint(5) vs walk(2) = 20์ ", s == 20, f"got {s}")
|
| 248 |
+
|
| 249 |
+
# ๋์ผ ๊ฐ๋
|
| 250 |
+
s, r = score_c04("a person walking forward", "a person walking slowly", gt)
|
| 251 |
+
check("๋์ผ ๊ฐ๋ = ๋ฎ์ ์ ์", s <= 10, f"got {s}")
|
| 252 |
+
|
| 253 |
+
# ์ญ์ : B๊ฐ ๋ ๊ฐํจ (๊ฐ๋ ์ฐจ์ด๋ ์์ผ๋ฏ๋ก ๋ถ๋ถ ์ ์)
|
| 254 |
+
s, r = score_c04("a person standing still", "a person sprinting away", gt)
|
| 255 |
+
check("์ญ์ = ๋ถ๋ถ ์ ์ (๊ฐ๋ ์ฐจ์ด๋ ์ธ์ )", 8 <= s <= 14, f"got {s}")
|
| 256 |
+
|
| 257 |
+
# ์์ชฝ ์ ๊ฐ๋ ๋ฐ์ (์ฐจ์ด ์์)
|
| 258 |
+
s, r = score_c04("a person looking around", "a person standing there", gt)
|
| 259 |
+
check("์์ชฝ ์ ๊ฐ๋ = ๋ถ๋ถ ์ ์", 4 <= s <= 8, f"got {s}")
|
| 260 |
+
|
| 261 |
+
# ์ฐจ์ด ์์ง๋ง ๋ถ์กฑ
|
| 262 |
+
s, r = score_c04("a person jogging away", "a person walking forward", gt)
|
| 263 |
+
check("์ฐจ์ด 1 < min_diff 2", s < 20, f"got {s}")
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 267 |
+
print("\n[10/12] C05: ๊ฐ์ ์์ค์ปฌ๋ ์ด์
")
|
| 268 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 269 |
+
|
| 270 |
+
# ๋ง์ : ์ฆ๊ฐ ์ถ์ธ
|
| 271 |
+
s, r = score_c05([
|
| 272 |
+
"a person stepping back",
|
| 273 |
+
"a person running away in fear",
|
| 274 |
+
"a person desperately fleeing in terror",
|
| 275 |
+
], {"expected_trend": "increasing"})
|
| 276 |
+
check("์ฆ๊ฐ ์ถ์ธ = ๋์ ์ ์", s >= 16, f"got {s}")
|
| 277 |
+
|
| 278 |
+
# ๊ฐ์ ์ถ์ธ (๊ธฐ๋: ๊ฐ์)
|
| 279 |
+
s, r = score_c05([
|
| 280 |
+
"a person sprinting in terror",
|
| 281 |
+
"a person jogging cautiously",
|
| 282 |
+
"a person walking calmly",
|
| 283 |
+
], {"expected_trend": "decreasing"})
|
| 284 |
+
check("๊ฐ์ ์ถ์ธ = ๋์ ์ ์", s >= 16, f"got {s}")
|
| 285 |
+
|
| 286 |
+
# ์์ (๊ธฐ๋: ์์ )
|
| 287 |
+
s, r = score_c05([
|
| 288 |
+
"a person walking forward",
|
| 289 |
+
"a person walking ahead",
|
| 290 |
+
"a person walking steadily",
|
| 291 |
+
], {"expected_trend": "stable"})
|
| 292 |
+
check("์์ ์ ์ง = ๋์ ์ ์", s >= 14, f"got {s}")
|
| 293 |
+
|
| 294 |
+
# ์ญ์ (๊ธฐ๋: ์ฆ๊ฐ์ธ๋ฐ ๊ฐ์)
|
| 295 |
+
s, r = score_c05([
|
| 296 |
+
"a person desperately fleeing",
|
| 297 |
+
"a person walking calmly",
|
| 298 |
+
"a person standing still",
|
| 299 |
+
], {"expected_trend": "increasing"})
|
| 300 |
+
check("์ญ์ = ๋ฎ์ ์ ์", s <= 8, f"got {s}")
|
| 301 |
+
|
| 302 |
+
# ์ํ์ค 1๊ฐ๋ง
|
| 303 |
+
s, r = score_c05(["a person walking"], {"expected_trend": "increasing"})
|
| 304 |
+
check("์ํ์ค 1๊ฐ = 0์ ", s == 0)
|
| 305 |
+
|
| 306 |
+
# 4๊ฐ ์ํ์ค ๋จ์กฐ ์ฆ๊ฐ
|
| 307 |
+
s, r = score_c05([
|
| 308 |
+
"a person standing still",
|
| 309 |
+
"a person stepping back",
|
| 310 |
+
"a person running away",
|
| 311 |
+
"a person desperately sprinting in terror",
|
| 312 |
+
], {"expected_trend": "increasing"})
|
| 313 |
+
check("4๋จ๊ณ ๋จ์กฐ ์ฆ๊ฐ", s >= 18, f"got {s}")
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 317 |
+
print("\n[11/12] C08: ๋ชจ์
ํํ๋ ฅ")
|
| 318 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 319 |
+
|
| 320 |
+
gt_high = {"expected_min_intensity": 4, "expected_emotion": True, "expected_min_descriptors": 2}
|
| 321 |
+
gt_low = {"expected_min_intensity": 1, "expected_emotion": False, "expected_min_descriptors": 1}
|
| 322 |
+
|
| 323 |
+
# ๋ง์ : ํ๋ถํ ํํ
|
| 324 |
+
s, r = score_c08("a person desperately sprinting right in terror", gt_high)
|
| 325 |
+
check("ํ๋ถํ ํํ = 20์ ", s == 20, f"got {s}")
|
| 326 |
+
|
| 327 |
+
# ๊ฐ์ ์๋ ํํ (๊ธฐ๋: ๊ฐ์ ์์)
|
| 328 |
+
s, r = score_c08("a person moving right", gt_high)
|
| 329 |
+
check("๊ฐ์ ์์ < ๋ง์ ", s < 15, f"got {s}")
|
| 330 |
+
|
| 331 |
+
# ํ์์ (๊ธฐ๋: ๊ฐ์ ์์)
|
| 332 |
+
s, r = score_c08("a person walking forward steadily", gt_low)
|
| 333 |
+
check("ํ์์ ์ ์ = ๋์ ์ ์", s >= 14, f"got {s}")
|
| 334 |
+
|
| 335 |
+
# ๋๋ฌด ๊ธด ํ
์คํธ
|
| 336 |
+
long_motion = "a person " + " ".join(["really"] * 25) + " running"
|
| 337 |
+
s, r = score_c08(long_motion, gt_high)
|
| 338 |
+
check("30๋จ์ด ์ด๊ณผ = ๊ธธ์ด ๊ฐ์ ", s < 20, f"got {s}")
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 342 |
+
print("\n[12/12] C09: ์ค์๊ฐ ์ฑ๋ฅ")
|
| 343 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 344 |
+
|
| 345 |
+
# ๋ง์
|
| 346 |
+
s, r = score_c09({"fps": 50, "cognitive_latency_ms": 2000, "frame_drop_rate": 0.005, "gpu_memory_stable": True})
|
| 347 |
+
check("์๋ฒฝ ์ฑ๋ฅ = 20์ ", s == 20)
|
| 348 |
+
|
| 349 |
+
# ์ต์
|
| 350 |
+
s, r = score_c09({"fps": 20, "cognitive_latency_ms": 8000, "frame_drop_rate": 0.03, "gpu_memory_stable": True})
|
| 351 |
+
check("์ต์ ์ฑ๋ฅ", 5 <= s <= 12, f"got {s}")
|
| 352 |
+
|
| 353 |
+
# ๋ฏธ๋ฌ
|
| 354 |
+
s, r = score_c09({"fps": 5, "cognitive_latency_ms": 15000, "frame_drop_rate": 0.1, "gpu_memory_stable": False})
|
| 355 |
+
check("๋ฏธ๋ฌ ์ฑ๋ฅ = ๋ฎ์ ์ ์", s <= 3, f"got {s}")
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 359 |
+
print("\n[BONUS] ํตํฉ ์ ์ + ๋ฑ๊ธ ๊ฒฝ๊ณ")
|
| 360 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 361 |
+
|
| 362 |
+
# S๋ฑ๊ธ ๊ฒฝ๊ณ
|
| 363 |
+
r = calculate_wm_score({"C01":100,"C02":100,"C03":100,"C04":100,"C05":100,"C06":100,"C07":100,"C08":100,"C09":100,"C10":100})
|
| 364 |
+
check(f"๋ง์ = {r['wm_score']} (S๋ฑ๊ธ)", r["grade"] == "S" and r["wm_score"] == 1000)
|
| 365 |
+
|
| 366 |
+
# A๋ฑ๊ธ ๊ฒฝ๊ณ
|
| 367 |
+
r = calculate_wm_score({"C01":80,"C02":80,"C03":80,"C04":80,"C05":80,"C06":80,"C07":80,"C08":80,"C09":80,"C10":80})
|
| 368 |
+
check(f"80์ ๋ = {r['wm_score']} ({r['grade']}๋ฑ๊ธ)", r["wm_score"] >= 750)
|
| 369 |
+
|
| 370 |
+
# B๋ฑ๊ธ
|
| 371 |
+
r = calculate_wm_score({"C01":65,"C02":75,"C03":85,"C04":90,"C05":85,"C06":60,"C07":70,"C08":80,"C09":85,"C10":35})
|
| 372 |
+
check(f"VIDRAFT ๊ธฐ์ค์ = {r['wm_score']} ({r['grade']}๋ฑ๊ธ)", r["grade"] in ("B", "A"))
|
| 373 |
+
|
| 374 |
+
# F๋ฑ๊ธ
|
| 375 |
+
r = calculate_wm_score({"C01":10,"C02":10,"C03":10,"C04":10,"C05":10,"C06":10,"C07":10,"C08":10,"C09":10,"C10":10})
|
| 376 |
+
check(f"์ต์ = {r['wm_score']} ({r['grade']}๋ฑ๊ธ)", r["wm_score"] < 200)
|
| 377 |
+
|
| 378 |
+
# 0์
|
| 379 |
+
r = calculate_wm_score({"C01":0,"C02":0,"C03":0,"C04":0,"C05":0,"C06":0,"C07":0,"C08":0,"C09":0,"C10":0})
|
| 380 |
+
check(f"0์ = {r['wm_score']} ({r['grade']}๋ฑ๊ธ)", r["wm_score"] == 0 and r["grade"] == "F")
|
| 381 |
+
|
| 382 |
+
|
| 383 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 384 |
+
print("\n" + "=" * 70)
|
| 385 |
+
print(f" ๊ฒฐ๊ณผ: {passed}/{total} ํต๊ณผ, {failed}/{total} ์คํจ")
|
| 386 |
+
if failed == 0:
|
| 387 |
+
print(" โ
๋ชจ๋ ํ
์คํธ ํต๊ณผ โ ์ฑ์ ์์คํ
๊ฒ์ฆ ์๋ฃ")
|
| 388 |
+
else:
|
| 389 |
+
print(f" โ {failed}๊ฐ ์คํจ โ ์์ ํ์")
|
| 390 |
+
print("=" * 70)
|