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

calc_reward passes in last_state and previous_state with the same current hp values #662

Open
thekevalian opened this issue Dec 11, 2024 · 1 comment

Comments

@thekevalian
Copy link

I noticed while writing my reward function that the last state and current state passed into calc_reward always gave me the same value for the current_hp, even though there was a difference. Changing the shallow copy in openai_api.py from

battle = copy.copy(self.current_battle)

to a deep copy

battle = copy.deepcopy(self.current_battle)

fixed the issue.

I'm not sure if it's only me experiencing this, but I've attached a screenshot of the edit just in case anyone else has experienced this:
image

@hsahovic
Copy link
Owner

Hi @thekevalian,
Thanks for reporting this. I'll investigate.

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

No branches or pull requests

2 participants