matrx.actions.object_actions.RemoveObject

class RemoveObject(duration_in_ticks=0)

Removes an object from the world.

An action that permanently removes an matrx.objects.env_object.EnvObject from the world, which can be any object except for the agent performing the action.

Parameters
duration_in_ticksint

Optional. Default: 1. Should be zero or larger.

The default duration of this action in ticks during which the matrx.grid_world.GridWorld blocks the agent performing other actions. By default this is 1, meaning that all actions of this type will take both the tick in which it was decided upon and the subsequent tick. When the agent is blocked / busy with an action, only the matrx.agents.agent_brain.AgentBrain.filter_observations() method is called for that agent, and the matrx.agents.agent_brain.AgentBrain.decide_on_action() method is skipped. This means that agents that are busy with an action can only perceive the world but not decide on a new action untill the action has completed.

An agent can overwrite the duration of an action by returning the action_duration in the action_kwargs in the matrx.agents.agent_brain.AgentBrain.decide_on_action() method, as so: return >action_name<, {'action_duration': >ticks<}

Methods

is_possible(self, grid_world, agent_id, …)

Checks if an object can be removed.

mutate(self, grid_world, agent_id, …)

Removes the specified object.

__init__(self, duration_in_ticks=0)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self[, duration_in_ticks])

Initialize self.

is_possible(self, grid_world, agent_id, …)

Checks if an object can be removed.

mutate(self, grid_world, agent_id, …)

Removes the specified object.