forage-resources
정보
이 스킬은 개미 군집 최적화와 채집 이론을 적용해 무차별 대입 방식으로는 해결하기 어려운 광범위한 해결 공간을 효율적으로 탐색합니다. 새로운 옵션 탐색과 알려진 우수한 옵션 활용 사이의 균형을 잡아주며, 정찰 개체 배치와 경로 강화를 관리합니다. 자원 할당 최적화, 조기 수렴 방지, 분산 탐색 문제에서의 탐색-활용 트레이드오프 처리에 사용하세요.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/forage-resourcesClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Forage Resources
Apply foraging theory and ant colony optimization to system search for, check, and exploit spread resources — balance roam of unknown ground with exploit of known yields.
When Use
- Search large solution space where brute-force count is not practical
- Balance invest between roaming new paths and deepening known good ones
- Tune resource spend across many uncertain chances
- Design search strategies for spread teams or auto agents
- Spot premature converge (stuck on local optima) or endless wander (never commit)
- Complement
coordinate-swarmwith specific resource-find patterns
Inputs
- Required: Desc of resource being sought (info, compute, talent, solutions, chances)
- Required: Desc of search space (size, structure, known features)
- Optional: Current search strategy and its fail mode
- Optional: Count of open scouts/searchers
- Optional: Cost of roam vs cost of exploit fail
- Optional: Time horizon (short-term exploit vs long-term roam)
Steps
Step 1: Map the Foraging Landscape
Describe resource env to pick right forage strategy.
- Spot resource type and its distribution:
- Concentrated: resources cluster in rich patches (e.g., talent in specific communities)
- Distributed: resources spread evenly (e.g., bugs across codebase)
- Ephemeral: resources appear and vanish (e.g., market chances)
- Nested: rich patches hold sub-patches at different scales
- Check info landscape:
- How much known about resource spots before forage starts?
- Can scouts share info with foragers? (see
coordinate-swarmfor signal design) - Is landscape static or shifting while you forage?
- Figure cost structure:
- Cost per scout sent (time, compute, money)
- Cost of exploit low-quality resource (chance cost)
- Cost of missing high-quality resource (regret)
Got: Described forage landscape with resource distribution type, info availability, cost structure. This picks which forage model to apply.
If fail: Landscape fully unknown? Start with max roam (all scouts, no exploit) for fixed time budget to build first map. Switch to right model once landscape character becomes clear.
Step 2: Deploy Scouts with Trail Marking
Send roam agents into search space with orders to mark what they find.
- Set scout percent (start with 20-30% of open agents as scouts)
- Set scout behavior:
- Move through search space with randomized or systematic patterns
- Check each spot met (quick check, not deep analysis)
- Mark finds with signal strength by quality:
- High quality → strong trail signal
- Medium quality → moderate signal
- Low quality → weak signal or no signal
- Return info to collective (signal deposit, report, broadcast)
- Design scout pattern:
- Random walk: good for unknown, uniform landscapes
- Levy flight: long jumps with occasional local clustering — good for patchy resources
- Systematic sweep: grid or spiral — good for bounded, well-defined spaces
- Biased random: lean toward areas like past finds — good for clustered resources
Got: Scouts sent across search space, dropping trail signals by resource quality. First map of landscape starts to emerge from scout reports.
If fail: Scouts find nothing in first sweep? Either scout percent too low (bump to 50%), search pattern wrong (switch from random walk to Levy flight for patchy resources), or quality check miscalibrated (lower detection threshold).
Step 3: Establish Trail Reinforcement
Make positive feedback loops that amplify good paths and let bad ones fade.
- When forager follows trail and finds good resource:
- Reinforce trail signal (bump strength)
- Reinforced signal pulls more foragers → more reinforcement → exploit
- When forager follows trail and finds nothing:
- Do not reinforce (let trail decay natural)
- Weakening signal pulls fewer foragers → trail fades → roam resumes
- Set reinforcement params:
- Deposit amount: by resource quality found
- Decay rate: trails lose X% of strength per time unit
- Saturation cap: max trail strength (blocks runaway exploit of single path)
Trail Reinforcement Dynamics:
┌─────────────────────────────────────────────────────────────────────┐
│ │
│ Strong trail ──→ More foragers ──→ If good: reinforce ──→ EXPLOIT │
│ ↑ │ │
│ │ If bad: no reinforce │ │
│ │ │ │ │
│ │ ↓ │ │
│ Decay ←── Weak trail ←── Fewer foragers ←── Trail fades │ │
│ │ │ │
│ ↓ │ │
│ No trail ──→ Scouts explore ──→ New discovery ──→ New trail ↗ │
│ │
└─────────────────────────────────────────────────────────────────────┘
Got: Self-regulating feedback loop where good resources pull growing focus and poor resources naturally abandoned. System balances exploit and roam through trail dynamics alone.
If fail: All foragers converge on single trail (premature converge)? Decay rate too slow or saturation cap too high. Bump decay, lower cap, or add random roam rules (e.g., 10% of foragers always ignore trails). Trails fade too fast and nothing gets exploited? Drop decay rate.
Step 4: Detect Diminishing Returns
Watch resource yields to know when to shift from exploit back to roam.
- Track yield per unit effort for each active forage site:
- Yield rising → healthy exploit, keep going
- Yield flat → close to saturation, start scouting alternatives
- Yield dropping → diminishing returns, cut foragers, bump scouts
- Apply marginal value theorem:
- Compare current site yield rate to average yield rate across all known sites
- When current site drops below average, time to leave
- Factor in travel cost (cost of switching to new site)
- Fire scouting waves when:
- Overall yield across all sites drops below threshold
- Best-performing site exploited longer than its expected life
- Env change spotted (new signals from scouts in unexplored areas)
Got: Forage swarm naturally shifts between exploit phases (focused on known-good sites) and roam phases (scouts spread), driven by yield watch rather than fixed schedules.
If fail: Swarm stays on depleted sites too long? Marginal value threshold too low or travel cost estimate too high. Recalibrate by compare real yield rates. Swarm abandons good sites too early? Threshold too sensitive — add smoothing window to yield measure.
Step 5: Adapt Foraging Strategy to Conditions
Pick and switch between forage strategies by env feedback.
- Match strategy to landscape:
- Rich, clustered: commit heavy to found patches (high exploit)
- Sparse, scattered: keep high scout ratio (high roam)
- Volatile, changing: short trail decay, frequent scouting waves (adaptive)
- Competitive: faster reinforcement, pre-emptive trail marking (territorial)
- Watch for strategy-env mismatch:
- High effort, low yield → strategy too exploit for landscape
- High find rate, low follow-through → strategy too roam
- Oscillating yield → strategy switching too aggressive
- Do adaptive switching:
- Track rolling average of roam-to-exploit ratio
- If ratio drifts too far from best (set by landscape type), nudge back
- Allow gradual shifts — abrupt strategy switches cause coord chaos
Got: Forage system that adapts its roam-exploit balance to current env, keeping effect as conditions shift.
If fail: Strategy adapt itself becomes unstable (oscillating between roam and exploit)? Add damping: need mismatch signal to stick for N time units before fire strategy shift. No strategy seems to work? Recheck landscape description from Step 1 — resource distribution may be more complex than first assumed.
Validation
- Forage landscape described (distribution type, info open, cost structure)
- Scout percent and search pattern set and deployed
- Trail reinforcement loop works with deposit, decay, and saturation params
- Diminishing returns detect fires rebalance from exploit to roam
- Strategy-env match watched and adaptive switch configured
- System recovers from landscape shifts (new resources, depleted resources)
Pitfalls
- Premature converge: All foragers pile onto first good find, skip possibly better options. Cure: mandatory roam percent, trail saturation caps, and decay
- Endless roam: Scouts keep finding new options but swarm never commits. Cure: lower quality threshold for trail reinforcement, drop scout percent
- Ignore travel costs: Switch sites has cost. Foragers that jump between same-quality sites waste more on travel than they gain. Factor travel cost into marginal value count
- Static strategy in dynamic landscape: Strategy tuned for yesterday fails tomorrow. Build adapt into forage loop, not as afterthought
- Mix scout quality with forager quality: Good scouts (broad, quick check) and good foragers (deep, full exploit) need different skills. Do not force all agents into both roles
See Also
coordinate-swarm— base coord patterns that back forage signal designbuild-consensus— used when swarm must collectively agree on which resource patches to prioritizescale-colony— scaling forage ops when resource landscape or swarm size growsassess-form— morphic skill for check of current state of system, complement to landscape checkconfigure-alerting-rules— alerting patterns apply to diminishing returns detectplan-capacity— capacity plan shares explore-exploit frame with forage theoryforage-solutions— AI self-apply variant; maps ant colony forage to single-agent solution roam with scout hypotheses and trail reinforcement
GitHub 저장소
연관 스킬
llamaguard
기타LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.
cost-optimization
기타이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.
quantizing-models-bitsandbytes
기타이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.
dispatching-parallel-agents
기타이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.
