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

Training EVERY step, not every 100 #67

Open
eflopez1 opened this issue Oct 4, 2021 · 1 comment
Open

Training EVERY step, not every 100 #67

eflopez1 opened this issue Oct 4, 2021 · 1 comment

Comments

@eflopez1
Copy link

eflopez1 commented Oct 4, 2021

Hello,

I wanted to verify something I found in your code. In the method MADDPGAgentTrainer.update() there is a comment next to the following line stating that an update is only allowed to occur every 100 steps: ​

if not t % 100 == 0:  # only update every 100 steps
   ​return

I could be misreading this, but doesn't this line mean that an update will occur every step but skip over steps when t_step%100==0?

@Jelle-Plomp
Copy link

t%100 ==0 is true for every 100th step.

Since we have "if not t % 100 ==0: return", this return statement will be executed for all steps except for every 100th step. Therefore only every 100th step, the rest of the update function will be evaluated (hence every 100 steps the update is performed).

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