nmmo.task.game_state module#

class nmmo.task.game_state.ArrayView(mapping, name: str, gs: GameState, subject: Group, arr: ndarray)#

Bases: ABC

abstract get_attribute(attr) ndarray#
class nmmo.task.game_state.EntityView(gs: GameState, subject: Group, arr: ndarray)#

Bases: ArrayView

get_attribute(attr) ndarray#
class nmmo.task.game_state.EventCodeView(name: str, gs: GameState, subject: Group, arr: ndarray)#

Bases: ArrayView

get_attribute(attr) ndarray#
class nmmo.task.game_state.EventView(gs: GameState, subject: Group, arr: ndarray)#

Bases: ArrayView

get_attribute(attr) ndarray#
class nmmo.task.game_state.GameState(current_tick: 'int', config: 'Config', spawn_pos: 'Dict[int, Tuple[int, int]]', alive_agents: 'List[int]', env_obs: 'Dict[int, Observation]', entity_data: 'np.ndarray', item_data: 'np.ndarray', event_data: 'np.ndarray', cache_result: 'MutableMapping')#

Bases: object

alive_agents: List[int]#
cache_result: MutableMapping#
config: Config#
current_tick: int#
entity_data: ndarray#
entity_or_none(ent_id)#
env_obs: Dict[int, Observation]#
event_data: ndarray#
get_subject_view(subject: Group)#
item_data: ndarray#
spawn_pos: Dict[int, Tuple[int, int]]#
where_in_id(data_type, subject: List[int])#
class nmmo.task.game_state.GameStateGenerator(realm: Realm, config: Config)#

Bases: object

generate(realm: Realm, env_obs: Dict[int, Observation]) GameState#
class nmmo.task.game_state.GroupObsView(gs: GameState, subject: Group)#

Bases: object

class nmmo.task.game_state.GroupView(gs: GameState, subject: Group)#

Bases: object

class nmmo.task.game_state.ItemView(gs: GameState, subject: Group, arr: ndarray)#

Bases: ArrayView

get_attribute(attr) ndarray#
class nmmo.task.game_state.TileView(gs: GameState, subject: Group, arr: ndarray)#

Bases: ArrayView

get_attribute(attr) ndarray#