Views

An example use of the agent/env view() method’s neighbour_id argument for providing tailored views to different agents:

../_images/views.svg

View

class phantom.views.View[source]

Base class for the View class hierarchy. Implementations should subclass either AgentView, EnvView or FSMEnvView.

Views are used to share state between agents (and the Env) in a formalised manner and in a way that is easier than using request and response messages.

Views should be created via the calling of the agent/env’s view() method. Views can be tailored to particular agents, i.e. the view given can depend on the agent that the view is being given to.

AgentView

class phantom.views.AgentView[source]

Immutable references to public phantom.Agent state.

EnvView

class phantom.views.EnvView(current_step, proportion_time_elapsed)[source]

Immutable references to public phantom.PhantomEnv state.