Action and perception for spatiotemporal patterns

This is a contribution to the formalization of the concept of agents in multivariate Markov chains. Agents are commonly deﬁned as entities that act, perceive, and are goal-directed. In a multivariate Markov chain (e.g. a cellular automaton) the transition matrix completely determines the dynamics. This seems to contradict the possibility of acting entities within such a system. Here we present deﬁnitions of actions and perceptions within multivariate Markov chains based on entity-sets . Entity-sets represent a largely independent choice of a set of spatiotemporal patterns that are considered as all the entities within the Markov chain. For example, the entity-set can be chosen according to operational closure conditions or complete speciﬁc integration. Importantly, the perception-action loop also induces an entity-set and is a multivariate Markov chain. We then show that our deﬁnition of actions leads to non-heteronomy and that of perceptions specialize to the usual concept of perception in the perception-action loop.

In the literature agents are usually seen as entities that act, perceive, and are in some way goal-directed (cmp.Barandiaran et al., 2009).
The PA-loop assumes that the entities that make up agents as well as their environments can be captured by interacting stochastic processes.This is a convenient assumption since actions and perceptions can then be easily identified with the interactions (see Section 3).Further requirements (e.g.autonomy) can then be introduced to distinguish stochastic processes that actually constitute agents.
It has not been formally established whether the assumption that the set of entities that contains agents can be represented by stochastic processes is justified.We have argued in previous work, that (naively) using stochastic processes to capture entities within a given multivariate Markov chain (for example cellular automata like the Game of Life) fails to account for essential proporties of agents irrespective of chosen additional conditions.Instead, we have argued for the use of spatiotemporal patterns (STPs, previously employed by Beer, 2014b,a) to represent entities.The immediate advantage is that STPs are a superset of structures like gliders in the game of life, spots in reaction diffusion systems (Virgo, 2011;Froese et al., 2014;Bartlett and Bullock, 2015), and particle based systems exhibiting individuation into multi-particle "cells" (Schmickl et al., 2016).Formally capturing these structures then becomes a matter of selecting the according subsets of STPs i.e. the entity-sets (see below).
A disadvantage of the STP based entities is that they lack the formal construction/interpretation of actions and perceptions that the PA-loop provides.As far as we know, no formal definitions of actions and perception exists for STP based entities.The first contribution of this paper are proposals of such formal definitions called entity action (Section 4) and entity perception (Section 5).
The second contribution is a formal connection between the PA-loop and our STP-based entity actions and perceptions (Section 6).This connection is achieved via the notion of entity-sets.This is just the set of those STPs in a multivariate Markov chain that are considered as entities according to an independently specified criterion (e.g.organizational closure (Beer, 2014a) or complete local integration (Biehl et al., 2017(Biehl et al., , 2016))).Importantly, we can quite naturally identify an entity-set for the PA-loop and use our definitions of entity action and entity perception for this entity-set.The result is that our entity perception coincides with the standard notion of perceptions in the PA-loop and that entity actions are a necessary and sufficient condition for nonheteronomy.Non-heteronomy (i.e.not being determined by the environment) was proposed in Bertschinger et al. (2008) as part of an information theoretic measure of autonomy.
The most closely related work is that of Beer (2014b).Apart from a generalization to stochastic systems our set of entity perceptions seems to be a straightforward (but surprisingingly tedious) formalization of the cognitive domain of STPs described for the glider in game of life.We use "perceptions" instead of "cognitive domain" only because our motivation came more from the PA-loop and unlike Beer (2014b) not directly from autopoiesis.Concerning the entity actions we deviate from Beer (2014b) by requiring more from an action than just the continuation of the entity.
We note that Ikegami and Taiji (1998) propose to use possible/compatible counterfactual trajectories of game players as signs of autonomy.We construct the capability to act from the counterfactual trajectories and find that they imply non-heteronomy which is a related to autonomy.

Notation
We restrict ourselves to finite, time-discrete, multivariate Markov chains.These are unrolled in time and can then be formally described as Bayesian networks (BNs).We index the random variables in the BN via the index set V = J × T where T is the set of all timesteps and J is the set of (spatial) degrees of freedom.If i ∈ V is an index we also write i = (j, t) ∈ J × T where convenient.The BN is then a set {X i } i∈V of random variables together with a set of edges determining the parents pa(i) = pa(j, t) of each node i ∈ V , and associated mechanisms p (j,t) (x j,t |x pa(j,t) ).We assume that the parents of any node are a subset of the nodes at the previous timestep pa(j, t) ⊆ (J, t) := {(j, t)|j ∈ J}.We write X A := (X i ) i∈A for the joint random variable consisting of random variables indexed by elements of A ⊆ V .We also sometimes write A t := {(j, t)|j ∈ A} for the elements in A that correspond to indices at timestep t.We refer to A t as the time-slice of A at t.The state space of random variable X i is denoted as X i and the specific values are denoted by lower case letters x i , y i , xi , ... ∈ X i .For joint random variables we write X A := i∈A X i and x A , y A , xA , ... ∈ X A .
A spatiotemporal pattern (STP) is a value x A ∈ X A of a joint random variable X A with A ⊆ V .Since A ⊆ V is an arbitrary subset of V a STP can specify the values of random variables at multiple timesteps and multiple spatial locations.The set of all STPs is: It is important to envision the difference between the set of all STPs and the set of all subsets of random variables of {X i } i∈V .The latter is isomorphic to the power set of V and can be written as and is a set of random variables not a set of values of random variables.
A trajectory is a STP x V that occupies all random variables in the BN {X i } i∈V .We then say that a STP y A ∈ X A occurs within trajectory x V if y A = x A .
An entity-set E({X i } i∈V ) is a subset of all STPs.One choice would be to use the entire set of STPs as the entity set.Other choices include using organizational closure conditions like in Beer (2014b) or the complete specific integration criterion (Biehl et al., 2016(Biehl et al., , 2017)).The following definitions and theorems all assume that {X i } i∈V is a multivariate Markov chain with V = J × T and E is a given entity-set.
Figure 1: First timesteps of the PA-loop BN.The processes represent environment {Et}t∈T , and agent memory {Mt}t∈T .

Perception-action loop
Given two interacting stochastic processes (e.g.Fig. 1) we can always extract random stochastic process that explicitly represent the interactions.If we see one of the processes as the agent's memory process {M t } t∈T and the other as the environment process {E t } t∈T then these extracted random variables can be seen as the perceptions and actions of the agent.Perceptions {S t } t∈T then capture exactly all the influence of the environment on the agent and actions {A t } t∈T capture the influence of the agent on the environment.This means we introduce another BN containing two more processes, the action process {A t } t∈T and the sensor process {S t } t∈T .The result of this extraction is an extended BN (Fig. 2) with identical joint probability distribution over the two initial stochastic processes {M t } t∈T and {E t } t∈T .This perception action loop is used for example in Bertschinger et al. (2008).
The idea behind the extraction of perceptions {S t } t∈T (and conversely actions {A t } t∈T ) is to partition the state space E t of the environment at t into blocks having identical influence on the next memory state M t+1 .These blocks are then the possible perceptions i.e. the states of S t .Formally: (1) Then: (i) The sensor partition1 t is then defined as the set of equivalence classes of the equivalence relation ≡ t .(ii) The set of sensor values is defined as S t := t and an element s t ∈ S t (which is also a block in t is called a perception of a sensor value. In the symmetrical way we define actions via a partition of M t and arrive at the extended PA-loop of Fig. 2. It is then straightforward to prove the following theorem: Theorem 1 (Invariant extension theorem).Given a perception action loop {X i } i∈V = {M t , E t } t∈T and its extended PA-loop T be the probability distribution over the entire perception action loop {X i } i∈V and let p w M T ,E T be the marginal probability distribution over the memory and environment process obtained from the probability distribution p w W over the entire extended PA-loop.Then Proof.This is probably fairly well known but see Biehl (2017) for an explicit proof.
This shows that the introduction of action and sensor process in the above way only makes the interactions between agent and environment processes explicit and does not introduce any additional dynamics.The theorem also shows that the sensor process (and conversely the actions) captures all influences from the environment on the agent.Else the dynamics of the original processes could not remain identical.In Section 5 we want to capture all influences of the environment on a set of STPs / entities instead of on a stochastic process like {M t } t∈T .This will require a generalization of the perception extraction procedure in Definition 1.

Entity action
We now define a concept of actions for a given entity-set in a multivariate Markov chain.First we briefly sketch the main ideas behind the definition.
Due to our setting of a given multivariate Markov chain that actions have to occur within our concept of actions differs from other approaches.Paraphrasing Wilson and Shpall (2012) only slightly, what distinguishes actions among events is that they do not merely happen to individuals but rather that they are made to happen by the individuals.This is problematic in our setting where STPs (as entities) take the role of individuals.What "happens" in a multivariate Markov chain are the trajectories and the STPs occurring within them.The Markov chain's dynamics are determined by its mechanisms p j,t with j ∈ J, t ∈ T .These in turn determine (possibly stochastically) what is going to happen at all times anywhere within the chain.
Therefore, it is impossible that a multivariate Markov chain contains an STP or entity that can make something happen beyond what happens anyway due to the mechanisms.This means we have to explain and define actions in a different way.
We should also note that unlike other accounts of actions (Wilson and Shpall, 2012) we do not require actions to be necessarily purposeful or goal-directed in any way.The way we conceive agency an entity with actions will be considered goal-directed if its actions are goal-directed in some sense.
To get to our own definition of actions we note that events called actions are usually attributed to a limited or bounded region or part of the universe e.g. the body of a living organism or sometimes just its brain if it has one.These parts usually contain mechanisms or configurations of matter that are either a) not directly observable to a human observer e.g.hidden in an opaque container, or b) not well understood by the human observer, or c) both.These factors inevitably lead to unpredictability of such events.In other words, events that are attributed to well understood and therefore predictable mechanisms, e.g.sunrises, are not considered actions.
From this point of view actions are not, beyond their possibly complex and unobserved origin, special events but may appear as special to observers that lack the sensory and computational capacity to resolve or understand them.In our approach we construct actions as events in such a way that they are fundamentally unpredictable by any observer within the system.As we will see this can be done without the need for a definition of an observer.
Note that this approach remains compatible with observer-dependent notions of apparent or as-if actions (cmp.McGregor, 2017).The "fundamental" actions are apparent actions for every possible observer while other events are actions for some observers and plain, predictable events for others.
Up to now we have ignored randomness.True randomness (in the sense of stochastic independence of the event from any other event in the universe), if it exists in a system, can never be explained, predicted, or understood.Combined with our reasoning above this suggests that all random events are actions and fundamentally so.This is against our intuition, random events should not be seen as actions of agents.However, we place the burden of ruling out random events from being interpreted as actions of agents on the entity-set and/or goal-directedness.We expect useful notions of entities not to consist of (completely) independent events which would prevent such events from becoming actions in our approach.Furthermore independent events seem not to be useful in order to achieve a particular Carole Knibbe et al, eds., Proceedings of the ECAL 2017, Lyon, France, 4-8 September 2017, (Cambridge, MA: The MIT Press, ©2017 Massachusetts Institute of Technology).This work is licensed to the public under a Creative Commons Attribution -NonCommercial -NoDerivatives 4.0 license (international): http://creativecommons.org/licenses/by-nc-nd/4.0/ goal.However, the usefulness of random number generators might be seen as a counterexample.As of now we have no formal definition of goal-directedness such that answering these questions is future work.
When we want to define actions for entities the first issue we run into is that entities are already fixed STPs.
Therefore each entity x A ∈ E already consists of the consequences of whatever actions (if any) it took.It is in this sense the result of its own actions.There is no freedom left.In order to investigate the actions we therefore have to deconstruct the entity and see what other actions it could have taken time-slice by time-slice.For this we look for counterfactual entities y B whose time-slice at t can occur in exactly the same environment x Vt\At and has a different immediate future.Requiring the co-occurrence with the same environment makes the different futures unpredictable for anything part of that environment.No observer can therefore predict these futures either.Even an observer that distinguished the two entities in the past is in the same state at t independent of the entity it is faced with.Therefore it must have forgotten their difference.In this way we get a definition of actions as unpredictable events for observers without needing to formally define observers.
For the formal definition we first define: Definition 2 (Environment of an STP).Let x A be a STP.Then the environment of x A at time t is the spatial pattern x Vt\At .
We now state the definition of an action of an entity at a time t in a particular trajectory formally.
Definition 3 (Action and co-action of an entity).Let x V ∈ X V with p V (x V ) > 0. Also let x A be an entity with nonempty time-slices at t, t + 1.Then x A performs an action x At+1 at time t in trajectory x V if there exists an entity y B with non-empty time-slices at t, t + 1 such that (i) y B occurs in y V = x V with p V (y V ) > 0, (ii) at t the entities x A and y B occupy the same random variables: B t = A t , (iii) at t the trajectories x V and y V are otherwise identical: x Vt\At = y Vt\At , (iv) at t + 1 the entities are different: x At+1 = y Bt+1 .
We also call y B a co-action entity, y V a co-action trajectory, and y Bt+1 a co-action.
Note that all requirements are symmetric.Therefore, if x A performs an action then its co-action also performs an action.Also, the notion of co-action entities can easily be extended to more than one co-action entity.We only have to make sure that all entities in a set of co-action entities are mutually different at t + 1.Furthermore, it is easy to generalise the definition of actions to situations where x A and y B must occupy the same variables for an interval of time [t − m : t] before the action.In that case, the environment x V [t−m:t] \ A [t−m:t] must be identical during this interval.
Finally, note that the condition that the two acting entities differ at time t + 1 can be fulfilled in two ways.If A t+1 = B t+1 then we call these actions extent actions.Else, if the actions differ only in value i.e. we have A t+1 = B t+1 so that x At+1 = y At+1 then we call these actions value actions.
The difference between value actions and extent actions is made possible due to our definition of entities as STPs.An intriguing question for the future is whether the capabilities of agents to act both in value and extent are truly superior to agents that only act in value such as those modelled by PA-loops.As we will see in Section 6 probabilistic and information theoretic expressions are easy to formulate for actions in value only.However, for actions in extent this has not been done yet.

Entity perception
In this section we formally define perception for (STP-) entities.We make no distinction here between perception, experience, and sensory input.In the tradition of modelling agent-environment systems using dynamical systems or their probabilistic generalisations as stochastic processes in PA-loops we define perception as all effects that the environment has on an individual/agent (Beer, 1995).
We run into a similar problem as with the actions.An entity is already a fixed STP that contains all influence that it may have been subjected to.It is in this sense the result of influence (or no influences) from its surroundings.In order to investigate these influences we therefore have to deconstruct the entity and see how it was "formed" by external influences / perceptions time-slice by time-slice.
The idea is to fix the past of the entity up to t and use the set of counterfactual entities with the same past as the alternative futures.We can then partition the possible environments of these counterfactual entities according to their influence on the probability distribution over the entities' futures.This is done in basically the same way as we defined perception in the PA-loop in Definition 1.However, there are some technical issues to overcome.
The set of entities with identical pasts up to time t can be interpreted as the set of entities that are the most like x A up to t.These are different entities but they only differ in the future.Their futures (including their next time-slices) are therefore a close analogue to the next states m t+1 of agent memories in the PA-loop.To make sure however that the entities have a next time-slice we also require that they have non-empty next time-slice.These requirements together define the notion of the co-perception entities of an entity x A at time t.These are entities that also perceive something (maybe the same thing) at t (in their trajectories) if x A perceives something at t. Definition 4 (Co-perception entities of an entity at t).Let x A ∈ E be an entity with non-empty time-slices at t and t + 1.The set of co-perception entities S(x A , t) of entity x A at t is the set of entities with non-empty time-slices at t and Carole Knibbe et al, eds., Proceedings of the ECAL 2017, Lyon, France, 4-8 September 2017, (Cambridge, MA: The MIT Press, ©2017 Massachusetts Institute of Technology).This work is licensed to the public under a Creative Commons Attribution -NonCommercial -NoDerivatives 4.0 license (international): http://creativecommons.org/licenses/by-nc-nd/4.0/ 71 Oral presentation t + 1, and that are identical up to t: (3) Next we want to define a conditional probability distribution over these co-perception entities similar to p Mt+1 (m t+1 |e t , m t ).For this we need a random variable that ranges over all the possible futures of the co-perception entities.The naivest way to do this would be to use for .
(4) However, this has two problems.The first is that in general the denominator may vanish for some environments x Vt\At ∈ X Vt\At .The second is that it is not a conditional probability since the sum over all co-perception indices is not necessarily one.These problems can be solved by restricting the set of environments and by introducing a mutual-exclusivity condition on the futures of the coperception entities.
To restrict the environments we therefore define the coperception environments in the following way.
Definition 5 (Co-perception environments).Let x A ∈ E be an entity with non-empty time-slices at t and t + 1 and S(x A , t) its co-perception entities.Then define the associated co-perception environments X S Vt\At ⊆ X Vt\At by X S Vt\At := {x Vt\At : ∃y B ∈ S(x A , t), p B,Vt\At (y B , xVt\At ) > 0}. (5) The co-perception environments of a co-perception set S(x A , t) are then the spatial patterns X Vt\At at t that can co-occur with at least one co-perception environment.By definition of the co-perception environments the denominator of Eq. ( 4) cannot vanish anymore if we require that the construction only allows co-perception environments.However, in order for the sum over all co-perception entities to equal one (for all co-perception environments) we need to have (6) This is the case in general if for all x Vt\At ∈ X S VtbsAt and all co-perception entities' futures are mutually exclusive, i.e. for all This condition can be guaranteed if we require a form of non-interpenetration.This condition on entity-sets states that there cannot be two different entities which are identical up to some point in time t and then, in the same single trajectory (with positive probability), at some point "reveal" their difference.If entities with identical pasts ever reveal their difference they must be in different trajectories i.e. they must be mutually exclusive.
Definition 6 (Non-interpenetration).An entity-set E ⊆ B⊆V X B satisfies non-interpenetration or is non-interpenetrating if for all y B , z C ∈ E we have Non-interpenetration implies that co-perception entities are mutually exclusive: Theorem 2. Let x A ∈ E be an entity with non-empty timeslices at t and t + 1 and S(x A , t) its co-perception entities.If E satisfies non-interpenetration then S(x A , t) is mutually exclusive.
Proof.Let y B , z C ∈ S(x A , t) with y B = z C .Then they have identical pasts and so we have y B t = z C t .From non-interpenetration we then get This is stronger than Eq. ( 7).
This means that under non-interpenetration Eq. ( 4) is a well defined conditional probability distribution .However, this conditional probability distribution is still quite different from p Mt+1 (m t+1 |e t , m t ) since it ranges over the entire futures x k A k t of the co-perception entities and not just next timesteps.
At each transition from time-step t to t + 1 the coperception entities S(x A , t) split up into sets of entities that are identical up to t+1 (we will call these sets the branches).Only one of these sets is the set S(x A , t + 1).For example an entity y B ∈ S(x A , t) with the same past up to t but with a different time-slice at t + 1 i.e. y Bt+1 = x At+1 is part of a different branch.In that case this branch is S(y B , t + 1) and we have S(y B , t + 1) ∩ S(x A , t + 1) = ∅.In summary then the dynamics of the system split up the co-perception entities of x A up to t into disjoint sets (the branches) of entities with identical pasts up to t + 1.We can then interpret the branches at the time t + 1 as the distinctions among the co-perception entities that are revealed at time t + 1.Further distinctions among the co-perception entities are only revealed at later times.This also means that these are all differences that could possibly be due to the influence of the environment at t and that show their effect at t+1 (not later).In this way the perceptions at t should also be defined with Carole Knibbe et al, eds., Proceedings of the ECAL 2017, Lyon, France, 4-8 September 2017, (Cambridge, MA: The MIT Press, ©2017 Massachusetts Institute of Technology).This work is licensed to the public under a Creative Commons Attribution -NonCommercial -NoDerivatives 4.0 license (international): http://creativecommons.org/licenses/by-nc-nd/4.0/ respect to these branches.We call the partition that is defined via the identification of entities in S(x A , t) that are identical up to t + 1 the branching partition.
Definition 7 (Branching partition).Let x A ∈ E be an entity with non-empty time-slices at t and t + 1 and S(x A , t) its co-perception entities.Then define the branching partition η(x A , t) of S(x A , t) as the partition induced by the equivalence classes of the equivalence relation where y B , z C ∈ S(x A , t).
We note that the definition of the branching partition can easily be generalised to more than one time-step into the future.Instead of requiring equality at t + 1 we can require equality for the next r time-steps.
Given the branching partition η(x A , t) for a noninterpenetrating entity set we can then define a conditional probability distribution over the branches by just summing up the probabilities of all entities in each branch (remember that they are all mutually exclusive) to get the probability of a branch.This gives us the branch-morph defined below. 2efinition 8 (Branch-morph).Let {X i } i∈V be a multivariate Markov chain with index set V = J × T and entity set E. Let x A ∈ E be an entity with non-empty time-slices at t and t+1 and S(x A , t) its co-perception entities and η(x A , t) the branching partition.Furthermore, let X S Vt\At ⊆ X Vt\At be the associated co-perception environments.Also write for every block b ∈ η(x A , t): (11) Then for each xVt\At ∈ X S Vt\At we define the branchmorph over η(x A , t) as the probability distribution With the branch-morph we can then define, as expected, the perceptions as equivalence classes of the co-perception environments with respect to the associated branch-morph.First we define a partition of the co-perception environments called the co-perception environment partition.The perceptions are then the blocks of this partition.Definition 9. Let {X i } i∈V be a multivariate Markov chain with index set V = J ×T and entity set E. Let x A ∈ E be an entity with non-empty time-slices at t and t+1 and S(x A , t) its co-perception entities and η(x A , t) the branching partition.Furthermore, let X S Vt\At ⊆ X Vt\At be the associated co-perception environments.Then define the co-perception environment partition π S (x A , t) of X S Vt\At as the partition induced by the equivalence classes of the equivalence relation This means all associated co-perception environments in the same block of π S (x A , t) have the same branch-morph.In other words they lead to the same branch of entity futures (i.e. the same future branch) with the same probabilities.Then all elements of these environment blocks have identical effects on the future branches and these branches cannot distinguish between environments within the blocks.
Definition 10 (Perceptions).Let {X i } i∈V be a multivariate Markov chain with index set V = J × T and entity set E. Let x A ∈ E be an entity with non-empty time-slices at t and t + 1 and S(x A , t) its co-perception entities.Furthermore, let X S Vt\At ⊆ X Vt\At be the associated co-perception environments and π S (x A , t) its co-perception environment partition.
Then the blocks of π S (x A , t) are called the perceptions of x A at t.

Entity action and perception in the PA-loop
We now show that agent-environment systems as modelled by the PA-loop are multivariate Markov chains containing a specific choice of entity sets.
In the PA-loop each trajectory x V is considered to consist of a time-evolution m T of the agent and a time-evolution of the environment e T .The agent therefore occurs in every trajectory and occupies the same degree of freedom in every trajectory.Each of the time-evolutions m T is a STP in the PA-loop.Since for us entities are STPs we define the entityset E P A of a PA-loop as the set of time-evolutions of the agent process i.e.
Similarly, we can define entities for the environments and add them to E P A .
Entity actions in the PA-loop We can write every trajectory as a pair (m T , e T ) where m T is an entity.The entity m T then performs an entity action at time t in trajectory • at t entities m T and mT occupy the same random variables, which is the case for all entities in E P A , • at t environments of m T and mT are identical: e t = ēt , • at t + 1 the entities are different: m t+1 = mt+1 .Since all entities occupy the same random variables we can only have value actions in the PA-loop.
If we assume that these conditions are fulfilled at some time t for two entities m T , mT we can derive that the conditional entropy H(M t+1 |E t ) of the next agent state given the current environment state is greater than zero.To see this note that from p M T ,E T (m T , e T ) > 0 and p M T ,E T ( mT , ēT ) > 0 it directly follows that p Mt+1 (m t+1 |e t ) > 0, p Mt+1 ( mt+1 |e t ) > 0 and p Et (e t ) > 0. Plugging this into the definition we get H(M t+1 |E t ) > 0.
It can also be seen that the more different co-action entities there are for a time t the higher the conditional entropy H(M t+1 |E t ) can get.The final value of H(M t+1 |E t ) depends on the actual probabilities but the maximum value for n co-actions is log n.Also note that if there are no actions at t i.e. no co-action entity in no co-action trajectory at t then H(M t+1 |E t ) = 0. Entity actions of entities in E P A are therefore necessary and sufficient for H(M t+1 |E t ) > 0. The conditional entropy H(M t+1 |E t ) measures the uncertainty about the next agent state when the current environment state is known.It has been proposed as part of an autonomy measure as a measure of non-heteronomy in Bertschinger et al. (2008).Non-heteronomy means that the agent is not determined by the history of the environment.In this terminology entity actions are a necessary and sufficient condition for non-heteronomy.
Entity perception in the PA-loop We now look at how entity perception as defined in Section 5 specialises to the case of the PA-loop.This argument in effect constitutes a proof that our Definition 8 of the branch-morph is a generalisation of the conditional probability distributions p Mt+1 (.|m t , e t ) : M t+1 → [0, 1] to non-interpenetrating arbitrary sets of co-perception entities This result is not surprising since we set out to do just this but it is also instructive to work through the recovery of the original expression of the conditional probability distribution starting from the general branch-morph.
We pick an entity m T from the entity set E P A and consider its perceptions at an arbitrary time-step t ∈ T .In order to get the perceptions at t we need 1. the co-perception entities S(m T , t) of m T at t, 2. the branching partition η(m T , t) with its branches, 3. the co-perception environments, 4. the branch-morphs for each environment, 5. and the co-perception environment partition π S (x A , t) with its blocks, the perceptions.These can be identified in the following way.
1.The co-perception entities S(m T , t) are the entities in E P A that have non-empty time-slices at t, t + 1, and that are identical to m T up to t.All entities in E P A have non-empty time slices at all times.So we have: 2. First note that the entity set E P A satisfies noninterpenetration since they all occupy the same set {M t } t∈T of random variables.The branching partition η(m T , t) is composed out of blocks (the branches) of co-perception entities that are identical up to t + 1 i.e.
We can therefore identify the blocks of η(m T , t) i.e. the future branches by the values that the entities take at t + 1.
The branching partition is then: (20) 4. The branch-morphs are the probability distributions p η(m T ,t) (.|e t , m t ) : η(m T , t) → [0, 1] over the branches for each co-perception environment e t ∈ E S t .These are defined using Eq. ( 11  where we used the BN of the PA-loop.5.The co-perception environment partition π S (m T , t) of E S t = is induced by Eq. ( 13) which, using the PA-loop and Eq. ( 24 which is just the equivalence relation of Eq. ( 1) used to extract the sensor-values in Section 3.So we have seen that our definitions of Section 5 specialise in the case of the PA-loop to the same concept of perception as in Section 3.

Conclusion
We have defined actions and perceptions for entity-sets and therefore for sets of spatiotemporal patterns.This provides a formally defined way to associate gliders and similar spatiotemporal patterns in reaction-diffusion systems with actions and perceptions.This is a step towards a foramization of agency of such patterns.Here a notion of goaldirectedness is still missing and future work.We have also shown how our definitions specialize to a necessary and sufficient condition for non-heteronomy and the standard notion of perceptions of the agent process in the PAloop.For future research it is interesting to note that the branch-morphs are generalisations of the conditional probability distribution p Mt+1 (.|e t , m t ).These conditional probability distributions play a role in various information theoretic concepts formulated for the PA-loop.This suggests we might be able to translate bakc and forth between PA-loop concepts and those for spatiotemporal patterns in the future.
We noted that a unique definition of entity perception is dependent on the condition of non-interpenetration of the entity-set.

Figure 2 :
Figure 2: First time-steps of the BN of the extended PA-loop.The processes {At}t∈T and {St}t∈T mediate all interactions between {Mt}t∈T and {Et}t∈T without changing the probability distributions over the latter (see Theorem 1).
the sum on the right hand side using Eq.(17) for b( mt+1 ) and then S(m T , t) t≺ = M t≺ : p(b( mt+1 ), e t |m t ) = p Mt+1,Et ( mt+1 , e t |m t ).(22) Carole Knibbe et al, eds., Proceedings of the ECAL 2017, Lyon, France, 4-8 September 2017, (Cambridge, MA: The MIT Press, ©2017 Massachusetts Institute of Technology).This work is licensed to the public under a Creative Commons Attribution -NonCommercial -NoDerivatives 4.0 license (international): http://creativecommons.org/licenses/by-nc-nd/4.0/The definition of the branch-morph for the PA-loop isp η(m T ,t) (b( mt+1 )|e t , m t ) : = p(b(mt+1 ), e t |m t ) b∈η(m T ,t) p(b, e t |m t ) (23) which can be rewritten (with some work) as p η(m T ,t) (b( mt+1 )|e t , m t ) = p Mt+1 ( mt+1 |e t , m t ) (24) = p Mt+1 ( mt+1 |e t , m t ) (25) Carole Knibbe et al, eds., Proceedings of the ECAL 2017, Lyon, France, 4-8 September 2017, (Cambridge, MA: The MIT Press, ©2017 Massachusetts Institute of Technology).This work is licensed to the public under a Creative Commons Attribution -NonCommercial -NoDerivatives 4.0 license (international): http://creativecommons.org/licenses/by-nc-nd/4.0/ (m T , e T ) with p M T ,E T (m T , e T ) > 0 if there is an entity mt such that • mT occurs in ( mT , ēT ) = (m T , e T ) with p M T ,E T ( mT , ēT ) > 0, ) 3. The co-perception environments are the STPs x Vt\At compatible with at least one co-perception entity.For the PA-loop and entity m T at t we have X Vt\At = E t and thereforeX S Vt\At = E S t .Where E S t isE S t = {e t ∈ E t : ∃ mT ∈ S(m T , t), p M T ,Et ( mT , e t ) > 0}.(19) If we marginalize over M t we can see that this is equivalent to E S t = {e t ∈ E t : p Mt,Et ( mt , e t ) > 0}.