ReMCTS: Reflection-Enhanced Monte Carlo Tree Search for Code Generation
Open-weight large language models (LLMs) can generate function-level programs from natural-language prompts, but plausible candidates still fail on hidden semantics and repeat mistakes across repair attempts. We present ReMCTS, an execution-grounded, memory-augmented, LLM-guided MCTS-style search framework. It organizes program candidates as tree states, retains branch-local debugging context, retrieves failure experience across branches, and distinguishes failed checks from unavailable evidence. On HumanEval and MBPP-Sanitized, visible-test ReMCTS improves over direct generation in 8 of 10 model-dataset pairs under held-out evaluation, whereas proxy-only search is less stable. Controlled tree-search, sampling, repair, and memory ablations characterize the source and limits of these gains. A 30-task HumanEval-X C++ pilot further demonstrates compatibility with compiler-backed execution, but does not constitute a broad multilingual evaluation.
- Link
- https://www.semanticscholar.org/paper/a8b2e2f642d37626d1f59a9b3ac45be3aac11584
- Found by
- Semantic Scholar
- Authors
- Hui-Fei Wang, Xin-Yi Huang, Yi-Heng Sun, Yi-Fan Yuan
- Categories
- evaluation, dataset
- Published
- 2026-09-28
- Last seen by the radar
- 2026-09-30
- Citations
- 0
- Influential citations
- 0
- Radar score
- 35.50 / 100 (how it is scored)
- Why it scored so
- Matched: dataset, evaluat; Primary record: Semantic Scholar
- Related links
- https://arxiv.org/abs/2609.34717