torchdrivesim.behavior.iai ========================== .. py:module:: torchdrivesim.behavior.iai Classes ------- .. autoapisummary:: torchdrivesim.behavior.iai.IAINPCController Functions --------- .. autoapisummary:: torchdrivesim.behavior.iai.unpack_attributes torchdrivesim.behavior.iai.agent_attributes_to_basic_agent_properties torchdrivesim.behavior.iai.agent_properties_to_agent_attributes torchdrivesim.behavior.iai.iai_initialize torchdrivesim.behavior.iai.iai_drive Module Contents --------------- .. py:function:: unpack_attributes(attributes) -> torch.Tensor .. py:function:: agent_attributes_to_basic_agent_properties(agent_attributes: torch.Tensor) -> Dict[str, float] .. py:function:: agent_properties_to_agent_attributes(agent_properties: Dict[str, float]) -> torch.Tensor .. py:function:: iai_initialize(location, agent_count, center=(0, 0), traffic_light_state_history: Optional[List[Dict[int, invertedai.common.TrafficLightState]]] = None) -> (torch.Tensor, torch.Tensor, List[invertedai.common.RecurrentState]) .. py:function:: iai_drive(location: str, agent_states: torch.Tensor, agent_attributes: torch.Tensor, recurrent_states: List[invertedai.common.RecurrentState], traffic_lights_states: Optional[Dict[int, invertedai.common.TrafficLightState]] = None) -> (torch.Tensor, List[invertedai.common.RecurrentState]) .. py:class:: IAINPCController(npc_size, npc_state, npc_lr, location, drive_model_version: Optional[str] = None, npc_present_mask: Optional[torch.Tensor] = None, time: int = 0, npc_types: Optional[torch.Tensor] = None, agent_type_names: Optional[List[str]] = None, traffic_light_controller: Optional[torchdrivesim.traffic_lights.TrafficLightController] = None, light_states_all_timesteps: Optional[List[Dict[int, invertedai.common.TrafficLightState]]] = None, spawn_controller: Optional[torchdrivesim.simulator.SpawnController] = None) Bases: :py:obj:`torchdrivesim.simulator.NPCController` Base class for non-playable character controllers. It leaves the state unchanged on each step. .. py:attribute:: location .. py:attribute:: agent_type_names :value: None .. py:attribute:: npc_attribute .. py:attribute:: recurrent_state :value: None .. py:attribute:: drive_model_version :value: None .. py:attribute:: npc_state_shape .. py:attribute:: _traffic_light_controller :value: None .. py:attribute:: light_states_all_timesteps :value: None .. py:attribute:: time :value: 0 .. py:method:: advance_npcs(simulator: torchdrivesim.simulator.Simulator) -> None .. py:method:: copy() Create a deep copy of the controller. .. py:method:: to(device)