Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WDLRescale() cleanup #1953

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

borg323
Copy link
Member

@borg323 borg323 commented Feb 21, 2024

No description provided.

src/mcts/search.cc Outdated Show resolved Hide resolved
wdl_rescale_diff_ =
contempt_mode_ == ContemptMode::NONE
? 0
: params_.GetWDLRescaleDiff() * params_.GetWDLEvalObjectivity();
Copy link
Contributor

Choose a reason for hiding this comment

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

That's unfortunately not how it works -- WDLEvalObjectivity is only supposed to be applied when invert is set.

Copy link
Contributor

Choose a reason for hiding this comment

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

Best solution probably is to define a "forwards" and an "invert" wdl_rescale_diff_ here if the goal is to avoid any params_.Get...() calls.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I missed that. I'll think about it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I decided to store the value in wdl_eval_objectivity_, seems cleaner this way to keep all the logic inside WDLRescale():

  float wdl_rescale_diff =
      invert ? -wdl_rescale_diff_ * wdl_eval_objectivity_ : wdl_rescale_diff_;

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.

None yet

2 participants