From 273918630cd228d53b7a156b7393f398a0d9f729 Mon Sep 17 00:00:00 2001 From: ginoperrotta <93783203+ginoperrotta@users.noreply.github.com> Date: Tue, 30 Nov 2021 20:37:23 -0500 Subject: [PATCH] Remove redundant while loop break in dqn.py The training loop in dqn.py has both `while not done` and `if done: break`. This is harmless, but redundant. Given this repo's focus on minimalism, though, I thought the break statement should be removed. --- dqn.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dqn.py b/dqn.py index 0e5c0d0..8ba683b 100644 --- a/dqn.py +++ b/dqn.py @@ -98,8 +98,6 @@ def main(): s = s_prime score += r - if done: - break if memory.size()>2000: train(q, q_target, memory, optimizer) @@ -112,4 +110,4 @@ def main(): env.close() if __name__ == '__main__': - main() \ No newline at end of file + main()