浏览代码

fix subprocess_env_manager check of action info length

/develop/actionmodel-csharp
Andrew Cohen 4 年前
当前提交
704be28b
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 5
      ml-agents/mlagents/trainers/subprocess_env_manager.py

5
ml-agents/mlagents/trainers/subprocess_env_manager.py


if req.cmd == EnvironmentCommand.STEP:
all_action_info = req.payload
for brain_name, action_info in all_action_info.items():
if (
len(action_info.action.continuous) > 0
or len(action_info.action.discrete) > 0
):
if len(action_info.agent_ids) > 0:
env.set_actions(brain_name, action_info.action)
env.step()
all_step_result = _generate_all_results()

正在加载...
取消
保存