MCPcopy Create free account

hub / github.com/PKU-MARL/HARL / functions

Functions1,457 in github.com/PKU-MARL/HARL

↓ 417 callersMethodrepeat
(self, a)
harl/envs/lag/lag_env.py:68
↓ 86 callersFunctioncheck
Check if value is a numpy array, if so, convert it to a torch tensor.
harl/utils/envs_tools.py:9
↓ 57 callersMethodget_property_value
Get the value of the specified property from the JSBSim simulation :param prop: Property :return : float
harl/envs/lag/JSBSim/core/simulatior.py:285
↓ 50 callersMethodsplit
(self, a)
harl/envs/football/football_env.py:159
↓ 32 callersFunction_flatten
Flatten the first two dimensions of a tensor.
harl/utils/trans_tools.py:9
↓ 31 callersMethodload
(self)
harl/envs/lag/JSBSim/envs/env_base.py:53
↓ 27 callersMethodget_position
(north, east, up), unit: m
harl/envs/lag/JSBSim/core/simulatior.py:52
↓ 26 callersMethodapply_randomizations
(self, dr_params)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/hand_base/base_task.py:228
↓ 26 callersMethodget_velocity
(v_north, v_east, v_up), unit: m/s
harl/envs/lag/JSBSim/core/simulatior.py:60
↓ 26 callersMethodset_sim_params_up_axis
(self, sim_params, axis)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/hand_base/base_task.py:120
↓ 26 callersMethodupdate
(self, cloud)
harl/envs/dexhands/DexterousHands/bidexhands/utils/o3dviewer.py:14
↓ 25 callersMethodset_property_value
Set the values of the specified property :param prop: Property :param value: float
harl/envs/lag/JSBSim/core/simulatior.py:300
↓ 23 callersMethodstep
(self, actions)
harl/envs/lag/lag_env.py:25
↓ 22 callersMethodadd_geometry
(self, cloud)
harl/envs/dexhands/DexterousHands/bidexhands/utils/o3dviewer.py:11
↓ 21 callersMethodsend
Args: time(float): second, max precision: 0.001s (recommend 0.01s/frame) state_in(list): [lon, lat, alt, roll, pitch,
harl/envs/lag/JSBSim/core/render_tacview.py:56
↓ 19 callersFunction_t2n
Convert torch.Tensor to numpy.ndarray.
harl/utils/trans_tools.py:4
↓ 19 callersMethodget_property_values
Get the values of the specified properties :param props: list of Properties : return: NamedTupl e with properties name and their val
harl/envs/lag/JSBSim/core/simulatior.py:264
↓ 18 callersMethoddenormalize
Transform normalized data back into original distribution
harl/common/valuenorm.py:78
↓ 13 callersFunctionLLA2NEU
Convert from Geodetic Coordinate System to NEU Coordinate System. Args: lon, lat, alt (float): target geodetic lontitude(°), latitude(°),
harl/envs/lag/JSBSim/utils/utils.py:29
↓ 13 callersFunctionshow_tacview
(display: TacviewClient, sim_time, state, my_id='3000001', name='F16', color='Blue')
harl/envs/lag/JSBSim/core/render_tacview.py:86
↓ 12 callersMethod_pack
Pack seperated key-value dict into grouped np.ndarray
harl/envs/lag/JSBSim/envs/env_base.py:240
↓ 12 callersFunction_sa_cast
This function is used for buffer data operation. Specifically, it transposes a tensor from (episode_length, n_rollout_threads, *dim) to (n_rollout
harl/utils/trans_tools.py:14
↓ 12 callersMethodadd_debug_lines
(self, env, pos, rot)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/shadow_hand_door_close_inward.py:2002
↓ 12 callersMethodadd_debug_lines
(self, env, pos, rot)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/shadow_hand_door_close_outward.py:2001
↓ 12 callersMethodadd_debug_lines
(self, env, pos, rot)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/shadow_hand_door_open_outward.py:1993
↓ 12 callersMethodadd_debug_lines
(self, env, pos, rot)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/shadow_hand_door_open_inward.py:1996
↓ 12 callersMethodget_avail_agent_actions
Returns the available actions for agent_id.
harl/envs/smac/StarCraft2_Env.py:2188
↓ 12 callersFunctionget_shape_from_obs_space
Get shape from observation space. Args: obs_space: (gym.spaces or list) observation space Returns: obs_shape: (tuple) observat
harl/utils/envs_tools.py:15
↓ 12 callersMethodseed
(self, seed)
harl/envs/lag/lag_env.py:47
↓ 11 callersMethoddistance
Distance between two points.
harl/envs/smac/StarCraft2_Env.py:976
↓ 11 callersMethodget_unit_by_id
Get unit by ID.
harl/envs/smac/StarCraft2_Env.py:2418
↓ 10 callersMethodget_actions
Get actions for rollout. Args: obs: (np.ndarray) input observation, shape is (n_threads, n_agents, dim) available_acti
harl/runners/off_policy_base_runner.py:471
↓ 10 callersMethodget_unit_type_id
Returns the ID of unit type in the given scenario.
harl/envs/smac/StarCraft2_Env.py:2157
↓ 10 callersMethodunit_max_shield
Returns maximal shield for a given unit.
harl/envs/smac/StarCraft2_Env.py:1012
↓ 9 callersMethodeval
Evaluate the model.
harl/runners/on_policy_base_runner.py:500
↓ 9 callersFunctionget_AO_TA_R
Get AO & TA angles and relative distance between two agent. Args: ego_feature & enemy_feature (tuple): (north, east, down, vn, ve, vd)
harl/envs/lag/JSBSim/utils/utils.py:57
↓ 9 callersFunctionget_root_dir
()
harl/envs/lag/JSBSim/utils/utils.py:25
↓ 9 callersMethodlog
(self, msg)
harl/envs/lag/JSBSim/termination_conditions/termination_condition_base.py:29
↓ 9 callersMethodturn_off_grad
Turn off grad for actor parameters.
harl/algorithms/actors/off_policy_base.py:61
↓ 8 callersMethodget_values
Get value function predictions. Args: cent_obs: (np.ndarray) centralized input to the critic. rnn_states_critic: (np.n
harl/algorithms/critics/v_critic.py:62
↓ 8 callersMethodlog
(self)
harl/envs/lag/JSBSim/core/simulatior.py:74
↓ 8 callersMethodreset
(self)
harl/envs/lag/lag_env.py:39
↓ 8 callersMethodstep
(self, actions)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/hand_base/vec_task.py:43
↓ 8 callersMethodupdate_equal_engine_props
Update the given property for all engines :param sim: simulation to use :param prop: property to update
harl/envs/lag/JSBSim/core/catalog.py:129
↓ 7 callersMethodget_obs
Returns all agent observations in a list. NOTE: Agents should have access only to their local observations during decentralised execu
harl/envs/lag/JSBSim/envs/env_base.py:153
↓ 7 callersMethodsample
(self)
harl/models/base/distributions.py:10
↓ 6 callersMethod_process
Process reward and inner variables. Args: new_reward (float) agent_id (str) render_items (tuple, optional
harl/envs/lag/JSBSim/reward_functions/reward_function_base.py:48
↓ 6 callersFunction_t2n
(x)
harl/envs/dexhands/dexhands_env.py:15
↓ 6 callersMethodact
Compute actions using the given inputs. Args: obs: (np.ndarray) local agent inputs to the actor. rnn_states_actor: (np
harl/algorithms/actors/on_policy_base.py:98
↓ 6 callersMethodget_action
(self, sim: AircraftSimulator)
harl/envs/lag/JSBSim/tasks/singlecombat_task.py:322
↓ 6 callersFunctionget_init_method
Get the initialization method. Args: initialization_method: (str) initialization method Returns: initialization method: (torch
harl/utils/models_tools.py:53
↓ 6 callersMethodget_obs
Returns all agent observations in a list. NOTE: Agents should have access only to their local observations during decentralised execut
harl/envs/smac/StarCraft2_Env.py:1268
↓ 6 callersMethodlr_decay
Decay the actor and critic learning rates. Args: episode: (int) current training episode. episodes: (int) total number
harl/algorithms/critics/v_critic.py:54
↓ 6 callersMethodrender
Renders the environment. The set of supported modes varies per environment. (And some environments do not support rendering at all.)
harl/envs/lag/JSBSim/envs/env_base.py:182
↓ 6 callersMethodreset
Reset all the environments and return an array of observations, or a dict of observation arrays. If step_async is still doin
harl/envs/env_wrappers.py:73
↓ 6 callersMethodrun
(self, **kwargs)
harl/envs/lag/JSBSim/core/simulatior.py:71
↓ 6 callersMethodstep
(self, actions)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/hand_base/vec_task_rlgames.py:79
↓ 6 callersMethodturn_on_grad
Turn on grad for actor parameters.
harl/algorithms/actors/off_policy_base.py:56
↓ 6 callersMethodunwrap
(self, d)
harl/envs/pettingzoo_mpe/pettingzoo_mpe_env.py:104
↓ 6 callersFunctionupdate_linear_schedule
Decreases the learning rate linearly Args: optimizer: (torch.optim) optimizer epoch: (int) current epoch total_num_epochs:
harl/utils/models_tools.py:77
↓ 5 callersMethod__init__
(self, input_dim, hidden_size)
harl/envs/lag/JSBSim/model/baseline_actor.py:32
↓ 5 callersMethod_get_obs
(self)
harl/envs/mamujoco/multiagent_mujoco/manyagent_ant.py:120
↓ 5 callersMethodclose
(self)
harl/envs/env_wrappers.py:117
↓ 5 callersMethodentropy
(self)
harl/models/base/distributions.py:30
↓ 5 callersMethodevaluate_actions
Get action logprobs, entropy, and distributions for actor update. Args: obs: (np.ndarray / torch.Tensor) local agent inputs to the
harl/algorithms/actors/on_policy_base.py:69
↓ 5 callersMethodfeed_forward_generator_actor
Training data generator for actor that uses MLP network.
harl/common/buffers/on_policy_actor_buffer.py:114
↓ 5 callersFunctionget_active_func
Get the activation function. Args: activation_func: (str) activation function Returns: activation function: (torch.nn) activat
harl/utils/models_tools.py:28
↓ 5 callersMethodget_obs_size
Returns the size of the observation.
harl/envs/smac/StarCraft2_Env.py:1943
↓ 5 callersFunctioninit
Init module. Args: module: (torch.nn) module weight_init: (torch.nn) weight init bias_init: (torch.nn) bias init g
harl/utils/models_tools.py:90
↓ 5 callersMethodnaive_recurrent_generator_actor
Training data generator for actor that uses RNN network. This generator does not split the trajectories into chunks, and therefore ma
harl/common/buffers/on_policy_actor_buffer.py:180
↓ 5 callersMethodrecurrent_generator_actor
Training data generator for actor that uses RNN network. This generator splits the trajectories into chunks of length data_chunk_length,
harl/common/buffers/on_policy_actor_buffer.py:223
↓ 5 callersMethodreload
(self)
harl/envs/lag/JSBSim/core/simulatior.py:64
↓ 5 callersMethodrender
(self, sync_frame_time=False)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/hand_base/base_task.py:166
↓ 5 callersMethodrepeat
(self, a)
harl/envs/smacv2/smacv2_env.py:81
↓ 5 callersMethodrepeat
(self, a)
harl/envs/football/football_env.py:156
↓ 5 callersMethodunit_sight_range
Returns the sight range for an agent.
harl/envs/smac/StarCraft2_Env.py:984
↓ 4 callersFunction_ma_cast
This function is used for buffer data operation. Specifically, it transposes a tensor from (episode_length, n_rollout_threads, num_agents, *dim) t
harl/utils/trans_tools.py:22
↓ 4 callersMethodadd_debug_lines
(self, env, pos, rot)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/shadow_hand_push_block.py:1966
↓ 4 callersMethodadd_debug_lines
(self, env, pos, rot)
harl/envs/dexhands/DexterousHands/bidexhands/tasks/shadow_hand_re_orientation.py:1780
↓ 4 callersMethodadd_temp_simulator
(self, sim: BaseSimulator)
harl/envs/lag/JSBSim/envs/env_base.py:89
↓ 4 callersMethodcan_move
Whether a unit can move in a given direction.
harl/envs/smac/StarCraft2_Env.py:1021
↓ 4 callersMethodcheck_missile_warning
(self)
harl/envs/lag/JSBSim/core/simulatior.py:322
↓ 4 callersMethodcreate
(cls, parent: AircraftSimulator, target: AircraftSimulator, uid: str, missile_model: str = "AIM-9L")
harl/envs/lag/JSBSim/core/simulatior.py:337
↓ 4 callersMethodevaluate_actions
Compute action log probability, distribution entropy, and action distribution. Args: x: (torch.Tensor) input to network.
harl/models/base/act.py:104
↓ 4 callersMethodfull_restart
Full restart. Closes the SC2 process and launches a new one.
harl/envs/smac/StarCraft2_Env.py:518
↓ 4 callersMethodget_action
(self, observation)
harl/envs/lag/JSBSim/test/test_baseline_use_obs.py:55
↓ 4 callersMethodget_actions_with_logprobs
Get actions and logprobs of actions for observations. Args: obs: (np.ndarray) observations of actor, shape is (batch_size, dim)
harl/algorithms/actors/hasac.py:43
↓ 4 callersFunctionget_env_fn
(rank)
harl/utils/envs_tools.py:56
↓ 4 callersFunctionget_grad_norm
Get gradient norm.
harl/utils/models_tools.py:110
↓ 4 callersMethodget_mean_rewards
Get mean rewards of the buffer
harl/common/buffers/off_policy_buffer_base.py:193
↓ 4 callersMethodget_obs_move_feats_size
Returns the size of the vector containing the agents's movement-related features.
harl/envs/smac/StarCraft2_Env.py:1913
↓ 4 callersMethodget_rpy
(roll, pitch, yaw), unit: rad
harl/envs/lag/JSBSim/core/simulatior.py:56
↓ 4 callersMethodget_surrounding_height
Returns height values of the grid surrounding the given unit.
harl/envs/smac/StarCraft2_Env.py:1074
↓ 4 callersMethodget_surrounding_pathing
Returns pathing values of the grid surrounding the given unit.
harl/envs/smac/StarCraft2_Env.py:1066
↓ 4 callersMethodindiv_to_joint
Convert individual actions to joint action. Args: orig_action: (int) joint action. Returns: actions: (list) in
harl/algorithms/critics/discrete_q_critic.py:172
↓ 4 callersMethodlog_probs
(self, actions)
harl/models/base/distributions.py:27
↓ 4 callersMethodnormalize
(self, input_vector)
harl/common/valuenorm.py:66
↓ 4 callersMethodrender
(self, mode="human")
harl/envs/env_wrappers.py:134
↓ 4 callersMethodreset
(self)
harl/envs/lag/JSBSim/tasks/singlecombat_task.py:298
↓ 4 callersMethodsave_replay
Save a replay.
harl/envs/smac/multiagentenv.py:56
next →1–100 of 1,457, ranked by callers