Rewrite PPO

This commit is contained in:
Shangtong Zhang
2018-04-05 22:32:34 -06:00
parent 8ad31c79b8
commit 549e4af3b8
9 changed files with 162 additions and 120 deletions
+4 -1
View File
@@ -151,7 +151,10 @@ def sub_task(parent_pipe, pipe, task_fn, rank, log_dir):
while True:
op, data = pipe.recv()
if op == 'step':
pipe.send(task.step(data))
ob, reward, done, info = task.step(data)
if done:
ob = task.reset()
pipe.send([ob, reward, done, info])
elif op == 'reset':
pipe.send(task.reset())
elif op == 'exit':