Skip to content

Conversation

SyHeee
Copy link
Collaborator

@SyHeee SyHeee commented Mar 31, 2025

Simplified MCTS --> Reflective MCTS (R-MCTS)

  • Selection: Instead of using UCT (Upper Confidence Bound for Trees), it uses GPT-4 to select the most promising child node based on:

Current trajectory
Available children nodes
Node statistics (visits and values)
The overall goal

  • Expansion: This phase remains similar to BFS/DFS, expanding the selected node if it's not terminal and hasn't reached max depth.

  • Simulation: Uses the existing trajectory scoring system to evaluate the current path, which provides:

Overall score
Efficiency score
Accuracy score
Robustness score
Detailed feedback

  • Backpropagation: Instead of traditional value updates, it uses a reflection-based approach:

If the score is below 0.75, it uses GPT-4 to analyze the trajectory
The reflection suggests which step to backtrack to and why
It then backtracks to that step and continues exploration
Node statistics (visits and values) are still updated for future selection

@SyHeee SyHeee requested a review from TataKKKL March 31, 2025 03:57
Copy link

vercel bot commented Mar 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visual-tree-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2025 5:10am

@SyHeee SyHeee linked an issue Mar 31, 2025 that may be closed by this pull request
@SyHeee SyHeee changed the title [WIP | Need Fix] Add selective-mcts [WIP | Need Fix + Add Websocket] Add reflective-mcts Mar 31, 2025
@TataKKKL
Copy link
Member

@SyHeee thanks for the PR, but actually simple search agent only contains BFS and DFS, you will need to configure another MCTS agent for MCTS.

@SyHeee
Copy link
Collaborator Author

SyHeee commented Apr 1, 2025

@SyHeee thanks for the PR, but actually simple search agent only contains BFS and DFS, you will need to configure another MCTS agent for MCTS.

Do you suggest create a new MCTS class? For the simplified version, as in my method, i didn't use UCT and explicit rollout for searching and selection, my design was to leverage current Node and state to do simulation and selecting among candidates. Hence I added the logic under simple_search_agent. Lemme know your thoughts.

@TataKKKL
Copy link
Member

TataKKKL commented Apr 1, 2025

Hi Shiying, yes, I suggest you create another MCTS agent class, and you can copy paste some code from the simple tree search agent to the new class, later we can do some refactoring to have a base class and both MCTS agent and simple tree search agent inherit that, but we can do that later.
Since simple tree search itself means just the BFS and DFS, thanks!

@SyHeee
Copy link
Collaborator Author

SyHeee commented Apr 1, 2025

Hi Shiying, yes, I suggest you create another MCTS agent class, and you can copy paste some code from the simple tree search agent to the new class, later we can do some refactoring to have a base class and both MCTS agent and simple tree search agent inherit that, but we can do that later. Since simple tree search itself means just the BFS and DFS, thanks!

Got it, sure I will create a new module and keep the overlapped methods.

@TataKKKL
Copy link
Member

TataKKKL commented Apr 5, 2025

merged this PR: #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MCTS: sync -> async, use same data format configure for websocket
2 participants