浏览代码

[bug-fix] Use correct agent_ids for demo loader (#3464)

/release-0.14.1
Anupam Bhatnagar 5 年前
当前提交
991bfefd
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 1
      com.unity.ml-agents/CHANGELOG.md
  2. 7
      ml-agents/mlagents/trainers/demo_loader.py

1
com.unity.ml-agents/CHANGELOG.md


### Bugfixes
- Fixed an issue which caused self-play training sessions to consume a lot of memory. (#3451)
- Fixed an IndexError when using GAIL or behavioral cloning with demonstrations recorded with 0.14.0 or later (#3464)
## [0.14.0-preview] - 2020-02-13

7
ml-agents/mlagents/trainers/demo_loader.py


previous_action = np.array(
pair_infos[idx - 1].action_info.vector_actions, dtype=np.float32
)
agent_id = current_step_info.agent_id[0]
current_agent_step_info = current_step_info.get_agent_step_result(agent_id)
next_agent_step_info = next_step_info.get_agent_step_result(agent_id)
curr_agent_id = current_step_info.agent_id[0]
current_agent_step_info = current_step_info.get_agent_step_result(curr_agent_id)
next_agent_id = next_step_info.agent_id[0]
next_agent_step_info = next_step_info.get_agent_step_result(next_agent_id)
demo_raw_buffer["done"].append(next_agent_step_info.done)
demo_raw_buffer["rewards"].append(next_agent_step_info.reward)

正在加载...
取消
保存