浏览代码

remove actionspec logic simple test env

/develop/actionmodel-csharp
Andrew Cohen 4 年前
当前提交
89bb11d3
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 8
      ml-agents/mlagents/trainers/tests/simple_test_envs.py

8
ml-agents/mlagents/trainers/tests/simple_test_envs.py


self.vec_obs_size = vec_obs_size
continuous_action_size, discrete_action_size = action_sizes
discrete_tuple = tuple(2 for _ in range(discrete_action_size))
if continuous_action_size > 0:
if discrete_action_size > 0:
action_spec = ActionSpec(continuous_action_size, discrete_tuple)
else:
action_spec = ActionSpec.create_continuous(continuous_action_size)
else:
action_spec = ActionSpec.create_discrete(discrete_tuple)
action_spec = ActionSpec(continuous_action_size, discrete_tuple)
self.total_action_size = (
continuous_action_size + discrete_action_size
) # to set the goals/positions

正在加载...
取消
保存