matrx.actions.door_actions.OpenDoorAction

class OpenDoorAction(duration_in_ticks=0)

Action that opens doors.

The action that opens a specific door within a given range from the agent.

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, …)

Check if the OpenDoorAction is possible.

mutate(self, grid_world, agent_id, \*\*kwargs)

Opens a door in the world.

__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, …)

Check if the OpenDoorAction is possible.

mutate(self, grid_world, agent_id, \*\*kwargs)

Opens a door in the world.