Skip to content

fix(rstar): backpropagate rewards from evaluated rollout nodes - #344

Merged
codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
liuzhengyang699:fix/rstar-terminal-backpropagation
Oct 11, 2026
Merged

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
liuzhengyang699:fix/rstar-terminal-backpropagation

Conversation

@liuzhengyang699

Copy link
Copy Markdown
Contributor

R* attaches the simulation steps to the search tree, but backpropagates only from the node where simulation started. The added descendants retain zero visits and zero value. Since trajectory_score reads the last node, completed trajectories can all score zero even when their evaluated rewards differ.

Return the evaluated node alongside the simulation reward and backpropagate from it in both the synchronous and asynchronous search. Each rollout still updates the root once, including when the simulation depth is zero.

Validation: 9 tests and 2 subtests passed with python -m pytest tests/test_rstar_backpropagation.py tests/test_conversation_logging_approaches.py -q. The regressions reproduce unscored terminal nodes in both paths before the fix; concurrent rollouts also check that the higher-reward trajectory is selected. All provider calls are mocked. Ruff passed for the new tests, and git diff --check passed.

@codelion
codelion merged commit c73155e into algorithmicsuperintelligence:main Oct 11, 2026
6 checks passed
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.

2 participants