matrx.agents.agent_types.patrolling_agent.PatrollingAgentBrain

class PatrollingAgentBrain(waypoints, move_speed=0)

A simple agent that moves along a given path.

Attributes
memorize_for_ticks
state

Methods

create_context_menu_for_other(self, …)

Generate options for a context menu for a specific object/location that a user NOT controlling this human agent opened.

decide_on_action(self, state)

Makes use of the navigator to decide upon the next move action to get one step closer to the next waypoint.

filter_observations(self, state)

Instead of filtering any observations, it just returns the given state.

get_log_data(self)

Provides a dictionary of data for any Logger

initialize(self)

Resets the agent’s to be visited waypoints.

is_action_possible(self, action, action_kwargs)

Checks if an action would be possible.

send_message(self, message)

Sends a Message from this agent to others

Creates an agent brain to move along a set of waypoints.

Parameters
waypointslist

The list of waypoints as (x,y) grid coordinates for the agent to move along.

move_speedint (Default: 0)

This many ticks will be between each of the agent’s move actions. When 0 or smaller, it will act on every tick. When 1 or higher, it will wait at least 1 or more ticks before moving again.

Attributes
memorize_for_ticks
state

Methods

create_context_menu_for_other(self, …)

Generate options for a context menu for a specific object/location that a user NOT controlling this human agent opened.

decide_on_action(self, state)

Makes use of the navigator to decide upon the next move action to get one step closer to the next waypoint.

filter_observations(self, state)

Instead of filtering any observations, it just returns the given state.

get_log_data(self)

Provides a dictionary of data for any Logger

initialize(self)

Resets the agent’s to be visited waypoints.

is_action_possible(self, action, action_kwargs)

Checks if an action would be possible.

send_message(self, message)

Sends a Message from this agent to others

__init__(self, waypoints, move_speed=0)

Creates an agent brain to move along a set of waypoints.

Parameters
waypointslist

The list of waypoints as (x,y) grid coordinates for the agent to move along.

move_speedint (Default: 0)

This many ticks will be between each of the agent’s move actions. When 0 or smaller, it will act on every tick. When 1 or higher, it will wait at least 1 or more ticks before moving again.

Methods

__init__(self, waypoints[, move_speed])

Creates an agent brain to move along a set of waypoints.

create_context_menu_for_other(self, …)

Generate options for a context menu for a specific object/location that a user NOT controlling this human agent opened.

decide_on_action(self, state)

Makes use of the navigator to decide upon the next move action to get one step closer to the next waypoint.

filter_observations(self, state)

Instead of filtering any observations, it just returns the given state.

get_log_data(self)

Provides a dictionary of data for any Logger

initialize(self)

Resets the agent’s to be visited waypoints.

is_action_possible(self, action, action_kwargs)

Checks if an action would be possible.

send_message(self, message)

Sends a Message from this agent to others

Attributes

memorize_for_ticks

state