Skip to content

Commit 7b9b578

Browse files
committed
add one more trajectory update
1 parent 35f85b2 commit 7b9b578

File tree

1 file changed

+2
-0
lines changed
  • visual-tree-search-backend/app/api/lwats/agents_async/SearchAgents

1 file changed

+2
-0
lines changed

visual-tree-search-backend/app/api/lwats/agents_async/SearchAgents/mcts_agent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,5 +309,7 @@ async def mcts_search(self, websocket=None) -> Optional[LATSNode]:
309309
print(f" Visits: {node.visits}")
310310
print(f" Value: {old_value:.3f} -> {node.value:.3f}")
311311
if best_node:
312+
# Convert node to serializable trajectory
313+
trajectory = [n.action for n in self.get_path_to_root(best_node) if n.action is not None]
312314
await self.websocket_search_complete("partial_success", best_node.value, best_node.get_trajectory(), websocket=websocket)
313315
return best_node

0 commit comments

Comments
 (0)