浏览代码

bug fix : The environment only requests actions from external brains when unique

/develop-generalizationTraining-TrainerController
vincentpierre 7 年前
当前提交
7118a209
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      python/unityagents/environment.py

6
python/unityagents/environment.py


"You have {0} brains, you need to feed a dictionary of brain names a keys, "
"and actions as values".format(self._num_brains))
else:
action = {self._brain_names[0]: action}
action = {self._external_brain_names[0]: action}
if isinstance(memory, (int, np.int_, float, np.float_, list, np.ndarray)):
if self._num_external_brains > 1:
raise UnityActionException(

memory = {self._brain_names[0]: memory}
memory = {self._external_brain_names[0]: memory}
if isinstance(value, (int, np.int_, float, np.float_, list, np.ndarray)):
if self._num_external_brains > 1:
raise UnityActionException(

value = {self._brain_names[0]: value}
value = {self._external_brain_names[0]: value}
for b in self._external_brain_names:
n_agent = len(self._data[b].agents)

正在加载...
取消
保存