[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
@@ -2,61 +2,253 @@
id: wiki-2026-0508-ecology-and-ecosystem-modeling
title: Ecology and Ecosystem Modeling
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AI-ECOLOGY]
aliases: [ecosystem modeling, agent-based ecology, Lotka-Volterra, food web, population dynamics]
duplicate_of: none
source_trust_level: A
confidence_score: 0.95
tags: [Science, _systems, Ecology, Modeling]
confidence_score: 0.92
verification_status: applied
tags: [ecology, ecosystem, abm, lotka-volterra, simulation, biodiversity, food-web]
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: Python / NetLogo / Mesa
framework: NumPy / scipy / Mesa
---
# [[Ecology and Ecosystem Modeling|Ecology and Ecosystem Modeling]] (생태학 및 생태계 모델링)
# Ecology and Ecosystem Modeling
## 📌 한 줄 통찰 (The Karpathy Summary)
> "생명체와 환경이 얽히고설킨 거대한 에너지 흐름의 지도를 그리는 일." 개별 생명체의 행동을 넘어, 이들이 군집 속에서 어떻게 상호작용하고 자원을 순환시키는지 파악하기 위해 수학과 컴퓨터 시뮬레이션을 활용하는 학문이다.
## 한 줄
> **"매 species 매 environment 의 interaction 의 mathematical / computational simulate"**. 매 Lotka-Volterra (predator-prey), 매 food web, 매 ABM (agent-based). 매 modern: 매 deep learning + 매 climate model coupling.
## 📖 구조화된 지식 (Synthesized Content)
- **Population Dynamics**: 개체수가 환경 수용력(Carrying Capacity)에 맞춰 어떻게 늘고 줄어드는지 연구 (로지스틱 회귀 등).
- **Trophic Levels**: 생산자, 소비자, 분해자 사이의 에너지 전달 효율 분석.
- **Model Types**:
- **Agent-based Models (ABM)**: 개별 유닛의 규칙을 바탕으로 전체 군집의 창발적 행동 관찰.
- **Compart[[Mental Models|Mental Models]]**: 에너지나 영양소가 각 구획(질소, 탄소 등)을 흐르는 양을 계산.
- **Utility**: 기후 변화에 따른 멸종 확률 예측, 전염병 확산 경로 파악, 지속 가능한 농업 설계.
## 매 핵심
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- 자연은 인간의 모델보다 훨씬 더 복잡하고 비선형적(카오스 이론)이다. 특정 종을 보호하려던 노력이 먹이사슬의 붕괴를 가져오는 '의도치 않은 결과'가 빈번하다. 최근에는 인공지능이 위성 데이터와 수천 개의 변수를 실시간 학습하여, 고전적인 통계 모델이 놓치던 미세한 생태적 변화를 파악하는 '디지털 트윈 기반 생태 관리'가 도입되고 있다.
### 매 model type
- **Differential equation**: 매 Lotka-Volterra, SIR-like.
- **Matrix model** (Leslie): 매 age-structured.
- **Individual-based** (IBM/ABM): 매 agent.
- **Network-based**: 매 food web.
- **Spatial**: 매 PDE / cellular automata.
## 🔗 지식 연결 (Graph)
- Related: Complex-Adaptive-Systems , Self-Organized-Criticality
- Modern Tech: [[Digital-Twin-Technology|Digital-Twin-Technology]]
### 매 famous
- **Lotka-Volterra**: 매 predator-prey oscillation.
- **NetLogo Wolves-Sheep**: 매 ABM textbook.
- **Madingley Model**: 매 global-scale ecosystem.
- **EwE (Ecopath with Ecosim)**: 매 marine fisheries.
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 응용
1. **Conservation**: 매 endangered species.
2. **Fisheries**: 매 stock assessment.
3. **Invasive species**: 매 spread.
4. **Climate adaptation**: 매 range shift.
5. **Disease ecology**: 매 zoonotic.
6. **Restoration**: 매 rewilding scenario.
**언제 이 지식을 쓰는가:**
- *(TODO)*
### 매 modern AI
- **Species distribution**: 매 ML predict.
- **Image classification**: 매 camera trap.
- **Bioacoustic**: 매 bird ID.
- **Foundation model**: 매 GeoCLIP, BioCLIP.
**언제 쓰면 안 되는가:**
- *(TODO)*
## 💻 패턴
## 🧪 검증 상태 (Validation)
### Lotka-Volterra
```python
import numpy as np
from scipy.integrate import odeint
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
def lv(state, t, alpha, beta, delta, gamma):
prey, pred = state
dprey = alpha * prey - beta * prey * pred
dpred = delta * prey * pred - gamma * pred
return [dprey, dpred]
## 🧬 중복 검사 (Duplicate Check)
t = np.linspace(0, 50, 1000)
sol = odeint(lv, [10, 5], t, args=(0.5, 0.1, 0.05, 0.5))
```
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
### Logistic growth (carrying capacity)
```python
def logistic(N, t, r, K):
return r * N * (1 - N / K)
## 🕓 변경 이력 (Changelog)
t = np.linspace(0, 30, 300)
N = odeint(logistic, 5, t, args=(0.5, 100))
```
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
### Leslie matrix (age-structured)
```python
def leslie_step(pop, fecundity, survival):
L = np.zeros((len(pop), len(pop)))
L[0, :] = fecundity
for i in range(len(pop) - 1):
L[i + 1, i] = survival[i]
return L @ pop
# 매 example
pop = np.array([100, 80, 50, 20])
fec = np.array([0, 0.5, 1.5, 0.8])
surv = np.array([0.6, 0.7, 0.5])
for _ in range(20): pop = leslie_step(pop, fec, surv)
```
### Agent-based (Mesa)
```python
from mesa import Agent, Model
from mesa.space import MultiGrid
from mesa.time import RandomActivation
class Sheep(Agent):
def step(self):
self.energy -= 1
if grass_at(self.pos): self.energy += 5
# 매 move
x, y = self.random.choice(self.model.grid.get_neighborhood(self.pos, True))
self.model.grid.move_agent(self, (x, y))
# 매 reproduce
if self.energy > 20:
self.energy /= 2
self.model.add_sheep(self.pos, self.energy)
# 매 die
if self.energy <= 0: self.model.kill(self)
class Wolf(Agent):
def step(self):
# 매 hunt sheep
sheep_nearby = self.model.grid.get_cell_list_contents([self.pos])
sheep_nearby = [a for a in sheep_nearby if isinstance(a, Sheep)]
if sheep_nearby:
self.energy += 20
self.model.kill(sheep_nearby[0])
class Ecosystem(Model):
def __init__(self, n_sheep, n_wolves, w, h):
self.grid = MultiGrid(w, h, torus=True)
self.schedule = RandomActivation(self)
for _ in range(n_sheep): self.add_sheep((random_pos), 10)
for _ in range(n_wolves): self.add_wolf((random_pos), 20)
def step(self): self.schedule.step()
```
### Food web (network)
```python
import networkx as nx
G = nx.DiGraph()
# 매 edge: prey → predator
G.add_edges_from([
('grass', 'rabbit'), ('grass', 'mouse'),
('rabbit', 'fox'), ('mouse', 'fox'),
('mouse', 'owl'), ('rabbit', 'eagle'),
])
# 매 trophic level
def trophic_level(G, species):
if G.in_degree(species) == 0: return 1
preys = list(G.predecessors(species))
return 1 + np.mean([trophic_level(G, p) for p in preys])
```
### Species distribution model (MaxEnt-style)
```python
from sklearn.ensemble import RandomForestClassifier
def fit_sdm(presences, absences, env_features):
X = np.vstack([presences, absences])
y = np.array([1] * len(presences) + [0] * len(absences))
clf = RandomForestClassifier(n_estimators=200).fit(X, y)
return clf
def project(clf, future_env_grid):
return clf.predict_proba(future_env_grid)[:, 1] # 매 suitability
```
### Spatial spread (cellular automaton)
```python
def spread_step(grid, infected_value=1, p_spread=0.3):
new_grid = grid.copy()
H, W = grid.shape
for i in range(1, H - 1):
for j in range(1, W - 1):
if grid[i, j] == 0:
neighbors = grid[i-1:i+2, j-1:j+2].sum() - grid[i, j]
if neighbors > 0 and np.random.rand() < 1 - (1 - p_spread) ** neighbors:
new_grid[i, j] = infected_value
return new_grid
```
### Camera trap classifier (BioCLIP)
```python
from transformers import CLIPModel, CLIPProcessor
model = CLIPModel.from_pretrained('imageomics/bioclip')
def classify_animal(image, candidate_species):
inputs = processor(text=candidate_species, images=image, return_tensors='pt')
out = model(**inputs)
return candidate_species[out.logits_per_image.argmax().item()]
```
### Bird sound (BirdNET-style)
```python
def detect_birds(audio, sr=48000, window_s=3):
# 매 chunked inference
chunks = chunk(audio, window_s * sr)
return [birdnet_model.predict(c) for c in chunks]
```
### Sensitivity analysis
```python
from SALib.sample import saltelli
from SALib.analyze import sobol
problem = {
'num_vars': 4,
'names': ['alpha', 'beta', 'delta', 'gamma'],
'bounds': [[0.1, 1], [0.05, 0.2], [0.01, 0.1], [0.1, 1]],
}
param_values = saltelli.sample(problem, 1024)
Y = np.array([simulate(p)[-1, 0] for p in param_values]) # 매 final prey
Si = sobol.analyze(problem, Y)
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| 2-3 species | Lotka-Volterra ODE |
| Age structure | Leslie matrix |
| Behavioral | ABM (Mesa / NetLogo) |
| Network | Food web graph |
| Range / spatial | SDM + CA |
| Fisheries | Ecopath / EwE |
| Camera trap data | BioCLIP / DL |
**기본값**: 매 question-driven — 매 quick population → ODE; 매 behavioral → ABM; 매 modern data → ML SDM.
## 🔗 Graph
- 부모: [[Ecology]] · [[Systems-Biology]]
- 변형: [[Lotka-Volterra]] · [[Agent-Based-Model]] · [[Food-Web]]
- 응용: [[Conservation-Biology]] · [[Fisheries]] · [[Climate-Change]]
- Adjacent: [[Cellular-Automata]] · [[Species-Distribution-Model]] · [[BioCLIP]]
## 🤖 LLM 활용
**언제**: 매 conservation. 매 invasive species. 매 climate adaptation.
**언제 X**: 매 hard physics (use mechanistic instead).
## ❌ 안티패턴
- **Ignore stochasticity**: 매 small population.
- **Single-scale**: 매 cross-scale interaction 의 miss.
- **Calibrate to single dataset**: 매 over-fit.
- **No sensitivity analysis**: 매 parameter uncertainty.
## 🧪 검증 / 중복
- Verified (May, Levin Mathematical Ecology).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-04-20 | Auto-reinforced |
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — ODE / ABM / food web / SDM / sensitivity code |