Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Farama-Foundation/MAgent2
/ functions
Functions
307 in github.com/Farama-Foundation/MAgent2
⨍
Functions
307
◇
Types & classes
49
Method
add_reward
src/gridworld/GridWorld.h:284
Method
add_square
(pos, side, gap)
magent2/environments/gather/gather.py:268
Function
as_bool_c_array
numpy to ctypes array
magent2/c_lib.py:39
Method
average_pooling_group
src/gridworld/Map.cc:117
Method
build_extensions
(self)
setup.py:39
Method
calc_event_node
src/gridworld/RewardEngine.cc:216
Method
calc_index
src/utility/utility.h:46
Method
calc_reward
src/gridworld/GridWorld.cc:681
Method
calc_rule
src/gridworld/RewardEngine.cc:373
Function
check_model
check whether a model is downloaded
magent2/utility.py:52
Method
clear_area
clear a rectangle
src/gridworld/Map.cc:504
Method
close
(self)
magent2/environments/magent_env.py:155
Method
collect_agent_symbol
(node, config)
magent2/gridworld.py:812
Method
collect_event_node
(node, config)
magent2/gridworld.py:834
Method
collect_related_symbol
src/gridworld/RewardEngine.cc:71
Method
draw
(base_x, base_y, data)
magent2/environments/gather/gather.py:307
Function
draw_line_matrix
(matrix, color, a, b, resolution)
magent2/render.py:69
Function
env_config_game
src/runtime_api.cc:31
Function
env_delete_game
src/runtime_api.cc:25
Function
env_fn
(**kwargs)
magent2/environments/magent_env.py:11
Function
env_get_info
info getter
src/runtime_api.cc:69
Function
env_get_reward
src/runtime_api.cc:62
Function
env_name_format
(str)
docs/scripts/utils.py:31
Function
env_render_next_file
src/runtime_api.cc:82
Function
env_set_action
src/runtime_api.cc:50
Function
env_step
src/runtime_api.cc:56
Method
fill_area
fill a rectangle (x, y) - (x + width, y + height) with specific occupier
src/gridworld/Map.cc:473
Method
form_txt
(index)
magent2/render.py:132
Function
gather_infer_action
src/temp_c_booster.cc:124
Method
generate_map
(self)
magent2/environments/adversarial_pursuit/adversarial_pursuit.py:249
Method
generate_map
(self)
magent2/environments/tiger_deer/tiger_deer.py:250
Method
generate_map
(self)
magent2/environments/battlefield/battlefield.py:228
Method
generate_map
(self)
magent2/environments/combined_arms/combined_arms.py:413
Method
generate_map
(self)
magent2/environments/battle/battle.py:277
Method
get_action_space
(self, handle)
magent2/environment.py:36
Method
get_align
src/gridworld/Map.cc:408
Method
get_center
src/gridworld/GridWorld.h:293
Method
get_collide
get original occupier in the rectangle who results in a collide with a move intention
src/gridworld/Map.cc:486
Function
get_config
(map_size)
magent2/builtin/config/battle.py:6
Function
get_config
(map_size)
magent2/builtin/config/double_attack.py:8
Function
get_config
(map_size)
magent2/builtin/config/pursuit.py:4
Function
get_config
(map_size)
magent2/builtin/config/forest.py:6
Method
get_feature_size
src/gridworld/GridWorld.cc:926
Method
get_feature_space
(self, handle)
magent2/environment.py:42
Method
get_global_minimap
Compress global map into a minimap of given size. Args: height (int): Height of minimap. width (int): Width of minima
magent2/gridworld.py:695
Method
get_goal
src/gridworld/GridWorld.h:221
Method
get_num
(self, handle)
magent2/environment.py:33
Method
get_observation
(self, handle)
magent2/environment.py:14
Method
get_reward
(self, handle)
magent2/environment.py:29
Method
get_reward
src/gridworld/GridWorld.h:175
Method
get_reward
src/gridworld/GridWorld.h:283
Method
get_view2attack
Get a matrix with the same size of view_range. If element >= 0, then it is an attackable point, and the corresponding action number is
magent2/gridworld.py:671
Method
get_view_space
(self, handle)
magent2/environment.py:39
Function
gridworld_add_reward_rule
src/runtime_api.cc:139
Function
gridworld_clear_dead
run step
src/runtime_api.cc:114
Function
gridworld_define_agent_symbol
reward description
src/runtime_api.cc:127
Function
gridworld_define_event_node
src/runtime_api.cc:133
Function
gridworld_set_goal
src/runtime_api.cc:120
Method
group2channel
src/gridworld/GridWorld.cc:915
Method
in_board
* Utility */
src/gridworld/Map.h:81
Method
init_reward
src/gridworld/GridWorld.h:282
Method
init_reward_description
src/gridworld/RewardEngine.cc:105
Method
int2pos
src/gridworld/Map.h:94
Method
is_blank_area
check if rectangle (x,y) - (x + width, y + height) is a blank area the rectangle can only contains blank slots and itself
src/gridworld/Map.cc:454
Function
main
src/gridworld/test.cc:154
Method
make_channel_trans
private utility
src/gridworld/GridWorld.cc:897
Method
new_group
Registers a new group of agents into environment. Args: name (str): Name of the group. Returns: handle (ctyp
magent2/gridworld.py:387
Method
observation_space
(self, agent)
magent2/environments/magent_env.py:101
Method
pos2int
src/gridworld/Map.h:85
Function
raw_env
( map_size=default_map_size, max_cycles=max_cycles_default, minimap_mode=minimap_mode_default,
magent2/environments/adversarial_pursuit/adversarial_pursuit.py:138
Function
raw_env
( map_size=default_map_size, max_cycles=max_cycles_default, minimap_mode=minimap_mode_default,
magent2/environments/tiger_deer/tiger_deer.py:124
Function
raw_env
( map_size=default_map_size, max_cycles=max_cycles_default, minimap_mode=minimap_mode_default,
magent2/environments/battlefield/battlefield.py:159
Function
raw_env
( map_size=default_map_size, max_cycles=max_cycles_default, minimap_mode=minimap_mode_default,
magent2/environments/combined_arms/combined_arms.py:160
Function
raw_env
( map_size=default_map_size, max_cycles=max_cycles_default, minimap_mode=minimap_mode_default,
magent2/environments/battle/battle.py:157
Function
rec_round
round x recursively Parameters ---------- x: float, int, list, list of list, ... variable to round, support many types ndigit
magent2/utility.py:7
Method
refresh_center
src/gridworld/GridWorld.h:294
Method
render
(self)
magent2/environment.py:23
Method
render
Renders a step.
magent2/gridworld.py:735
Method
render
(self, mode)
magent2/render.py:159
Method
render
* render */
src/gridworld/GridWorld.cc:939
Method
render_next_file
(self)
magent2/environment.py:26
Method
reset
(self)
magent2/environment.py:10
Method
reset
Resets the environment to an initial internal state.
magent2/gridworld.py:363
Method
reset
src/gridworld/GridWorld.h:31
Method
reset
src/gridworld/GridWorld.cc:72
Function
runaway_infer_action
src/temp_c_booster.cc:23
Function
rush_prey_infer_action
src/temp_c_booster.cc:48
Method
set_action
(self, handle, actions)
magent2/environment.py:17
Method
set_action
src/gridworld/GridWorld.h:182
Method
set_center
src/gridworld/GridWorld.h:292
Method
set_channel_id
src/gridworld/Map.h:99
Method
set_goal
src/gridworld/GridWorld.h:225
Method
set_render_dir
Sets the directory to save render file. Args: name (str): Name of render directory.
magent2/gridworld.py:726
Method
state
Returns an observation of the global environment.
magent2/environments/magent_env.py:220
Method
step
(self)
magent2/environment.py:20
Method
step
Runs one timestep of the environment using the agents' actions. Returns: done (bool): Flag indicating whether the game is done or
magent2/gridworld.py:531
Method
step
(self, all_actions)
magent2/environments/magent_env.py:257
Function
test_extract_view
src/gridworld/test.cc:64
Function
test_import_environments
()
tests/test_magent2.py:11
Function
test_sector_range
src/gridworld/test.cc:14
← previous
next →
201–300 of 307, ranked by callers