docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,161 @@
|
||||
---
|
||||
id: wiki-2026-0508-4x-strategy
|
||||
title: 4X Strategy
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [4X 전략, eXplore eXpand eXploit eXterminate]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [gaming, strategy, game-design, ai]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: python
|
||||
framework: gym/pettingzoo
|
||||
---
|
||||
|
||||
# 4X Strategy
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 eXplore, eXpand, eXploit, eXterminate — 매 long-horizon empire-building loop."** 매 1993 *Master of Orion* 의 Alan Emrich 가 coined. 매 Civilization, Stellaris, Endless Legend, Old World 의 cornerstone genre — 매 2026 에 AI agents 의 benchmark domain (Pyrrho, Civ-Bench).
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 4 pillars
|
||||
- **eXplore**: fog-of-war 의 map reveal, scout units, sensor range, anomaly detection.
|
||||
- **eXpand**: settler/colony placement, 영토 claim, infrastructure rollout.
|
||||
- **eXploit**: resource extraction, tech tree, trade routes, population growth.
|
||||
- **eXterminate**: military doctrine, alliance/diplomacy, conquest victory.
|
||||
|
||||
### 매 design tensions
|
||||
- **Wide vs tall**: many small cities vs few mega-cities.
|
||||
- **Snowball vs catchup**: 초기 lead 의 compound 의 X — 매 modern designs (Old World, Humankind) 의 catchup mechanics.
|
||||
- **Turn-based vs RTS**: Civ (TBS) · Stellaris (real-time pausable).
|
||||
|
||||
### 매 응용
|
||||
1. Multi-agent RL benchmark — 매 long horizon, partial observability, sparse reward.
|
||||
2. Game theory testbed — 매 negotiation, alliances, betrayal.
|
||||
3. Economic simulation — 매 supply chain, monetary policy.
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### Civ-style turn loop
|
||||
```python
|
||||
# Pseudocode of 4X turn structure
|
||||
class Empire:
|
||||
def turn(self):
|
||||
self.explore() # move scouts, reveal tiles
|
||||
self.expand() # settle, build improvements
|
||||
self.exploit() # collect yields, research, grow
|
||||
self.exterminate() # military / diplomacy actions
|
||||
|
||||
def game_loop(empires, world):
|
||||
for turn in range(max_turns):
|
||||
for empire in empires:
|
||||
empire.turn()
|
||||
world.tick() # natural events, barbarians
|
||||
if any(empire.victory() for empire in empires):
|
||||
return
|
||||
```
|
||||
|
||||
### Tile yield model
|
||||
```python
|
||||
# Civ VI-style tile yields
|
||||
def tile_yield(tile, improvements, adjacency):
|
||||
base = tile.terrain.yields # food/production/gold
|
||||
base += sum(imp.bonus for imp in improvements)
|
||||
base += adjacency_bonus(tile, adjacency)
|
||||
return base * tile.modifier # govt, religion, etc.
|
||||
```
|
||||
|
||||
### Tech tree (DAG)
|
||||
```python
|
||||
import networkx as nx
|
||||
|
||||
tech = nx.DiGraph()
|
||||
tech.add_edge("Pottery", "Writing")
|
||||
tech.add_edge("Writing", "Currency")
|
||||
tech.add_edge("Bronze Working", "Iron Working")
|
||||
|
||||
def available(researched):
|
||||
return [t for t in tech.nodes
|
||||
if t not in researched
|
||||
and all(p in researched for p in tech.predecessors(t))]
|
||||
```
|
||||
|
||||
### Combat resolution (Lanchester)
|
||||
```python
|
||||
def lanchester_combat(att_strength, def_strength, terrain_mod):
|
||||
# Square law for ranged + simultaneous combat
|
||||
a, d = att_strength, def_strength * terrain_mod
|
||||
ratio = a / d
|
||||
att_loss = d**2 / (a + d)
|
||||
def_loss = a**2 / (a + d)
|
||||
return att_loss, def_loss
|
||||
```
|
||||
|
||||
### MCTS for 4X agent
|
||||
```python
|
||||
# Minimal MCTS for turn decisions
|
||||
def mcts(state, n_sims=1000):
|
||||
root = Node(state)
|
||||
for _ in range(n_sims):
|
||||
leaf = root.select() # UCB1
|
||||
child = leaf.expand()
|
||||
reward = child.rollout() # heuristic playout
|
||||
child.backprop(reward)
|
||||
return root.best_child().action
|
||||
```
|
||||
|
||||
### Diplomacy as repeated game
|
||||
```python
|
||||
class Diplomat:
|
||||
def __init__(self):
|
||||
self.history = {} # opponent -> [actions]
|
||||
|
||||
def respond(self, opponent, their_action):
|
||||
# Tit-for-tat with forgiveness
|
||||
past = self.history.get(opponent, [])
|
||||
if not past or their_action == "cooperate":
|
||||
return "cooperate"
|
||||
return past[-1] # mirror last
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Early game | eXplore 우선 — map info 의 highest marginal value |
|
||||
| Mid game | eXpand + eXploit — economy snowball |
|
||||
| Late game | eXterminate or science/cultural victory |
|
||||
| Tight map | 매 tall play (few strong cities) |
|
||||
| Open map | 매 wide play (many cities) |
|
||||
|
||||
**기본값**: 매 explore-first, 매 expand-until-economy-saturates, 매 specialize.
|
||||
|
||||
## 🔗 Graph
|
||||
- 응용: [[MCTS]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 narrative event generation, flavor text, 매 dynamic dialogue with diplomats.
|
||||
**언제 X**: 매 hard rule resolution (combat math, yields) — 매 deterministic engine 사용.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Snowball lock-in**: 매 early lead 의 unwinnable game — 매 catchup mechanics 의 추가.
|
||||
- **Micromanagement hell**: 매 50+ cities 의 manual ordering — 매 governors, automation.
|
||||
- **Tech rush dominance**: 매 single optimal path — 매 multiple viable trees 의 design.
|
||||
- **Combat spam**: 매 stack-of-doom — 매 1UPT or limited stacks.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Sid Meier 인터뷰, *Master of Orion* 1993 design notes).
|
||||
- 매 [[4X 전략]] redirect.
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — FULL content with patterns, design tensions |
|
||||
Reference in New Issue
Block a user