Skip to content

Fix potential division by zero in cpuctUtilityStdevPrior#1156

Open
ChinChangYang wants to merge 1 commit intolightvector:masterfrom
ChinChangYang:fix-cpuct-utility-stdev-prior-div-zero
Open

Fix potential division by zero in cpuctUtilityStdevPrior#1156
ChinChangYang wants to merge 1 commit intolightvector:masterfrom
ChinChangYang:fix-cpuct-utility-stdev-prior-div-zero

Conversation

@ChinChangYang
Copy link
Contributor

Summary

  • Fix potential division by zero in searchexplorehelpers.cpp by rejecting zero values for cpuctUtilityStdevPrior at parameter validation time
  • Change minimum allowed value from 0.0 to 1e-20 in setup.cpp

Fixes #831

Test plan

  • Verified cpuctUtilityStdevPrior = 0.0 is rejected with error message
  • Verified cpuctUtilityStdevPrior = 1e-20 is accepted (minimum boundary)
  • Verified cpuctUtilityStdevPrior = 10.0 is accepted (maximum boundary)
  • Verified cpuctUtilityStdevPrior = 10.1 is rejected with error message

🤖 Generated with Claude Code

Change the minimum allowed value for cpuctUtilityStdevPrior from 0.0 to
1e-20 to prevent division by zero in searchexplorehelpers.cpp when
computing parentUtilityStdevFactor.

Fixes lightvector#831

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

Potential Division by Zero in searchexplorehelpers.cpp

1 participant