浏览代码

Fix Trajectory test

/develop/coma2/samenet
Ervin Teng 4 年前
当前提交
566efa52
共有 1 个文件被更改,包括 9 次插入6 次删除
  1. 15
      ml-agents/mlagents/trainers/tests/test_trajectory.py

15
ml-agents/mlagents/trainers/tests/test_trajectory.py


def test_trajectory_to_agentbuffer():
length = 15
# These keys should be of type np.ndarray
wanted_keys = [
(ObservationKeyPrefix.OBSERVATION, 0),
(ObservationKeyPrefix.OBSERVATION, 1),

BufferKey.ACTION_MASK,
BufferKey.PREV_ACTION,
BufferKey.ENVIRONMENT_REWARDS,
BufferKey.GROUP_REWARD,
# These keys should be of type List
"group_obs_0",
"group_obs_1",
"group_obs_next_0",
"group_obs_next_1",
"groupmate_rewards",
"group_dones",
BufferKey.GROUPMATE_REWARDS,
BufferKey.GROUP_CONTINUOUS_ACTION,
BufferKey.GROUP_DISCRETE_ACTION,
BufferKey.GROUP_DONES,
BufferKey.GROUP_NEXT_CONT_ACTION,
BufferKey.GROUP_NEXT_DISC_ACTION,
]
wanted_keys = set(wanted_keys + wanted_group_keys)
trajectory = make_fake_trajectory(

正在加载...
取消
保存