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

n == 0 should imply infinite criteria value #31

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

acshi
Copy link
Contributor

@acshi acshi commented Dec 6, 2021

This commit fixes #30

If the value for this node/action is already an infinity,
then we keep that infinity value as the criterion value, since UCB cannot change it.
At best, if the value were -infinity and n==0, we get -Inf + Inf == NaN, which would not be good.

Prior to this fix, if node values are initialized to zero and rewards are positive,
sometimes the first node would be explored twice before the second node gets explored the first time.

This commit fixes JuliaPOMDP#30

If the value for this node/action is already an infinity,
then we keep that infinity value as the criterion value, since UCB cannot change it.
At best, if the value were -infinity and n==0, we get -Inf + Inf == NaN, which would not be good.

Prior to this fix, if node values are initialized to zero and rewards are positive,
sometimes the first node would be explored twice before the second node gets explored the first time.
@zsunberg
Copy link
Member

zsunberg commented Dec 8, 2021

Thanks so much for your contribution and new clarity in understanding the cases!

@zsunberg zsunberg merged commit cdba2d4 into JuliaPOMDP:master Dec 8, 2021
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.

Unintuitive/incorrect criteria rule
2 participants