samotech/skills-tree/mcts

Claude Code and agent skill by samotech/skills-tree

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use stochastic rollout and value estimates to explore a decision tree while controlling expansion, simulation, and selection budgets.

Install

npx vskill@latest install samotech/skills-tree/mcts

SKILL.md

The same SKILL.md was published earlier as samotech/skills-tree/mcts.

[Image: Dependency Status]

Monte Carlo Tree Search

Category: agentic-patterns Skill Level: advanced Stability: stable Added: 2025-03

Description

Use stochastic rollout and value estimates to explore a decision tree while controlling expansion, simulation, and selection budgets. Selection balances exploitation of high-value nodes against exploration of under-sampled ones, and every simulated reward is validated against a real terminal or value signal.

Inputs / Outputs
DirectionFieldTypeContract
Inputroot_stateobjectThe start state with a deterministic seed where possible
Inputaction_spacelist of objectThe actions available at each node
Outputbest_actionobjectThe root action with the highest validated value estimate
Outputbudget_ledgerobjectSimulations and expansions spent against the declared budget
Procedure
  1. Declare the simulation budget, expansion policy, and a deterministic seed where possible.
  2. Select a node by balancing value estimates against visit counts.
  3. Expand it with one unexplored action; roll out to a terminal or value signal.
  4. Back up the result along the path; validate that the value signal is real, not a heuristic artifact.
  5. Stop at the budget; select the root action with the best validated estimate.
  6. Report the estimate, its sample count, and the budget spent; distrust value estimates with tiny samples.
Example
python
stats = {'left': {'n': 4, 'mean': 0.5}, 'right': {'n': 10, 'mean': 0.8}}
budget = 14
spent = sum(s['n'] for s in stats.values())
def ucb(s, c=1.0, N=spent): return s['mean'] + c * (2 * 0.5 / max(1, s['n'])) ** 0.5
best = max(stats, key=lambda k: stats[k]['mean'] if stats[k]['n'] >= 3 else -1)
assert best == 'right' and spent <= budget
print({'best': best, 'mean': stats[best]['mean'], 'n': stats[best]['n'], 'spent': spent})
Related Skills

Failure Modes

  • A poor value heuristic amplified by random rollouts into confident wrong choices.
  • Selection on value estimates backed by tiny sample counts.
  • Non-reproducible rollouts where a deterministic seed was required.
  • Budget exhaustion reported as convergence.

Changelog

  • v2 (2026-11): Structural modernization; added the input/output contract table, a skill-specific execution procedure, a deterministic example, and corpus-verified related links (replaced the unresolvable cross-category related references).
  • v1 (2025-03): Initial entry.

Evidence

  • https://agentskills.io/specification

Evidence status: implementation guidance only; pattern behavior must be checked against current framework documentation; no benchmark claim is made without reproducible evidence.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
3
Repository forks
1
7-day trend score
12

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/samotech/skills-tree/mcts/badge)](https://verified-skill.com/skills/samotech/skills-tree/mcts)

Something wrong with this skill or its page? Tell us.