Parcourir la source

comment get_frame

Rodrigo Perez-Vicente il y a 2 ans
Parent
commit
7a9f2fd595
1 fichiers modifiés avec 14 ajouts et 1 suppressions
  1. 14 1
      gym_minigrid/minigrid.py

+ 14 - 1
gym_minigrid/minigrid.py

@@ -1510,7 +1510,20 @@ class MiniGridEnv(gym.Env):
         tile_size: int = TILE_PIXELS,
         agent_pov: bool = False,
     ):
-        "Returns an image corresponding to the whole environment or the agent's pov"
+        """Returns an RGB image corresponding to the whole environment or the agent's point of view.
+
+        Args:
+
+            highlight (bool): If true, the agent's field of view or point of view is higlighted with a lighter gray color.
+            tile_size (int): How many pixels will form a tile from the NxM grid. 
+            agent_pov (bool): If true, the rendered frame will only contain the point of view of the agent.
+
+        Returns:
+
+            frame (np.ndarray): A frame of type numpy.ndarray with shape (x, y, 3) representing RGB values for the x-by-y pixel image.
+
+        """
+        
         if agent_pov:
             return self.get_pov_render(tile_size)
         else: