Skip to content

Commit

Permalink
Update LunarLander-v2_PPO.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonlessons authored Nov 12, 2020
1 parent 2222a20 commit db9783a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LunarLander-v2_PPO/LunarLander-v2_PPO.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ def run(self): # train only when episode is finished

if self.episode >= self.EPISODES:
break
self.env.close()

def run_batch(self): # train every self.Training_batch episodes
state = self.env.reset()
Expand Down Expand Up @@ -358,7 +359,9 @@ def run_batch(self): # train every self.Training_batch episodes
self.replay(states, actions, rewards, predictions, dones, next_states)
if self.episode >= self.EPISODES:
break
self.env.close()


def run_multiprocesses(self, num_worker = 4):
works, parent_conns, child_conns = [], [], []
for idx in range(num_worker):
Expand Down

0 comments on commit db9783a

Please sign in to comment.