You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Performs a vectorized step on all sub environments using `actions`.
327
+
323
328
Args:
324
-
actions: Is a list on len 'self.n_agents' of which each element is a torch.Tensor of shape
325
-
'(self.num_envs, action_size_of_agent)'.
329
+
actions: Is a list on len 'self.n_agents' of which each element is a torch.Tensor of shape '(self.num_envs, action_size_of_agent)'.
330
+
326
331
Returns:
327
-
obs: List on len 'self.n_agents' of which each element is a torch.Tensor
328
-
of shape '(self.num_envs, obs_size_of_agent)'
332
+
obs: List on len 'self.n_agents' of which each element is a torch.Tensor of shape '(self.num_envs, obs_size_of_agent)'
329
333
rewards: List on len 'self.n_agents' of which each element is a torch.Tensor of shape '(self.num_envs)'
330
334
dones: Tensor of len 'self.num_envs' of which each element is a bool
331
-
infos : List on len 'self.n_agents' of which each element is a dictionary for which each key is a metric
332
-
and the value is a tensor of shape '(self.num_envs, metric_size_per_agent)'
335
+
infos: List on len 'self.n_agents' of which each element is a dictionary for which each key is a metric and the value is a tensor of shape '(self.num_envs, metric_size_per_agent)'
"""Returns random actions for all agents that you can feed to :class:`step`
585
+
"""Returns random actions for all agents that you can feed to :meth:`step`
582
586
583
587
Returns:
584
588
Sequence[torch.tensor]: the random actions for the agents
@@ -767,15 +771,15 @@ def render(
767
771
Render function for environment using pyglet
768
772
769
773
On servers use mode="rgb_array" and set
774
+
770
775
```
771
776
export DISPLAY=':99.0'
772
777
Xvfb :99 -screen 0 1400x900x24 > /dev/null 2>&1 &
773
778
```
774
779
775
780
:param mode: One of human or rgb_array
776
781
:param env_index: Index of the environment to render
777
-
:param agent_index_focus: If specified the camera will stay on the agent with this index.
778
-
If None, the camera will stay in the center and zoom out to contain all agents
782
+
:param agent_index_focus: If specified the camera will stay on the agent with this index. If None, the camera will stay in the center and zoom out to contain all agents
779
783
:param visualize_when_rgb: Also run human visualization when mode=="rgb_array"
780
784
:param plot_position_function: A function to plot under the rendering.
781
785
The function takes a numpy array with shape (n_points, 2), which represents a set of x,y values to evaluate f over and plot it
@@ -789,6 +793,7 @@ def render(
789
793
:param plot_position_function_cmap_range: The range of the cmap in case plot_position_function outputs a single value
790
794
:param plot_position_function_cmap_alpha: The alpha of the cmap in case plot_position_function outputs a single value
0 commit comments