浏览代码

Merge pull request #1491 from Unity-Technologies/fix-demo-buffer

Move done and reward to buffer from demonstration
/develop-generalizationTraining-TrainerController
GitHub 6 年前
当前提交
facf2c5c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
      ml-agents/mlagents/trainers/demo_loader.py

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


current_brain_info = brain_infos[idx]
next_brain_info = brain_infos[idx + 1]
demo_buffer[0].last_brain_info = current_brain_info
demo_buffer[0]['done'].append(next_brain_info.local_done[0])
demo_buffer[0]['rewards'].append(next_brain_info.rewards[0])
for i in range(brain_params.number_visual_observations):
demo_buffer[0]['visual_obs%d' % i] \
.append(current_brain_info.visual_observations[i][0])

正在加载...
取消
保存