Skip to content

Conversation

@johannes-fischer
Copy link
Contributor

To address #497, I extended EpsGreedyPolicy by internal fields for the greedy policy and the iteration k. If this seems like a reasonable way to go, I can make similar changes to SoftmaxPolicy and edit doc strings. If not feel free to close this PR.

With this change both interfaces are supported:
action(p::EpsGreedyPolicy, on_policy::Policy, k, s)
action(p::EpsGreedyPolicy, s)

@zsunberg
Copy link
Member

Thanks for the contribution!

My only concern is that it goes against the "preferably only one obvious way to do it" wisdom (https://peps.python.org/pep-0020/), since now k is in multiple places.

But I think this is probably OK. I think you should go ahead and implement it for the other policies and I will merge if it looks good.

@zsunberg
Copy link
Member

Is there a name we could use besides update!? Perhaps something more specific like set_age!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants