Skip to content

Comments

Use root utility offset to randomize move selection#2386

Open
Menkib64 wants to merge 5 commits intoLeelaChessZero:masterfrom
Menkib64:utility_offset_temperature
Open

Use root utility offset to randomize move selection#2386
Menkib64 wants to merge 5 commits intoLeelaChessZero:masterfrom
Menkib64:utility_offset_temperature

Conversation

@Menkib64
Copy link
Contributor

@Menkib64 Menkib64 commented Feb 14, 2026

Temperature implementation as post selection has bad interaction with smart prunning. Alternative idea is to implement randomization as utility offset for root moves. Offset allows search to refute temperature preferred moves.

I'm planning to backport this to odds bots if it looks resonable.

Temperature implementation as post selection has bad interaction with
smart prunning. Alternative idea is to implement randomization as
utility offset for root moves. Offset allows search to refute temperature
preferred moves.
Copilot AI review requested due to automatic review settings February 14, 2026 14:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes how move-selection randomness (“temperature”) is applied by introducing a root utility offset noise term, so the search can still refute initially-preferred noisy moves during exploration (improving interaction with smart pruning).

Changes:

  • Extend Random to be usable as a standard C++ random engine (URBG) for <random> distributions.
  • Add per-root-move utility offsets sampled from a normal distribution and incorporate them into root UCT selection + verbose stats (classic + dag_classic).
  • Add new UCI/options parameters for controlling the root utility offset noise (including endgame behavior), and refactor temperature decay logic into a shared helper in each search implementation.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/utils/random.h Makes Random usable as a URBG (operator(), min/max) so it can drive <random> distributions.
src/search/dag_classic/search.h Adds root_utility_offsets_ storage to the DAG classic search.
src/search/dag_classic/search.cc Samples root utility offsets and applies them to root selection + verbose stats; reuses TemperatureDecay.
src/search/classic/search.h Adds root_utility_offsets_ storage to the classic search.
src/search/classic/search.cc Samples root utility offsets and applies them to root selection + verbose stats; reuses TemperatureDecay.
src/search/classic/params.h Adds getters for new temperature utility offset parameters.
src/search/classic/params.cc Registers the new options and their help text/defaults.
src/search/classic/node.h Adds helper to compute a child edge index for verbose stats offset display.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant