MCP HubMCP Hub
스킬 목록으로 돌아가기

forage-resources

pjt222
업데이트됨 Yesterday
5 조회
17
2
17
GitHub에서 보기
기타ai

정보

이 스킬은 개미 군체 최적화와 채집 이론을 구현하여 방대하고 열거하기 어려운 해결 공간에서의 탐색 문제를 해결합니다. 정찰 개미 배치와 경로 강화 같은 메커니즘을 통해 개발자들이 새로운 옵션 탐색과 알려진 우수한 옵션 활용 사이의 균형을 잡도록 돕습니다. 자원 할당 최적화, 지역 최적점 회피, 분산 탐색 작업에서의 탐색-활용 트레이드오프 관리에 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/forage-resources

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Forage Resources

Apply foraging theory and ant colony optimization to systematically search for, evaluate, and exploit distributed resources — balancing exploration of unknown territory with exploitation of known yields.

When to Use

  • Searching a large solution space where brute-force enumeration is impractical
  • Balancing investment between exploring new approaches and deepening known good ones
  • Optimizing resource allocation across multiple uncertain opportunities
  • Designing search strategies for distributed teams or automated agents
  • Diagnosing premature convergence (stuck on local optima) or perpetual wandering (never committing)
  • Complementing coordinate-swarm with specific resource-discovery patterns

Inputs

  • Required: Description of the resource being sought (information, compute, talent, solutions, opportunities)
  • Required: Description of the search space (size, structure, known features)
  • Optional: Current search strategy and its failure mode
  • Optional: Number of available scouts/searchers
  • Optional: Cost of exploration vs. cost of exploitation failure
  • Optional: Time horizon (short-term exploitation vs. long-term exploration)

Procedure

Step 1: Map the Foraging Landscape

Characterize the resource environment to select appropriate foraging strategy.

  1. Identify the 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 a codebase)
    • Ephemeral: resources appear and disappear (e.g., market opportunities)
    • Nested: rich patches contain sub-patches at different scales
  2. Assess the information landscape:
    • How much is known about resource locations before foraging begins?
    • Can scouts share information with foragers? (see coordinate-swarm for signal design)
    • Is the landscape static or changing while you forage?
  3. Determine the cost structure:
    • Cost per scout deployed (time, compute, money)
    • Cost of exploiting a low-quality resource (opportunity cost)
    • Cost of missing a high-quality resource (regret)

Got: A characterized foraging landscape with resource distribution type, information availability, and cost structure. This determines which foraging model to apply.

If fail: If the landscape is completely unknown, start with maximum exploration (all scouts, no exploitation) for a fixed time budget to build an initial map. Switch to the appropriate model once the landscape character becomes clear.

Step 2: Deploy Scouts with Trail Marking

Send exploratory agents into the search space with instructions to mark what they find.

  1. Allocate scout percentage (start with 20-30% of available agents as scouts)
  2. Define scout behavior:
    • Move through the search space using randomized or systematic patterns
    • Evaluate each location encountered (quick assessment, not deep analysis)
    • Mark discoveries with signal strength proportional to quality:
      • High quality → strong trail signal
      • Medium quality → moderate signal
      • Low quality → weak signal or no signal
    • Return information to the collective (signal deposit, report, broadcast)
  3. Design the 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 similar to previous finds — good for clustered resources

Got: Scouts deployed across the search space, depositing trail signals proportional to resource quality. The initial map of the landscape begins to emerge from scout reports.

If fail: If scouts find nothing in the initial sweep, either the scout percentage is too low (increase to 50%), the search pattern is wrong (switch from random walk to Levy flight for patchy resources), or the quality assessment is miscalibrated (lower the detection threshold).

Step 3: Establish Trail Reinforcement

Create positive feedback loops that amplify successful paths and let unsuccessful ones fade.

  1. When a forager follows a trail and finds a good resource:
    • Reinforce the trail signal (increase strength)
    • The reinforced signal attracts more foragers → more reinforcement → exploitation
  2. When a forager follows a trail and finds nothing:
    • Do not reinforce (let the trail decay naturally)
    • The weakening signal attracts fewer foragers → trail fades → exploration resumes
  3. Set reinforcement parameters:
    • Deposit amount: proportional to resource quality found
    • Decay rate: trails lose X% of strength per time unit
    • Saturation cap: maximum trail strength (prevents runaway exploitation of a 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: A self-regulating feedback loop where good resources attract increasing attention and poor resources are naturally abandoned. The system balances exploitation and exploration through trail dynamics alone.

If fail: If all foragers converge on a single trail (premature convergence), the decay rate is too slow or the saturation cap is too high. Increase decay, lower the cap, or introduce random exploration mandates (e.g., 10% of foragers always ignore trails). If trails fade too fast and nothing gets exploited, reduce the decay rate.

Step 4: Detect Diminishing Returns

Monitor resource yields to know when to shift from exploitation back to exploration.

  1. Track yield per unit effort for each active foraging site:
    • Yield increasing → healthy exploitation, continue
    • Yield flat → approaching saturation, begin scouting alternatives
    • Yield decreasing → diminishing returns, reduce foragers, increase scouts
  2. Implement the marginal value theorem:
    • Compare the current site's yield rate to the average yield rate across all known sites
    • When current site drops below the average, it's time to leave
    • Factor in travel cost (the cost of switching to a new site)
  3. Trigger scouting waves when:
    • Overall yield across all sites drops below a threshold
    • The best-performing site has been exploited for longer than its expected lifetime
    • Environmental change is detected (new signals from scouts in unexplored areas)

Got: The foraging swarm naturally shifts between exploitation phases (concentrated on known-good sites) and exploration phases (scouts dispersed), driven by yield monitoring rather than arbitrary schedules.

If fail: If the swarm stays on depleted sites too long, the marginal value threshold is set too low or the travel cost estimate is too high. Recalibrate by comparing actual yield rates. If the swarm abandons good sites too early, the threshold is too sensitive — add a smoothing window to the yield measurement.

Step 5: Adapt Foraging Strategy to Conditions

Select and switch between foraging strategies based on environmental feedback.

  1. Match strategy to landscape:
    • Rich, clustered: commit heavily to discovered patches (high exploitation)
    • Sparse, scattered: maintain high scout ratio (high exploration)
    • Volatile, changing: short trail decay, frequent scouting waves (adaptive)
    • Competitive: faster reinforcement, pre-emptive trail marking (territorial)
  2. Monitor for strategy-environment mismatch:
    • High effort, low yield → strategy too exploitative for the landscape
    • High discovery rate, low follow-through → strategy too exploratory
    • Oscillating yield → strategy switching too aggressively
  3. Implement adaptive switching:
    • Track a rolling average of exploration-to-exploitation ratio
    • If the ratio drifts too far from optimal (determined by landscape type), nudge it back
    • Allow gradual transitions — abrupt strategy switches cause coordination chaos

Got: A foraging system that adapts its exploration-exploitation balance to the current environment, maintaining effectiveness as conditions change.

If fail: If strategy adaptation itself becomes unstable (oscillating between exploration and exploitation), add damping: require the mismatch signal to persist for N time units before triggering a strategy shift. If no strategy seems to work, reassess the landscape characterization from Step 1 — the resource distribution may be more complex than initially assumed.

Validation

  • Foraging landscape is characterized (distribution type, information availability, cost structure)
  • Scout percentage and search pattern are defined and deployed
  • Trail reinforcement loop is functional with deposit, decay, and saturation parameters
  • Diminishing returns detection triggers rebalancing from exploitation to exploration
  • Strategy-environment match is monitored and adaptive switching is configured
  • System recovers from landscape changes (new resources, depleted resources)

Pitfalls

  • Premature convergence: All foragers pile onto the first good find, ignoring potentially better options. Cure: mandatory exploration percentage, trail saturation caps, and decay
  • Perpetual exploration: Scouts keep finding new options but the swarm never commits. Cure: lower the quality threshold for trail reinforcement, reduce scout percentage
  • Ignoring travel costs: Switching sites has a cost. Foragers that constantly jump between similar-quality sites waste more on travel than they gain. Factor travel cost into the marginal value calculation
  • Static strategy in dynamic landscape: A strategy optimized for yesterday's conditions fails tomorrow. Build adaptation into the foraging loop, not as an afterthought
  • Conflating scout quality with forager quality: Good scouts (broad, quick assessment) and good foragers (deep, thorough exploitation) require different skills. Don't force all agents into both roles

Related Skills

  • coordinate-swarm — foundational coordination patterns that underpin foraging signal design
  • build-consensus — used when the swarm must collectively agree on which resource patches to prioritize
  • scale-colony — scaling foraging operations when the resource landscape or swarm size grows
  • assess-form — morphic skill for evaluating the current state of a system, complementary to landscape assessment
  • configure-alerting-rules — alerting patterns applicable to diminishing returns detection
  • plan-capacity — capacity planning shares the explore-exploit framing with foraging theory
  • forage-solutions — AI self-application variant; maps ant colony foraging to single-agent solution exploration with scout hypotheses and trail reinforcement

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman-lite/skills/forage-resources
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

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개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.

스킬 보기