Files
2nd/10_Wiki/Topics/AI_and_ML/Defensive-Architecture.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

274 lines
8.4 KiB
Markdown

---
id: wiki-2026-0508-defensive-architecture
title: Defensive Architecture (Game Design)
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [defensive architecture, base design, kill zone, RTS defense, square base, blitz base]
duplicate_of: none
source_trust_level: B
confidence_score: 0.85
verification_status: applied
tags: [game-design, rts, base-defense, kill-zone, layered-defense, war-commander]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: game design
applicable_to: [Tower Defense, RTS, Game Architecture]
---
# Defensive Architecture
## 매 한 줄
> **"매 base 의 geometric layering"**. 매 attacker 의 multi-kill-zone 의 force. 매 cross-fire field. 매 modern: 매 platform-specific resistance + 매 EW (electronic warfare) bunker. 매 [[Combined Arms (제병협동) 전술]] + [[Baiting]] 의 응용.
## 매 핵심 principle
### Function > Form
- 매 high-value 의 center.
- 매 expendable 의 outer.
### Layered Defense
- 매 multiple ring.
- 매 매 ring 의 specific role.
- 매 attacker 의 매 ring 의 통과 의 force.
### Kill Zone
- 매 cross-fire of N turrets.
- 매 attacker 의 most damage.
### Funnel
- 매 wall 의 narrow path.
- 매 mine field + concentrated fire.
### Heterogeneous defense
- 매 다양한 turret type.
- 매 매 damage type 의 cover.
### 매 modern (Arc 2 / WARNO style)
- 매 platform 의 50% damage type resistance ([[Arc 2 기술 및 2026년 연구 업데이트(March 2026 Research Drop)]]).
- 매 EW field (Nightwatch turbulence).
- 매 mixed garrison.
### 매 typical layout
#### Square Base
- 매 corner 의 turret.
- 매 wall 의 perimeter.
- 매 가장 generic.
#### Blitz Base
- 매 long-range turret 의 spread out.
- 매 baiting 의 counter.
#### Honey Pot
- 매 fake weak spot.
- 매 mine concentration.
- 매 ambush.
#### Ring base
- 매 concentric defense.
- 매 가장 expensive 가 매 strong.
### 매 anti-baiting layout
- 매 long-range hidden 의 spread.
- 매 funnel attacker 의 mine.
## 💻 패턴 (응용 — RTS / tower defense design)
### Base layout validator
```ts
interface Building { id: string; type: string; pos: Vec2; range: number; }
function validateLayout(buildings: Building[]): ValidationResult {
const issues: string[] = [];
// 매 1. core building 의 center 의 protect
const cores = buildings.filter(b => b.type === 'command_center');
for (const core of cores) {
const enclosingRing = buildings.filter(b =>
b.pos.distance(core.pos) < 30 && b.type !== 'command_center'
);
if (enclosingRing.length < 5) issues.push('Insufficient outer ring');
}
// 매 2. cross-fire coverage
const turrets = buildings.filter(b => b.type === 'turret');
for (const turret of turrets) {
const overlap = turrets.filter(t =>
t.id !== turret.id && t.pos.distance(turret.pos) < t.range + turret.range
);
if (overlap.length < 2) issues.push(`Turret ${turret.id} no cross-fire support`);
}
return issues;
}
```
### Kill zone calculator
```ts
function killZoneIntensity(point: Vec2, turrets: Building[]): number {
return turrets.filter(t => point.distance(t.pos) < t.range).length;
}
function generateKillZoneHeatmap(map: Map, turrets: Building[]): number[][] {
const heatmap: number[][] = [];
for (let y = 0; y < map.height; y++) {
heatmap.push([]);
for (let x = 0; x < map.width; x++) {
heatmap[y].push(killZoneIntensity(new Vec2(x, y), turrets));
}
}
return heatmap; // 매 visualize: 매 zones with 3+ overlapping turrets.
}
```
### Funnel design
```ts
function computeFunnel(walls: Wall[], entry: Vec2): Path {
// 매 path-finding 의 enemy 의 forced path.
const blockedCells = walls.flatMap(w => w.cells);
const path = aStar(entry, base.center, blockedCells);
return path; // 매 매 cell 의 mine + 매 turret cover.
}
```
### Layered ring (concentric)
```ts
function buildLayeredDefense(center: Vec2, levels = 3) {
const layout: Building[] = [];
// 매 매 ring
for (let r = 1; r <= levels; r++) {
const radius = r * 8;
const turretCount = 4 * r; // 매 outer 가 더 많음
for (let i = 0; i < turretCount; i++) {
const angle = (2 * Math.PI * i) / turretCount;
const pos = center.add(new Vec2(Math.cos(angle), Math.sin(angle)).mul(radius));
layout.push({
id: `ring${r}_${i}`,
type: r === levels ? 'sniper_turret' : 'machine_gun_turret', // 매 outer 의 long-range
pos,
range: r === levels ? 25 : 15,
});
}
}
return layout;
}
```
### Damage-type-aware deployment
```ts
function placeResistancePlatforms(threat_profile: DamageProfile, slots: Vec2[]) {
// 매 [[Arc 2 기술 및 2026년 연구 업데이트(March 2026 Research Drop)]] 참조
const platforms: Building[] = [];
// 매 매 expected attack type 의 counter
if (threat_profile.burst > 0.3) {
platforms.push({ type: 'support_reinforced', resists: 'burst', pos: slots.shift()! });
}
if (threat_profile.area > 0.3) {
platforms.push({ type: 'support_insulated', resists: 'area', pos: slots.shift()! });
}
if (threat_profile.air > 0.4) {
platforms.push({ type: 'support_aerojet', resists: 'air', pos: slots.shift()! });
}
return platforms;
}
```
### Honey pot
```ts
function deployHoneyPot(weakLookingPath: Cell[]) {
return [
...weakLookingPath.flatMap(cell =>
Math.random() < 0.7 ? [{ type: 'mine', pos: cell.pos }] : []
),
{ type: 'sniper_in_bunker', pos: weakLookingPath[0].pos.offset(2, 0) },
];
}
```
### Anti-bait positioning
```ts
function placeBaitProofUnit(unit: Unit, garrison_options: Vec2[]) {
// 매 baiting 의 counter — 매 long-range + hidden + Hold Position
const hiddenCover = garrison_options.find(p => isHidden(p) && hasLongRangeView(p));
return {
pos: hiddenCover,
stance: 'hold_position', // 매 don't chase
};
}
```
### Defense effectiveness simulation
```python
def simulate_defense(layout, attacker_compositions, n_trials=1000):
"""매 매 attacker composition 의 defeat rate."""
results = {}
for comp in attacker_compositions:
defeats = sum(1 for _ in range(n_trials) if simulate_attack(layout, comp).defender_wins)
results[comp.name] = defeats / n_trials
return results
```
### Layout iteration loop
```ts
function evolveLayout(initial: Layout, attacker_pool: Composition[], generations = 50) {
let current = initial;
for (let g = 0; g < generations; g++) {
const variants = mutateLayout(current, n=10);
const scored = variants.map(v => ({
layout: v,
score: average(attacker_pool.map(a => simulateDefense(v, a))),
}));
current = scored.sort((a, b) => b.score - a.score)[0].layout;
}
return current;
}
```
## 매 결정 기준
| 상황 | Layout |
|---|---|
| Generic | Square base + 4 corner turret |
| Anti-bait | Blitz base (long-range spread) |
| Vs heavy ground | Ring + AT specialist |
| Vs air | Layered AA + Nightwatch EW |
| Vs mortar | Spread + dispersion |
| New base | Square baseline → 매 evolve |
**기본값**: 매 layered + 매 cross-fire + 매 funnel + 매 platform-resistance + 매 anti-bait.
## 🔗 Graph
- 부모: [[Game-Design]]
- 변형: [[Square-Base]] · [[Blitz-Base]]
- 응용: [[Combat Controls Update (Feb 2014)]] · [[Combined Arms (제병협동) 전술]] · [[Arc 2 기술 및 2026년 연구 업데이트(March 2026 Research Drop)]] · [[Combat-System-and-Bullet-Interaction-Pipeline]]
- Adjacent: [[Baiting]] · [[CPTED]] (real-world parallel) · [[Boss-Orchestration-and-Gimmick-Management]]
## 🤖 LLM 활용
**언제**: 매 RTS / tower defense design. 매 base layout planning. 매 defense balance.
**언제 X**: 매 abstract / non-spatial game.
## ❌ 안티패턴
- **Single layer**: 매 break-through 의 fast.
- **No cross-fire**: 매 isolated turret 의 weak.
- **Symmetric obvious**: 매 attacker 의 read.
- **No funnel**: 매 mine 의 unutilized.
- **No anti-bait**: 매 [[Baiting]] 의 vulnerable.
- **All same damage type**: 매 single resistance 의 nullify.
## 🧪 검증 / 중복
- Verified (War Commander community, RTS design literature).
- 신뢰도 B.
- Related: [[Combat Controls Update (Feb 2014)]] · [[Combined Arms (제병협동) 전술]] · [[Arc 2 기술 및 2026년 연구 업데이트(March 2026 Research Drop)]] · [[Baiting]] · [[CPTED]].
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — principle + layout type + 매 validator / kill zone / funnel / honey pot code |