matrx.messages.message_manager.MessageManager

class MessageManager

A manager inside the GirdWorld that tracks the received and send messages between agents and their teams.

This provides several advantages: - an easier connection between MATRX Core, MATRX API, and the Front-end for messages (e.g. to differentiate between messages send between agents and to teams in the Front-end through a simple api call: ‘get_team_messages’). - an easy way to log communication (as the messages are easily obtained from a GridWorld instance, through some methods).

Methods

copy_message(self, mssg, from_id, to_id)

Copy a message while keeping the potentially custom message type and custom message properties.

fetch_chatroom_ID(self, chatroom_type[, …])

Fetch the ID of a chatroom using various bits of info

fetch_chatrooms(self[, agent_id])

Fetch all the chatrooms, or only those of which a specific agent is part.

fetch_messages(self[, agent_id, …])

Fetch messages, optionally filtered by start tick and/or agent id.

preprocess_messages(self, tick, messages, …)

Preprocess messages for sending, such that they can be understood by the GridWorld.

__init__(self)

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

Methods

__init__(self)

Initialize self.

copy_message(self, mssg, from_id, to_id)

Copy a message while keeping the potentially custom message type and custom message properties.

fetch_chatroom_ID(self, chatroom_type[, …])

Fetch the ID of a chatroom using various bits of info

fetch_chatrooms(self[, agent_id])

Fetch all the chatrooms, or only those of which a specific agent is part.

fetch_messages(self[, agent_id, …])

Fetch messages, optionally filtered by start tick and/or agent id.

preprocess_messages(self, tick, messages, …)

Preprocess messages for sending, such that they can be understood by the GridWorld.