Mcts Reasoning — AI skill for Claude Code
Monte Carlo Tree Search for LLM-based reasoning with fluent API and advanced sampling strategies.
How to install Mcts Reasoning
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open queelius/mcts-reasoning and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Mcts Reasoning does
Monte Carlo Tree Search for LLM-based reasoning with fluent API and advanced sampling strategies.
Alternatives in AI
- WeKnora — Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, an 26.9k ★
- Hindsight — State-of-the-art long-term memory for AI agents by Vectorize 6.7k ★
- Deepreasoning — A high-performance LLM inference API and Chat UI that integrates DeepSeek R1's CoT reasoning traces with Anthr 5.4k ★
README
MCTS-Reasoning
Monte Carlo Tree Search for LLM reasoning. Explores multiple reasoning paths using UCB1 to balance exploration and exploitation, with deterministic verifiers providing the reward signal.
See the [blog post](https://metafunctor.com/post/2026-04-01-i-spent-048-to-find-out-when-mcts-actually-works-for-llm-reasoning/) for experimental results and analysis.
When This Helps
MCTS adds value over best-of-N sampling under three conditions:
- A deterministic verifier scores solutions (not a learned reward model).
- The verifier provides partial credit (a gradient, not just pass/fail).
- The problem is hard enough that blind sampling can't reliably solve it.
On constraint satisfaction problems with 6-8 variables, MCTS(5+3) solved 100% of problems vs 90% for best-of-N and self-consistency, both using the same total budget of 8 solution attempts. Total API cost: $0.48.
Install
pip install -e . # Core
pip install -e ".[anthropic]" # + Anthropic provider
pip install -e ".[openai]" # + OpenAI provider
pip install -e ".[all]" # Everything
Quick Start
CLI
mcts-reason "What is 15*7+23?" --answer 128 --simulations 10
mcts-reason "Question" --provider anthropic --model claude-haiku-4-5-20251001
Python
from mcts_reasoning.mcts import MCTS
from mcts_reasoning.generator import LLMGenerator
from mcts_reasoning.evaluator import NumericEvaluator
from mcts_reasoning.providers.anthropic import AnthropicProvider
llm = AnthropicProvider()
gen = LLMGenerator(llm=llm, temperature=0.7, max_tokens=150)
ev = NumericEvaluator(ground_truth=128)
mcts = MCTS(generator=gen, evaluator=ev, max_rollout_depth=5)
state = mcts.search("What is 15*7+23?", simulations=10)
Run Experiments
pip install -e ".[anthropic]"
export ANTHROPIC_API_KEY=your-key
python experiments/run_csp.py --hard --budget 1.00
The Anthropic provider tracks token usage and enfor
Related Skills
Rmcprofile Skill
AI-agent skill, verified toolkit, clean-room teaching engine, executed book and course for RMCProfile (Reverse
Anyindex MCP
Local MCP server for semantic code search. AST-aware chunking with tree-sitter, offline ONNX embeddings, hybri
Fluentui MCP
Agent Skill that teaches AI coding assistants Microsoft Fluent UI React v9 with component, category, recipe, a
Dsh Legion
Multi-agent orchestration and LLM model routing for DeepSeek Harness (DSH): semantic AI agent profiles, exact
Semble Rs
Fast, AI-agent-native code search in Rust — hybrid BM25 + semantic, Tree-sitter AST chunking, dependency & imp
Hipocampus
Drop-in memory harness for AI agents — 3-tier memory, compaction tree, hybrid search. One command to set up. W
Related Agents
Backtesting Engineer
Backtesting and simulation specialist for strategy validation, walk-forward optimization, Monte Carlo simulati
Lydia
CFO advisory agent for financial strategy, modeling, analysis, and fiscal leadership. Use when analyzing finan
Sim Reviewer
Review the simulation layer of Monte Carlo studies: DGP truth, estimands,