MCPcopy Create free account

hub / github.com/Farama-Foundation/MAgent2 / functions

Functions307 in github.com/Farama-Foundation/MAgent2

↓ 38 callersMethodget_pos
Returns the positions of all agents in a group. Args: handle (ctypes.c_int32): Group handle. Returns: pos (n
magent2/gridworld.py:651
↓ 35 callersFunctionstrequ
src/utility/utility.cc:12
↓ 32 callersMethodCircleRange
src/gridworld/Range.h:151
↓ 27 callersMethodset
Set parameters of global configuration. :param dict args: Contains the following configuration attributes: * **map_width
magent2/gridworld.py:130
↓ 26 callersMethodadd_reward_rule
Add a reward rule. Args: on (Event): An objecting representing a bool expression of the trigger event. receiver (List
magent2/gridworld.py:188
↓ 21 callersFunctionprint_json
src/gridworld/RenderGenerator.cc:43
↓ 20 callersMethodadd_group
Add a group to the configuration. Args: agent_type (str): Name of agent type contained in this group. Returns:
magent2/gridworld.py:176
↓ 16 callersMethodadd_agents
Adds agents to environment. Args: handle (ctypes.c_int32): The handle of the group to which to add the agents. method
magent2/gridworld.py:403
↓ 16 callersMethodregister_agent_type
Register an agent type. :param str name: Name of the type (should be unique). :param dict attr: Contains the following confi
magent2/gridworld.py:148
↓ 12 callersMethodget_handles
Returns all group handles in the environment. Returns: handles (List[ctypes.c_int32]): All group handles in the environment.
magent2/gridworld.py:562
↓ 10 callersMethodget_group
src/gridworld/GridWorld.h:211
↓ 9 callersMethodget_dir
src/gridworld/GridWorld.h:150
↓ 9 callersMethodis_all
src/gridworld/RewardEngine.h:23
↓ 9 callersMethodis_dead
src/gridworld/GridWorld.h:189
↓ 8 callersMethodget_num
Returns the number of agents in a group. Args: handle (ctypes.c_int32): Group handle. Returns: num (int): Nu
magent2/gridworld.py:570
↓ 7 callersFunctionas_int32_c_array
numpy to ctypes array
magent2/c_lib.py:34
↓ 6 callersMethodGridWorld
src/gridworld/GridWorld.cc:17
↓ 6 callersMethodget_op_obj
src/gridworld/GridWorld.h:218
↓ 6 callersMethodis_absorbed
src/gridworld/GridWorld.h:191
↓ 6 callersFunctionmake_env
(raw_env)
magent2/environments/magent_env.py:10
↓ 6 callersFunctionrgba_string
src/gridworld/RenderGenerator.cc:51
↓ 5 callersFunctionrela_to_abs
src/gridworld/Map.cc:515
↓ 4 callersMethodadd_agent
src/gridworld/Map.cc:65
↓ 4 callersMethodadd_reward
src/gridworld/GridWorld.h:177
↓ 4 callersMethodclear
src/gridworld/GridWorld.h:277
↓ 4 callersMethodget_height
src/gridworld/Range.h:49
↓ 4 callersMethodget_id
src/gridworld/GridWorld.h:156
↓ 4 callersMethodget_width
src/gridworld/Range.h:48
↓ 4 callersMethodset_dir
src/gridworld/GridWorld.h:151
↓ 4 callersMethodset_last_op
src/gridworld/GridWorld.h:216
↓ 4 callersMethodset_op_obj
src/gridworld/GridWorld.h:219
↓ 3 callersFunctionadd_or_error
src/gridworld/GridWorld.cc:171
↓ 3 callersMethodadd_wall
src/gridworld/Map.cc:108
↓ 3 callersMethodadd_walls
Adds walls to the environment. Args: method (str): Can be 'random' or 'custom'. If method is 'random', then kwargs["n"] is an int
magent2/gridworld.py:367
↓ 3 callersFunctionas_float_c_array
numpy to ctypes array
magent2/c_lib.py:29
↓ 3 callersMethodbind_with_check
src/gridworld/RewardEngine.cc:14
↓ 3 callersMethodget_agent_id
Returns the ids of all agents in the group. Args: handle (ctypes.c_int32): Group handle. Returns: ids (np.nd
magent2/gridworld.py:616
↓ 3 callersMethodget_count
src/gridworld/Range.h:61
↓ 3 callersMethodget_hp
src/gridworld/GridWorld.h:186
↓ 3 callersMethodget_random_blank
src/gridworld/Map.cc:49
↓ 3 callersMethodget_size
src/gridworld/GridWorld.h:268
↓ 3 callersFunctionget_size_for_dir
src/gridworld/Map.cc:597
↓ 3 callersFunctiongridworld_add_agents
src/runtime_api.cc:106
↓ 3 callersMethodnum2delta
src/gridworld/Range.h:62
↓ 3 callersFunctionsave_to_real
src/gridworld/Map.cc:553
↓ 3 callersMethodseed
(self, seed=None)
magent2/environments/magent_env.py:107
↓ 3 callersMethodset_pos
src/gridworld/GridWorld.h:148
↓ 2 callersMethod_compute_observations
(self)
magent2/environments/magent_env.py:170
↓ 2 callersMethod_get_groups_info
private method, for interactive application
magent2/gridworld.py:739
↓ 2 callersMethod_get_obs_buf
get buffer to receive observation from c++ engine
magent2/gridworld.py:469
↓ 2 callersMethod_get_walls_info
private method, for interactive application
magent2/gridworld.py:751
↓ 2 callersMethodadd_hp
src/gridworld/GridWorld.h:185
↓ 2 callersFunctiondo_commond
(cmd)
magent2/utility.py:44
↓ 2 callersFunctiondraw_rect
(surface, color, a, w, h)
magent2/render.py:34
↓ 2 callersMethodgenerate_map
(self)
magent2/environments/gather/gather.py:262
↓ 2 callersFunctionget_action
src/temp_c_booster.cc:94
↓ 2 callersMethodget_action
src/gridworld/GridWorld.h:183
↓ 2 callersMethodget_alive
Returns the alive status of all agents in a group. Args: handle (ctypes.c_int32): Group handle. Returns: ali
magent2/gridworld.py:632
↓ 2 callersFunctionget_config
( map_size, minimap_mode, seed, step_reward, dead_penalty, attack_penalty, attack_
magent2/environments/battle/battle.py:175
↓ 2 callersMethodget_feature_space
Returns the feature space for a group. Args: handle (ctypes.c_int32): Group handle. Returns: feature_space (
magent2/gridworld.py:605
↓ 2 callersMethodget_last_op
src/gridworld/GridWorld.h:215
↓ 2 callersMethodget_observation
Returns the observation for each agent in a group. Args: handle (ctypes.c_int32): Group handle. Returns: obs
magent2/gridworld.py:487
↓ 2 callersMethodget_range_rela_offset
src/gridworld/Range.h:51
↓ 2 callersMethodget_view_space
Returns the view space for a group. Args: handle (ctypes.c_int32): Group handle. Returns: view_space (Tuple[
magent2/gridworld.py:594
↓ 2 callersMethodget_wall
src/gridworld/Map.cc:609
↓ 2 callersFunctiongridworld_new_group
src/runtime_api.cc:100
↓ 2 callersFunctiongridworld_register_agent_type
* GridWorld special */ agent
src/runtime_api.cc:93
↓ 2 callersMethodinit_reward
src/gridworld/GridWorld.h:168
↓ 2 callersMethodprint_self
src/gridworld/Range.h:68
↓ 2 callersMethodset_dead_ct
src/gridworld/GridWorld.h:273
↓ 2 callersMethodset_involved
src/gridworld/GridWorld.h:179
↓ 2 callersMethodset_recursive_base
src/gridworld/GridWorld.h:290
↓ 1 callersMethod__init__
(self)
magent2/gridworld.py:124
↓ 1 callersMethod_calc_obs_shapes
(self)
magent2/environments/magent_env.py:112
↓ 1 callersMethod_calc_state_shape
(self)
magent2/environments/magent_env.py:127
↓ 1 callersMethod_compute_rewards
(self)
magent2/environments/magent_env.py:194
↓ 1 callersMethod_compute_terminates
(self, step_done)
magent2/environments/magent_env.py:206
↓ 1 callersMethod_get_render_info
private method, for interactive application
magent2/gridworld.py:764
↓ 1 callersMethod_init_obs_buf
init observation buffer
magent2/gridworld.py:481
↓ 1 callersFunction_load_lib
Load library in local.
magent2/c_lib.py:10
↓ 1 callersMethod_serialize_event_exp
serialize event expression and sent them to game engine
magent2/gridworld.py:804
↓ 1 callersFunctionabs_to_rela
src/gridworld/Map.cc:534
↓ 1 callersMethodadd_agents
src/gridworld/GridWorld.cc:180
↓ 1 callersMethodadd_reward_rule
src/gridworld/RewardEngine.cc:51
↓ 1 callersMethodbe_attack
src/gridworld/GridWorld.h:203
↓ 1 callersMethodclear_dead
Clears dead agents in the engine. Must be called after step().
magent2/gridworld.py:557
↓ 1 callersMethodclear_dead
src/gridworld/GridWorld.cc:633
↓ 1 callersMethodclose
(self)
magent2/render.py:153
↓ 1 callersMethoddefine_agent_symbol
* some interface for python bind */
src/gridworld/RewardEngine.cc:28
↓ 1 callersMethoddefine_event_node
src/gridworld/RewardEngine.cc:37
↓ 1 callersMethoddo_attack
do attack for agent, return kill_reward and dead_group
src/gridworld/Map.cc:255
↓ 1 callersMethoddo_move
do move for agent, dx = delta[0], dy = delta[1]
src/gridworld/Map.cc:313
↓ 1 callersMethoddo_turn
to turn, wise = 1 for clockwise, wise = -1 for counter-clockwise
src/gridworld/Map.cc:361
↓ 1 callersFunctiondownload_file
download url to filename
magent2/utility.py:22
↓ 1 callersFunctiondownload_model
download model from url
magent2/utility.py:38
↓ 1 callersFunctiondraw_line
(surface, color, a, b)
magent2/render.py:23
↓ 1 callersFunctiondraw_rect_matrix
(matrix, color, a, w, h, resolution)
magent2/render.py:54
↓ 1 callersFunctionenv_get_observation
src/runtime_api.cc:44
↓ 1 callersFunctionenv_new_game
* General Environment */
src/runtime_api.cc:14
↓ 1 callersFunctionenv_render
render
src/runtime_api.cc:76
next →1–100 of 307, ranked by callers