Skip to content

fix(rstar): preserve signed and decimal answers during search - #345

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

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
liuzhengyang699:fix/rstar-numeric-answers

Conversation

@liuzhengyang699

Copy link
Copy Markdown
Contributor

R* extracts answers with \d+, so an explicit The final answer is -1.25 falls back to 25 at reduced confidence, and 1.75 becomes 1 at full confidence. This changes both rollout rewards and the answer-frequency vote, even when the model generated the correct value.

Use the same signed numeric pattern for explicit answers and the last-number fallback. Preserve decimal and scientific notation while retaining the existing confidence levels and integer behavior.

Validation: python -m pytest tests/test_rstar_numeric_answers.py tests/test_rstar_backpropagation.py tests/test_conversation_logging_approaches.py -q passed 15 tests and 34 subtests. The new cases cover extraction, rollout reward, decimal answer voting, and the full solve() path with mocked model responses. Before the fix, the negative-answer reward, decimal vote, and final output regressions fail. New-test Ruff and git diff --check passed.

@codelion
codelion merged commit 5ea4efc 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