-
Notifications
You must be signed in to change notification settings - Fork 529
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
base: master
Are you sure you want to change the base?
WDLRescale() cleanup #1953
Conversation
src/mcts/search.cc
Outdated
wdl_rescale_diff_ = | ||
contempt_mode_ == ContemptMode::NONE | ||
? 0 | ||
: params_.GetWDLRescaleDiff() * params_.GetWDLEvalObjectivity(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_;
No description provided.