浏览代码

Added worker-id flag and pass through to enviroment in order to more easily manage multiple running simulations. (#40)

/develop-generalizationTraining-TrainerController
Arthur Juliani 7 年前
当前提交
cd3bfb87
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      python/ppo.py

4
python/ppo.py


--hidden-units=<n> Number of units in hidden layer [default: 64].
--batch-size=<n> How many experiences per gradient descent update step [default: 64].
--keep-checkpoints=<n> How many model checkpoints to keep [default: 5].
--worker-id=<n> Number to add to communication port (5005). Used for asynchronous agent scenarios [default: 0].
'''
options = docopt(_USAGE)

save_freq = int(options['--save-freq'])
env_name = options['<env>']
keep_checkpoints = int(options['--keep-checkpoints'])
worker_id = int(options['--worker-id'])
# Algorithm-specific parameters for tuning
gamma = float(options['--gamma'])

hidden_units = int(options['--hidden-units'])
batch_size = int(options['--batch-size'])
env = UnityEnvironment(file_name=env_name)
env = UnityEnvironment(file_name=env_name, worker_id=worker_id)
print(str(env))
brain_name = env.brain_names[0]

正在加载...
取消
保存