Context

class phantom.Context(agent, agent_views, env_view)[source]

Representation of the local neighbourhood around a focal agent node.

This class is designed to provide context about an agent’s local neighbourhood. In principle this could be extended to something different to a star graph, but for now this is how we define context.

agent

Focal node of the ego network.

agent_views

A collection of view objects, each one associated with an adjacent agent.

env_view

A view object associated with the environment.

property neighbour_ids: List[Hashable]

List of IDs of the neighbouring agents.