mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
Unity3D API Fixes (recent changes in Unity's MLAgents API caused errors on RLlib side). (#10285)
This commit is contained in:
Vendored
+2
-2
@@ -119,7 +119,7 @@ class Unity3DEnv(MultiAgentEnv):
|
||||
|
||||
# Set only the required actions (from the DecisionSteps) in Unity3D.
|
||||
all_agents = []
|
||||
for behavior_name in self.unity_env.get_behavior_names():
|
||||
for behavior_name in self.unity_env.behavior_specs:
|
||||
for agent_id in self.unity_env.get_steps(behavior_name)[
|
||||
0].agent_id_to_index.keys():
|
||||
key = behavior_name + "_{}".format(agent_id)
|
||||
@@ -166,7 +166,7 @@ class Unity3DEnv(MultiAgentEnv):
|
||||
obs = {}
|
||||
rewards = {}
|
||||
infos = {}
|
||||
for behavior_name in self.unity_env.get_behavior_names():
|
||||
for behavior_name in self.unity_env.behavior_specs:
|
||||
decision_steps, terminal_steps = self.unity_env.get_steps(
|
||||
behavior_name)
|
||||
# Important: Only update those sub-envs that are currently
|
||||
|
||||
Reference in New Issue
Block a user