[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
@@ -1,63 +1,287 @@
---
id: wiki-2026-0508-dynamic-difficulty-adjustment-dd
id: wiki-2026-0508-dda
title: Dynamic Difficulty Adjustment (DDA)
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AI-DDA]
aliases: [DDA, dynamic difficulty, rubber banding, AI Director, flow state, adaptive difficulty]
duplicate_of: none
source_trust_level: A
confidence_score: 0.96
tags: [GameDesign, AI, DDA, Experience]
source_trust_level: B
confidence_score: 0.85
verification_status: applied
tags: [game-design, dda, dynamic-difficulty, flow, ai-director, player-modeling, adaptive]
raw_sources: []
last_reinforced: 2026-04-20
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: game design
applicable_to: [Game Design, Adaptive Learning, ML Curriculum]
---
# [[Dynamic Difficulty Adjustment (DDA)|Dynamic Difficulty Adjustment (DDA)]] (동적 난이도 조절)
# Dynamic Difficulty Adjustment (DDA)
## 📌 한 줄 통찰 (The Karpathy Summary)
> "플레이어의 실력에 맞춰 실시간으로 변하는 '보이지 않는 손'." 유저가 지루해하거나 좌절하지 않도록 게임의 난이도를 실시간으로 조정하여 몰입(Flow) 상태를 유지시키는 기술이다.
## 한 줄
> **"매 player skill 의 real-time 매 difficulty 의 dial"**. Csikszentmihalyi 의 Flow zone 의 maintain. 매 Left 4 Dead 의 AI Director, 매 racing 의 rubber banding. 매 modern: 매 ML-driven player model + 매 ethical detect (gaming the system). 매 LMS adaptive learning 의 same principle.
## 📖 구조화된 지식 (Synthesized Content)
- **Mechanism**:
- **Performance Tracking**: 유저의 승률, 남은 체력, 클리어 시간 등 데이터를 실시간 수집.
- **Adjustment Loop**: 유저가 너무 잘하면 적의 공격력을 높이거나 자원을 줄이고, 반대의 경우 힌트를 주거나 난이도를 낮춤.
- **Techniques**:
- **Rubber Banding**: 레이싱 게임에서 뒤처진 차량의 속도를 미세하게 보정함.
- **The Director (L4D)**: 유저의 긴장도를 측정하여 좀비의 스폰량과 타이밍을 조절함.
- **[[goal|goal]]**: 유저를 최적의 경험인 '몰입 영역(Flow Zone)'에 가둬두는 것.
## 매 핵심
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- DDA가 너무 노골적이면 플레이어는 자신의 노력이 무의미하다고 느끼거나(의욕 상실), 일부러 못하는 척하여 시스템을 기만하려 할 수 있다. 따라서 '조작된 난이도'라는 인상을 주지 않도록 정교하고 은밀한 설계가 필수적이다.
### 매 mechanism
1. **Player metric**: 매 win rate, HP remaining, time, deaths.
2. **Skill estimate**: 매 sliding window of recent.
3. **Adjustment**: 매 enemy stats / spawn / hint.
4. **Subtle**: 매 obvious 의 player 의 frustrate.
## 🔗 지식 연결 (Graph)
- Related: [[Flow-State|Flow-State]] , [[Artificial-Intelligence-in-Games|Artificial-Intelligence-in-Games]]
- Concept: Player-Agency
### 매 famous example
- **Left 4 Dead AI Director** (Valve): 매 zombie spawn 의 control.
- **Resident Evil 4**: 매 difficulty 의 silent.
- **Mario Kart**: 매 rubber banding (item, speed).
- **Crash Bandicoot**: 매 attempt 후 의 adjust.
- **Mario AI** (research): 매 student 의 player.
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 method
- **Heuristic**: 매 simple rule.
- **Bayesian player model**: 매 skill posterior.
- **RL-based**: 매 difficulty 의 policy 학습.
- **MCTS-based**: 매 lookahead.
**언제 이 지식을 쓰는가:**
- *(TODO)*
### 매 ethical / design constraint
- **Subtle**: 매 player 의 perception X.
- **Fair feel**: 매 effort-reward.
- **Not patronize**: 매 매 player 의 skill ↑ 의 acknowledge.
- **No gaming detection**: 매 player 의 intentional poor 의 abuse.
**언제 쓰면 안 되는가:**
- *(TODO)*
### 매 응용
1. **Action / shooter**: 매 enemy difficulty.
2. **Racing**: 매 rubber banding.
3. **Puzzle**: 매 hint.
4. **MMO raid**: 매 boss adjustment.
5. **Edu game / LMS**: 매 question difficulty.
6. **AI tutor**: 매 explanation depth.
7. **Aim training**: 매 [[Cognitive Training Software (eg Aim Lab_KovaaKs)]] 의 adaptive scenario.
## 🧪 검증 상태 (Validation)
### 매 modern AI 응용
- **Player modeling**: 매 ML 의 skill 의 estimate.
- **RL-based DDA**: 매 difficulty controller 의 train.
- **Generative content**: 매 procedurally adapted level.
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
## 💻 패턴
## 🧬 중복 검사 (Duplicate Check)
### Sliding window skill estimator
```ts
class SkillEstimator {
private history: number[] = [];
recordOutcome(win: boolean, time: number, hpLost: number) {
const score = (win ? 1 : 0) * (60 / Math.max(time, 1)) * (1 - hpLost / 100);
this.history.push(score);
if (this.history.length > 20) this.history.shift();
}
estimateSkill(): number {
if (!this.history.length) return 0.5;
return this.history.reduce((a, b) => a + b, 0) / this.history.length;
}
}
```
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
### AI Director-style (probabilistic)
```ts
class AIDirector {
threatLevel = 0; // 0-1
update(player: Player) {
const recentDamage = player.recentDamageTaken();
const ammoLow = player.ammo < 30;
const downtime = player.timeWithoutCombat();
// 매 raise threat 의 calm
if (downtime > 30) this.threatLevel = Math.min(1, this.threatLevel + 0.05);
// 매 ease 의 stress
if (recentDamage > 50 || ammoLow) this.threatLevel = Math.max(0, this.threatLevel - 0.1);
}
shouldSpawnEnemy(): boolean {
return Math.random() < this.threatLevel;
}
enemyComposition() {
if (this.threatLevel < 0.3) return 'easy_pack';
if (this.threatLevel < 0.7) return 'mixed';
return 'horde';
}
}
```
## 🕓 변경 이력 (Changelog)
### Rubber banding (racing)
```ts
function applyRubberBand(car: Car, leader: Car) {
const distanceBehind = leader.position - car.position;
// 매 subtle catch-up
if (distanceBehind > 100) {
car.maxSpeed *= 1.05; // 매 5% boost
car.itemDropChance *= 1.5; // 매 better items
} else if (distanceBehind < -50) {
// 매 leader 의 small handicap
car.maxSpeed *= 0.98;
}
}
```
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
### Bayesian player model (IRT-inspired)
```python
import numpy as np
class BayesianPlayer:
def __init__(self, prior_mean=0, prior_var=1):
self.skill_mean = prior_mean
self.skill_var = prior_var
def update(self, item_difficulty, success):
"""매 item response theory."""
# 매 expected probability
p_success = 1 / (1 + np.exp(-(self.skill_mean - item_difficulty)))
# 매 posterior update (simplified Kalman)
info = p_success * (1 - p_success)
self.skill_var = 1 / (1 / self.skill_var + info)
self.skill_mean += self.skill_var * info * (int(success) - p_success)
def select_difficulty(self, items, target_p=0.7):
"""매 just-beyond comfort."""
return min(items, key=lambda d: abs(
1 / (1 + np.exp(-(self.skill_mean - d))) - target_p
))
```
### RL-based DDA
```python
class DifficultyController:
"""매 RL 의 매 player 의 engagement 의 maximize."""
def __init__(self):
self.policy = QNetwork()
def select_difficulty(self, player_state):
actions = ['decrease', 'maintain', 'increase']
q_values = self.policy(player_state)
return actions[q_values.argmax()]
def reward(self, player_state):
# 매 engagement = match length + retention + flow indicator
return (
player_state.session_length * 0.3 +
(1 if player_state.continued_after_match else 0) * 0.5 +
player_state.subjective_satisfaction * 0.2
)
```
### Detect gaming the system
```python
def detect_throw_match(player_history):
"""매 player 의 intentional poor 의 detect."""
recent = player_history[-10:]
# 매 sudden drop in performance
historical_avg = np.mean([h.score for h in player_history[:-10]])
recent_avg = np.mean([h.score for h in recent])
if recent_avg < historical_avg * 0.4:
return 'WARN: possible throwing for DDA exploit'
return None
```
### Subtle communication (UX)
```ts
function hidePlayerSeesAdjustment() {
// 매 ❌ 매 obvious
if (showText) showMessage('Difficulty decreased due to your performance');
// 매 ✅ 매 silent
// 매 just adjust enemy stats internally.
// 매 player 의 say "I'm getting better!" 매 actually 의 difficulty 의 ease.
}
```
### A/B test (DDA effectiveness)
```python
def ab_test_dda(players_a_no_dda, players_b_with_dda):
return {
'session_length_a': mean(p.session_length for p in players_a_no_dda),
'session_length_b': mean(p.session_length for p in players_b_with_dda),
'retention_d7_a': retention(players_a_no_dda, days=7),
'retention_d7_b': retention(players_b_with_dda, days=7),
'satisfaction_a': mean(p.satisfaction for p in players_a_no_dda),
'satisfaction_b': mean(p.satisfaction for p in players_b_with_dda),
}
```
### LMS adaptive (similar pattern)
```python
def adaptive_quiz(student, item_pool):
skill = student.estimated_skill
# 매 zone of proximal development
target_difficulty = skill + 0.5 # 매 just-beyond
next_item = min(item_pool, key=lambda i: abs(i.difficulty - target_difficulty))
response = present(next_item, student)
student.update_skill(next_item.difficulty, response.correct)
return next_item
```
### Procedural difficulty (level generation)
```python
def generate_level(player_skill):
return {
'enemy_count': int(10 + player_skill * 20),
'enemy_hp': 100 * (1 + player_skill * 0.5),
'puzzle_complexity': int(player_skill * 5),
'time_limit': 300 - int(player_skill * 100),
'powerup_density': max(0.1, 0.5 - player_skill * 0.3),
}
```
## 매 결정 기준
| Genre | DDA approach |
|---|---|
| Action / Shooter | AI Director (Valve-style) |
| Racing | Rubber banding (subtle) |
| Puzzle | Hint frequency |
| MMO raid | Stat-tier difficulty |
| RPG | Side content |
| Edu game | Adaptive item (IRT) |
| Esports / competitive | NO DDA (fairness) |
| Casual mobile | Subtle DDA + retention focus |
**기본값**: 매 Bayesian player model + 매 subtle adjust + 매 A/B test + 매 detect gaming.
## 🔗 Graph
- 부모: [[Game-Design]] · [[Adaptive-Learning]]
- 변형: [[AI-Director]] · [[Rubber-Banding]] · [[Player-Modeling]]
- 응용: [[Cognitive Training Software (eg Aim Lab_KovaaKs)]] · [[Corporate-LMS-Training]] (adaptive) · [[Cognitive-Evaluation-Theory]]
- Adjacent: [[Default Mode Network (DMN)]] (flow) · [[Deliberate-Practice]] · [[Combined Arms (제병협동) 전술]]
## 🤖 LLM 활용
**언제**: 매 game design. 매 adaptive learning system. 매 personalized challenge.
**언제 X**: 매 esports / fairness-critical (no DDA).
## ❌ 안티패턴
- **Obvious DDA**: 매 player 의 perception → 매 motivation lose.
- **Patronizing**: 매 매 player 의 skill 의 acknowledge X.
- **Punishing skilled play**: 매 better → 매 harder feel of unfair.
- **No detection 의 throw**: 매 exploit.
- **DDA in competitive**: 매 fairness violation.
- **Too aggressive adjust**: 매 whiplash.
## 🧪 검증 / 중복
- Verified (Csikszentmihalyi Flow, Valve AI Director paper, Hunicke MDA).
- 신뢰도 B.
- Related: [[Cognitive Training Software (eg Aim Lab_KovaaKs)]] · [[Corporate-LMS-Training]] · [[Cognitive-Evaluation-Theory]] · [[Deliberate-Practice]] · [[Combined Arms (제병협동) 전술]].
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — mechanism + 매 AI Director / rubber band / Bayesian / RL / detect-throw code |