skills/skillxiv-v0.0.2-claude-opus-4.6/deep-search-mcts-rlvr-training/SKILL.md
Overcome exploration bottlenecks in reasoning RL by integrating Monte Carlo Tree Search during training (not just inference). Global frontier selection and entropy-guided sampling reduce GPU hours by 5.7x while improving performance.
npx skillsauth add ADu2021/skillXiv deep-search-mcts-rlvr-trainingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
DeepSearch addresses training plateaus in reasoning models by integrating MCTS directly into the RL training loop. Rather than waiting for standard RLVR to explore, structured search during training accelerates discovery of correct solutions, achieving superior results with 5.7x fewer GPU hours.
Setup MCTS-augmented RLVR trainer:
# Initialize DeepSearch training framework
from deepsearch import MCTSTrainer, MCTSConfig, FrontierSelector
mcts_config = MCTSConfig(
num_simulations=100,
max_depth=50,
exploration_constant=1.414,
temperature=1.0
)
frontier_selector = FrontierSelector(
selection_strategy="global_frontier",
num_frontier_nodes=50,
confidence_threshold=0.5
)
trainer = MCTSTrainer(
model=your_reasoning_llm,
verifier=your_verifier,
mcts_config=mcts_config,
frontier_selector=frontier_selector,
algorithm="GRPO"
)
Execute MCTS-augmented training:
# Training loop with integrated MCTS
for epoch in range(num_epochs):
for batch in training_dataloader:
prompts = batch["prompt"]
# Stage 1: MCTS exploration during training
search_trees = []
for prompt in prompts:
# Run MCTS from this prompt
tree = trainer.mcts.search(
root_prompt=prompt,
num_simulations=mcts_config.num_simulations,
temperature=mcts_config.temperature
)
search_trees.append(tree)
# Stage 2: Global frontier selection across all search trees
frontier_nodes = frontier_selector.select(
trees=search_trees,
num_nodes=len(prompts) * 5 # 5 frontier nodes per prompt
)
# Stage 3: Entropy-guided sampling from frontier
# Prioritize confident errors (high model confidence but wrong answer)
sampled_trajectories = []
for node in frontier_nodes:
trajectory = trainer.trajectory_from_node(node)
# Compute entropy/confidence
entropy = compute_entropy(node.model_confidence)
# Entropy-guided selection: confident but incorrect
if node.is_error and entropy < entropy_threshold:
sampled_trajectories.append(trajectory)
# Stage 4: Compute rewards and asymmetric updates
rewards = trainer.verifier.evaluate(sampled_trajectories)
# Asymmetric Q-value updates
for trajectory, reward in zip(sampled_trajectories, rewards):
if reward > 0: # Correct solution
# Strong positive signal
q_value = 1.0 + bonus_correct
else: # Incorrect solution
# Negative signal for learning
q_value = -1.0 + penalty_entropy * (entropy / max_entropy)
# Stage 5: RLVR policy update on selected trajectories
loss = trainer.compute_grpo_loss(
trajectories=sampled_trajectories,
rewards=rewards,
q_values=q_values
)
# Backward pass
loss.backward()
optimizer.step()
optimizer.zero_grad()
# Stage 6: Update replay buffer with MCTS trajectories
for trajectory, reward in zip(sampled_trajectories, rewards):
trainer.replay_buffer.add(
trajectory=trajectory,
reward=reward,
source="mcts_training"
)
# Logging
if epoch % 10 == 0:
success_rate = (torch.tensor(rewards) > 0.5).float().mean()
print(f"Epoch {epoch}: Success={success_rate:.1%}")
When to use DeepSearch:
When NOT to use:
Hyperparameters:
Global frontier selection:
Entropy guidance:
Training overhead:
GPU hour reduction:
Trajectories discovered via MCTS stored and replayed:
Key insight: "MCTS during training acts as oracle exploration, revealing high-value regions policy might miss." Unlike inference-only MCTS (expensive, deployment-time), training-time MCTS can be amortized during learning.
| Aspect | Standard RLVR | DeepSearch | |--------|---------------|-----------| | Exploration | Random sampling | Structured MCTS | | Training time | Baseline | +35% per-step | | Convergence | 3K steps plateau | Continues beyond 5K | | GPU hours to 62.95% | ~1000 | ~175 | | Final performance | 61.70% | 62.95% |
Builds on MCTS theory, curriculum learning, and verifiable reward signals for RL.
testing
Uses flow maps as look-ahead operators to enable principled reward-guided diffusion by predicting trajectory endpoints at any denoising step. Deploy when applying rewards or preferences to diffusion trajectories with meaningful gradients throughout generation.
testing
Train language models where each expert learns independently on closed datasets, enabling flexible inference with selective data inclusion or exclusion. 41% performance improvement while allowing users to opt out of specific data sources without retraining.
data-ai
Understand how token generation flexibility in diffusion LMs paradoxically constrains reasoning, as models exploit ordering flexibility to avoid uncertain tokens, and apply simplified approaches that preserve parallel decoding benefits. Use when optimizing diffusion-based language models for reasoning tasks.
devops
Enable LLM agents to improve continuously during deployment by constructing structured experience libraries through self-reflection on successes and failures—achieving 23% improvement on reasoning without gradient-based parameter updates or external training.