Research Article | Open Access
Mauricio Verardo, Pedro P. B. de Oliveira, "A Fully Operational Framework for Handling Cellular Automata Templates", Complexity, vol. 2019, Article ID 6573793, 11 pages, 2019. https://doi.org/10.1155/2019/6573793
A Fully Operational Framework for Handling Cellular Automata Templates
Cellular automata are fully discrete, computational, or dynamical systems, characterised by a local, totally decentralised action. Although extremely simple in structure, they are able to represent arbitrarily complex phenomena. However, due to the very big number of rules in any nontrivial space, finding a local rule that globally unfolds as desired remains a challenging task. In order to help along this direction, here we present the current state of cellular automata templates, a data structure that allows for the representation of sets of cellular automata in a compact manner. The template data structure is defined, along with processes by which interesting templates can be built. In the end, we give an illustrative example showcasing how templates can be used to explore a very large cellular automaton space. Although the idea itself of template has been introduced before, only now its conceptual underpinnings and computational robustness rendered the notion effective for practical use.
Cellular automata (CAs) can be regarded as both fully discrete computational and dynamical systems, characterised by a local, totally decentralised action. What makes them an attractive object of study is the fact that, in spite of their extremely simple structure, they may present arbitrarily complex behaviour, depending on the local rule chosen to govern the system . The rule acts by changing the discrete state of every position (a cell) of a regular grid, according to its current state and those of its neighbouring cells.
The set of all possible one-dimensional CAs can be partitioned using two important parameters: the number of states the CA allows a cell to take on at any given time step and the size of its neighbourhood, defined by the number of neighbours a cell has to check in order to decide which state it will be at the next time step. Each resulting block of the partition defines a CA space or family.
Except for the small elementary space (made up of only 256 one-dimensional rules, with 2 states per cells and 3 cells in the neighbourhood), whenever there is the necessity of searching for CAs with a given behaviour in a given space, one is overwhelmed by the very high number of possibilities to check. This is why many applications end up revolving around the elementary rules, as in .
The approaches used to perform searches in larger spaces have usually been made automatic by means of search algorithms, especially evolutionary, designed to look for rules that would have particular emergent features, such as those that can be associated with the solution of particular computational problems , or the direct attempt to analyse constrained CA spaces, defined by required properties of the rule tables or the expected behaviour to be observed [4, 5]. In order to escape from the arbitrariness of the latter, different representational tools sometimes are employed, most notably the DeBruijn graphs, used in , to explore the parity problem’s solvability for CAs in different spaces, and the conditionally matching rules, explored in .
Regardless of the case, the fact is that the possibility of representing families of CA rules in a compact way would be greatly beneficial, both theoretically and for practical applications. A particularly powerful representational tool in this context is the template. First introduced in , templates are data structures which represent potentially extremely large sets of CAs, further allowing to combine and manipulate them with operations such as the intersection, before effectively enumerating the whole set.
Even though the idea itself of template has been introduced before, only now its conceptual underpinnings and computational robustness rendered the notion effective for practical use. In tune with that, the idea has now been crystallised into an open-source package for the Wolfram Mathematica system  called CATemplates . The explanations provided in this paper are partially based on the implementations used in CATemplates.
Although cellular automata can be defined in any number of dimensions, here we focus on the one-dimensional case, first because the major benchmarking problems from the literature are one-dimensional and second because this is the case implemented in CATemplates.
The rest of this paper is organised as follows. Section 2 is a brief overview of cellular automata and their inner workings, Section 3 defines a cellular automata template, and Section 4 provides explanations about the operations applicable to them. Section 5 then presents examples of template builder functions, Section 6 discusses a sample application of templates to find rules that share both totality and captivity in extremely large CA spaces, and Section 7 closes the paper with some concluding remarks and ideas for future work.
2. Cellular Automata
Cellular automata are dynamical, decentralised systems, governed by simple, local rules. Given the relative simplicity of CAs, they serve as a good model to analyse how the interaction among simple components can give rise to complex behaviour in dynamical systems, in particular, how solutions to global problems like the density classification task arise .
CAs are composed of a regular lattice of finite automata (the cells), whose states change with time, following a predetermined local rule. The lattice can be arranged in any number of dimensions and can have a finite or infinite number of cells. From now on, whenever a CA is mentioned, we always mean one-dimensional CAs (whose lattices are arranged as a line), each cell can take on a discrete state value, and the update is parallel, at discrete time steps.
A CA’s cell state is usually represented by numbers in the interval, or a colour from a set of colours previously defined. The local rule of a CA acts on each cell’s neighbourhood, which is a set composed of the cell itself together with its adjacent cells, with being the radius of the rule, that is, the number of cells at each side. The fractional value for indicates that the neighbourhood is asymmetric, as in , meaning that the center cell has 2 neighbours on one side and 1 on the other (in CATemplates, by convention, the left-hand side contains the larger number of neighbours).
By defining a value for and , a space (or family) of CAs is established. The elementary space is currently one of the most extensively studied CA families, as it is composed of only 256 rules, even though displaying a rich phenomenology .
The size of a CA space is a function of and . In the one-dimensional case, this means . As a consequence, the increase of or quickly leads to exponentially large space sizes; for instance, the space of binary CAs with radius 2 is composed of rules.
Every CA’s temporal evolution is governed by a local rule. This local rule is usually represented as a rule table, consisting of state transitions that point every possible neighbourhood to an output state. At every time step, every cell in the lattice is updated according to its neighbourhood, following its state transition table.
Since a rule table has to cover all possible neighborhoods in the lattice, it consists of state transitions ordered using Wolfram’s lexicographic order, in which the first transition is the one corresponding to the neighbourhood formed only by cells in the state, and the last one is the transition corresponding to the neighbourhood of zeros. To illustrate the point, the rule table for elementary CA 184 is shown in Table 1.
It is possible to compress the rule table by using its -ary representation. By discarding Table 1’s first column, we are left with the outputs of each transition: . Since we are still following Wolram’s convention, we can switch freely between both representations. If interpreted as a binary number, this representation can be converted to its decimal form, , which is referred to as the rule (Wolfram) number.
The nature of the function represents a great challenge when searching for specific sets of CAs. One of the employed strategies for this kind of search is to restrict these very large spaces into smaller ones, using static properties of CAs. The template framework described in this paper aims to automate this process. Static properties are those we can draw directly from the rule table, instead of looking at the temporal evolution. This means that they determine specific ways a rule table should be built, so that the resulting rule would possess them. As will be detailed in Section 5, template builder functions use this idea in order to create templates representing specific subsets of CA spaces.
3. Cellular Automata Templates
A cellular automaton template (referred to simply as template from here on) is a data structure that allows for the representation of a (potentially large) subset of a CA’s family in a compact manner.
Template builder functions are defined as a means to create templates of interesting subsets of CAs, usually following a well defined static property derived from CA’s rule tables. They are explained in detail in Section 5.
Two main operations are defined over templates: Expansion and Intersection. Expansion is used to convert a template into the rule set it represents, and Intersection is applied to two templates to generate a third, representing the rule set of the resulting intersection. Both operations are detailed in Section 4.
The template concept was first described in [8, 12] and has gone through significant improvements since then. For instance, the template’s core, essentially what was described as the template itself in the original papers, is now a part of a tuple composed by important attributes, as shown in the definition below.
Also, new template builder algorithms have been developed, the concept of expansion modifier functions has been implemented, and the intersection operation, at that time implicitly couched in terms of a superseded “composition” operation—which was just a part of the original template builder algorithms described in the original papers—has been made explicit and evolved into a generalised operation.
Furthermore, the original work was totally restricted to binary rules, which no longer is the case; the code was completely ad hoc (and therefore, private to the authors), with no internal structure that would allow it to grow toward a usable and useful system, beyond its original conception; and only two rule properties have been accounted for (additional information about these two properties is given later in the paper).
So, in its origin, there was a still immature but promising idea that was conveyed at the time to two distinct audiences: the early technical details of the implementation to Mathematica users  and the actual idea and its prospects as a short communication to the cellular automata community . From then on, the work developed, until reaching the required degree of maturation that it deserved, as embodied in the present report. All the further developments are now consolidated as a fully functional open-source implementation in the form of the CATemplates package , within Wolfram Mathematica software .
Armed with this framework, one can efficiently build and manipulate templates as needed and avoid the expensive enumeration of the sets they stand for until a template is obtained, representing a small enough rule set.
Definition 1 (template). A template is the tuple , where and are the number of states and the neighbourhood radius, respectively, of the cellular automata rules of the space that is being represented, is the template core, and is an expansion modifier function.
The core is by far the most important part of a template. It is essentially a rule table in -ary form with a twist: every output of this rule table is allowed to be a function of the other outputs. This is achieved by introducing variables semantically bounded across all transitions of the classical rule-table representation. By means of the core, a template is able to represent a set of CAs. The following template () is an example:
The and other expansion modifier functions will be explained in more detail in Section 4.
Remark. In the CATemplates package, , , and may be omitted, in which case, the default values of , , and are assumed; similarly, but for the sake of simplicity, from now on in this paper whenever we refer to a template’s core in isolation, say, , the reader should assume the same previous default values for the corresponding template ().
We indicate the state transitions of the template’s core by an index, starting at 0, on the right-most position, up to , on the left-most, so as to mirror their correspondence to the neighborhoods they represent. As such, whenever ’s transition 0 is mentioned, we are referring to the first 0 that appears in ’s core, from right to left. Transition 1 refers to , and so on.
’s transition 0 is a sample of a fixed output. This means any CA with a value different from 0 on its rule table’s first transition—which is the same as the state transition (0,0,0) leading to 1—is not an element of the set represented by .
’s transition 1 is a sample of a free variable (). A free variable is assumed to represent any value in the range . As a convention, free variables are indexed following the transition where they first appear. Were we to consider only ’s first two transitions, we could say it represents the set , since the first transition is fixed and the second is a free variable.
Transition 6 is a sample of a function. As is a binary template (since ), the expression means this transition will always be evaluated to the opposite of the value of transition 1. It is important to note that we could use any algebraic expression here, potentially referring to any other variable in the template, and we would still be able to derive the set this template represents. This is actually done in some template builder functions, as will be seen in Section 5.
It follows from the previous observations that actually corresponds to the binary rule set , , which could also be written as , following Wolfram’s numbering convention.
A template whose core is made of only free variables is called a Base Template and essentially represents the whole CA space given by and ; for instance, the Base Template for the elementary CAs is
Base templates are often used by template builder functions as a starting point.
4. Template Operations
Currently, templates’ processing supports two operations: expansion () and intersection (). This section presents details on how they work.
Every template represents a set of -ary rule tables. This set is obtained by means of the expansion operation.
The -th expansion of template , denoted as , begins with the extraction of all variables present in the template’s core, in a total of variables. For instance, given the template’s core , the ordered list of extracted variables would be , ordered by the variable’s index, in decreasing order. Next, is converted to base , padded with zeros to the left, up to achieving digits. For , we would have the ordered list of digits , since is in binary. We then pair the extracted variables with the digits in order and replace every occurrence of the variable with the corresponding value, like . Any algebraic expression left in the core is then resolved, resulting in .
With the process to find the -th expansion defined, it is only a matter of mapping it over every number in the interval , and we have the set of CA rule tables represented by the template. This is how the full expansion is implemented.
Still considering , since , we only have possible expansions for this template. By performing the expansion procedure with , we end up with the set , .
Upon expansion, templates can generate invalid results; for instance, let us consider the template’s core .
Since and , this template has possible expansions, namely, ; however, the set contains an invalid state transition, as it leads to the -state, which is not in the range.
Expansion modifier functions can be used as a mechanism by which the template provides auxiliary information for the expansion operation, in terms of some details it should abide by.
Every template has at least one expansion modifier function defined. Whenever the expansion operation is performed on the -th expansion, its result is passed on to the template’s expansion modifier function, which is defined by the template builder function.
This means that every template itself is able to define specific behaviours to the expansion operation, deciding how to deal with unwanted results.
Expansion modifier functions are currently divided into two categories: Mappers and Filters.
A Mapper is a function that receives the -th expansion result and performs some kind of transformation on it. So far, we have identified the need for two expansion modifier functions of the Mapper kind: ModKMapper and IdentityMapper.(i)IdentityMapper simply receives the expansion and leaves it untouched.(ii)ModKMapper performs the operation on each transition of the expansion result using the template’s as divisor, thus obtaining a valid expansion.
As an example of the latter, let us define as a variation of that uses ModKMapper instead of the IdentityMapper:
Now, the result of expanding becomes
A Filter is a function that checks the expansion result and decides whether it is an acceptable result for the given template. If it finds an unacceptable expansion candidate, it filters out this result, by removing it from the set . So far, we have identified the need for two expansion modifier functions of the Filter kind: FilterKOutOfRange and FilterVariableAssignments.(i)FilterKOutOfRange simply removes any invalid expansion. For instance, by defining as a variation of that uses FilterKOutOfRange instead of the IdentityMapper, and this results in .(ii)FilterVariableAssignments serves a different kind of need. It allows for templates to define annotations on its core’s variables, which dictate the values from the range the variable is allowed to have.
The annotation referred to in FilterVariableAssignments is expressed with a special syntax on the template’s core. Consider the following template and its expansion:The process should result in the expansion candidate . But since is false, FilterVariableAssignments detects this as unacceptable and removes it from .
In the binary case, FilterVariableAssignments is seldom needed, since the expression is equivalent to a free variable , and the expression is equivalent to the fixed value .
Therefore, this expansion modifier function becomes useful when , for various reasons. For further clarification, Section 5.2 discusses an application of this filter.
Template intersection is a function of two templates, which results in a template whose associated set is equivalent to intersecting the sets of the two templates received as arguments. In another form,
Template intersection initially consists of building an equation system with the template’s cores received as operands. The equation system is then submitted to Mathematica’s SOLVE function , which solves it for the variables that admit a solution, and elicits the relations among the remaining variables. The resulting set of variable values and relations is then applied to any of the two operands, and the outcome is a new template representing only the intersection between both of the input templates.
If the system has no solution, this means both templates represent disjoint sets and, by definition, do not intersect.
As an example, consider the template cores and . The associated equation system thus becomes The solution set of the equation system, as given by Mathematica’s SOLVE, is . We can then substitute the variables in using this set, thus rendering the template’s core . Notice that the same result would be achieved had we applied the substitutions to .
If a template’s core has variable restrictions, a second step is needed to guarantee that the solution found will not violate them.
For instance, consider the templates’ cores and , both with restricted variables: and . To intersect and , we first extract the variable restriction expressions and then build and solve the system as usual. This time, however, the substitutions are applied to both arguments, therefore resulting in the set .
Now, we extract variable restriction expressions and create a second equation system, whose solutions indicate which values the variables may have. In the example, the set of expressions would be extracted, thus yielding the equation system: By solving this system, the solution set can finally be applied to , yielding as the result.
5. Template Builders
So far we have seen how templates can be built in order to represent specific subsets of CA families. We can now go about making evident the true power of templates, by considering template builder functions.
Template builder functions are algorithms tailored to generate templates for specific subsets of CAs that share a given static property.
Currently, six template builders for static properties are implemented, associated to rules of the following kinds: captive; totalistic; outer-totalistic; number conserving; colorblind; and maximum internal symmetry values (see ) for reflection, conjugacy, and their composition. The latter two are not discussed herein partly because we have already discussed them previously (see ), and, at least in the context number conservation, the corresponding template builder simply did not change since its conception. However, the builder for rule table symmetries has undergone a generalisation that now allows for any value of symmetry to be accounted for, not only maximum. As such, the CATemplates package contains the SymmetryTemplate builder, fully available for use, including its corresponding documentation, but we decided not to include it in the paper because it cannot yet handle arbitrary number of states in the case of conjugation.
So, this section discusses builder functions for totalistic, outer-totalistic, captive, and colorblind templates.
5.1. Template Builder for Totalistic and Outer-Totalistic CAs
Definition 2 (totality). A totalistic CA—or, alternatively, a CA that presents the totality property—is one whose state transitions only depend on the sum of the state values of the cells in a given neighbourhood.
Formally, let be the local transition function of a CA, defined over the set of possible neighborhoods for the CA’s space. Let be the size of a neighbourhood of . Let and be neighborhoods of . A CA is said to be totalistic if and only if the following condition is true:
Since totality is a static property, we can derive a general algorithm to find all rule tables of CAs that share the totality property, given a value for and .
The algorithm receives as arguments the values of and for which the template will be generated. It then proceeds to enumerate all possible neighborhoods of the defined space and calculates their sum.
Now, for every sum value found in the previous step, the algorithm picks the neighbourhood representing the smallest -ary number and assigns a variable corresponding to that neighbourhood’s decimal value to all of the state transitions that shared a result with it. For instance, let us consider all neighborhoods of the elementary space whose states sum equals : . Since the smallest neighbourhood in this set is , which is decimal , we assign to their respective transitions the result .
The template’s core for the elementary space becomes
Upon expansion, this template yields the rule tables of the 16 totalistic elementary CAs. Notice that this template’s core is composed of only free variables and references to other free variables. This being the case, every expansion of this template shall yield a valid result, excluding the need to define any expansion modifier function other than .
For and , the resulting template would be
Upon expansion, this template yields the totalistic rules of the referred space.
Definition 3 (outer-totality). An outer-totalistic CA—or, alternatively, a CA that presents the outer-totality property—is one whose local rule considers the sum of the state values of the external cells of a neighbourhood (i.e., those except the center cell), in addition to the state value of the center cell itself.
Formally, let be the local transition function of a CA, defined over the set of possible neighborhoods for the CA’s space. Let be the size of a neighbourhood of , and let be the index of the cell that is meant to undergo a state change (i.e., the center cell when is an odd number). Let and be neighborhoods of . A CA is said to be outer-totalistic if and only if the following condition is true:The algorithm for outer-totalistic templates is almost the same as the one for totalistic rules, with the exception that it considers the sum of external cells in the neighbourhood instead of its entirety.
The algorithm’s output for the elementary space is
Upon expansion, this template generates the 64 outer-totalistic elementary CAs.
For reference, here is the result for and which, after expansion, would yield the outer-totalistic rules of the space, since distinct variables are present in the template:
5.2. Template Builder for Captive CAs
Definition 4 (captivity ). A CA is said to be captive—or, alternatively, to have the captivity static property—when every transition of its rule table outputs a state that appears in the corresponding neighbourhood.
Formally, if is the local transition function of a CA, is a neighbourhood of size , out of all possible neighborhoods , and is an arbitrary state, a CA is said to be captive if and only if the following condition is true:
In the binary case, this naturally simplifies to the fact that every CA with and is captive, for any radius .
As a static property, a general algorithm to find templates of captive CAs for a given space does exist. As such, the algorithm receives the values for and and starts by generating all possible neighborhoods for the space.
It then uses the following simple rules to decide how to transform this neighbourhood in a template output:(i)If the neighbourhood is homogeneous, like , the transition should output the only state that appears in the neighbourhood .(ii)If the neighbourhood is composed of all of the values in the interval , like for and , the transition should output a free variable, indexed by the decimal value of the neighbourhood, namely, (since in base corresponds to the decimal 15).(iii)If the neighbourhood is composed of only some of the possible states, the states of the interval , like for and , the output should be a variable indexed by the neighbourhood, this time restricted by the present values (). This type of neighbourhood only appears when .
Note that since this template uses restricted variables, it must use the expansion modifier function.
As a result of all the latter, the captivity template for the elementary space becomeswhile, for and , the template is
5.3. Template Builder for Colorblind CAs
In order to fully grasp the notion of colorblind rules, let us first discuss the meaning of permutations in the context of CAs.
Definition 5 (colour permutation ()). Let framework be the set of possible states for a CA in the range . A colour permutation is a bijective function of to itself, which can be written as a set of rules of the form , meaning that a cell in state should be switched to state when this permutation is applied.
For instance, a valid permutation for the case where is .
It is important to notice that every colour permutation can be represented by an algebraic function that interpolates the points defined by the permutation. For instance, could be written as .
Definition 6 (symmetric group ()). The symmetric group , of a set , is the set of all possible permutations over .
For instance, the symmetric group for is
Definition 7 (neighbourhood permutation ()). Let be a colour permutation and let be the set of all possible neighborhoods for a given CA. The neighbourhood permutation is a permutation that uses to transform into neighbourhood , by applying to every cell of .
For instance, with , , and , a valid transformation due to would be . The other transformations can be derived by applying the same reasoning to all of the neighborhoods of .
Definition 8 (cycle notation of a permutation). A permutation can be written by means of a cycle notation, formed by a set of vectors that represent cycles associated with the permutation.
For instance, the colour permutation can be written as , where each vector has the form , , and represents a cycle due to the permutation, namely, the two-step cycle , and the self-loop . Similarly, The previous permutation would be written in cycle notation as .
As for neighbourhood permutations, , for example, would be represented as follows:With the previous characterisations, we can now define color blindness.
Definition 9 (color blindness ). A CA whose cells can be in any of the states of the set is said to be colorblind—or, alternatively, to possess the color blindness property—if its space-time evolution does not change, unless by a colour change, after applying any neighbourhood permutation , to all state transitions that define its rule table.
Notice that, for a CA to be invariant to , its rule table’s outputs should be consistent with the cycles formed by the application of over its neighborhoods , being the index of the state transition on the CA’s rule table.
In other words, for a rule to be invariant to , the output of, say, neighbourhood , should be equal to the application of to the output of neighbourhood , since is transformed into due to ; for the same reason, the output of should be equal to the application of to the output of neighbourhood . The same happens, analogously, for the remaining cycles of .
Now, in order to generate a template representing CAs that are invariant to the neighbourhood permutation , we need to assign an output to every neighbourhood and derive a rule table that could be turned into a template.
So that outputs follow , we use its cycle notation representation to assign to every cycle start a free variable, indexed by its corresponding neighbourhood’s decimal representation, ending up with a tuple formed by neighbourhood and output. The neighbourhood, being a cycle start, is turned into the tuple , for instance.
For every remaining neighbourhood in a cycle, we now apply to the free variable found in the previous step times, being the distance from this neighbourhood to the start of the cycle. The cycle is turned into , for instance.
Applying this procedure to every cycle of , we obtain the set:We can now flatten a level of this set and turn it into an ordered list sorted lexicographically by neighbourhood. This procedure yields the rule table shown in Table 2.
The core of a template for CAs invariant to can now be found by compressing this rule table into its -ary form:Remember from Definition 5 that any permutation can be represented by an algebraic function, which is the actual representation used by the algorithm. We use the notation here since it is compact and serves the explanation’s purpose.
The same procedure can now be repeated for every permutation of the set, essentially mapping each permutation of the set to a corresponding template of CAs invariant to that permutation. It is now only a matter of intersecting all of the templates found, and the result is a template that represents all colorblind rules of the space defined by and .
When applied to and , we obtainwhereas, for and , the result becomes
6. A Detailed Example
Here we discuss a detailed application for the template framework presented in this paper, which is to find the rules that share a set of static properties. This can be achieved with the template builder functions provided with CATemplates, or one could implement custom builder functions on top of the core concepts provided by the package. What follows is a sample of how the framework can be used to conduct an experiment of this sort.
More specifically, let us suppose we are interested in the rules which are both totalistic and captive. This might come from a purely theoretical interest, or motivated by the need for obtaining rules of this type for some practical application.
We then start by building the templates for totalistic and captive rules of the elementary space, as shown in the previous sections ( and ). By performing their intersection, we end up with a template representing all totalistic and captive rules of the elementary space, as follows:
Upon expansion, this template yields the 4 totalistic elementary CAs which are also captive: . Notice that the template being expanded has only 2 variables, which means the expansion has to consider only 4 expansion candidates, which is a substantially smaller subset of the original space, which has 256 rules.
Since the elementary space is a small one, let us perform the same example in larger spaces. We can generate the equivalent templates for the space defined by and and perform the intersection between them. The result is
Notice that this template also has two variables: and . This means there are only possible expansions for this template, from which some will be filtered out because of the variable assignment annotations. After expansion, this template yields the 4 totalistic rules of the space which are also captive: .
This means that we took a space with rules and found out that only of those share the totality and captivity properties, all without actually enumerating the whole space (which would be not feasible, given its size). Notice that this space could be further reduced, by intersecting this resulting template with templates from other properties, like color blindness.
Extending the previous case, we may now ask the general question of up to which rule space size could we still manage to get access to totalistic and captive rules. Without templates, the rules would have to be obtained directly by scanning the rule space and selecting those having the two properties. But with this approach would already be impractical even for on a standard personal computer, since the space has rules. A first alternative, now using templates, could be accessing the rules, say, by first expanding the totalistic rules directly from the corresponding template and then filtering out the captive ones. This certainly helps. In fact, by doing so, progressively, starting with radius and increasing its value in steps of , in a standard personal computer it would hardly be possible to reach beyond (which corresponds to a space with rules), because of the substantial increase in computational time as we would go from a given to its subsequent value. We omit actual values of processing time here, as this may strongly vary among different machine architectures and their software environment.
However, by relying on the generation of the individual templates of each property and expanding the intersection between them, we easily access spaces up to (possibly even beyond), which contains rules. It turns out that, in this space, only rules share the two properties, an extremely smaller space to reason about.
Furthermore, the analysis of all the data generated from the previous experiment suggests that the number of rules with and the shared properties of totality and captivity seems to be given by for symmetric rules (those with integer radius), whereas no rule would be present for asymmetric rules. This is quite a remarkable general result, derived from direct probing of the corresponding rule spaces that the full usage of templates allowed us.
As a final note, it is worth emphasising that template expansion is only made when the actual rules represented in a template are needed, which is at the end of the process of answering which rules satisfy a given set of properties. Until then, it suffices to operate directly with the templates; this is where the conciseness of template usage lies. And although expansion may be computationally intensive, it is certainly much less than if the entire corresponding spaces would have to be manipulated directly all the way.
7. Concluding Remarks
Searching for cellular automata with specific behaviours (such as global problem solvers) is a daunting task for anyone looking further than the elementary space.
In this paper, we presented the current state of cellular automata templates, a valuable ally in this front. We have described what templates are and how the two currently implemented operations (expansion and intersection) work, went into details of the implementations of template builder functions for captive, totalistic, outer-totalistic, and colorblind rules, and have shown a sample application of the framework established here.
The sample application has led us to the discovery that only a handful of CAs share both of the properties of totality and captivity (only 64 rules on the , space, for instance). This little experiment shows how the proposed framework can be used as a means to sieve through very large spaces when searching for CAs that present a given behaviour.
As mentioned in distinct parts of the text, the notion of templates and the implementation of the computational system to support it underwent a long way since its origin, up to its current degree of structural maturity.
The natural course from here is to develop new template builders and whichever other operations we might conceive. More concretely with respect to the latter, we should say that during the last couple of years we have been investigating the notion of “difference” between templates, an operation whose output would yield another template representing the rules that have the property associated with the first template, but not having the property associated with the second. In spite of a conference publication we have on the topic (see ), it is not yet mature to go into the publicly available package. But in due time, we intend to do so.
As for new template builders, a generalisation of one to handle arbitrary values of symmetry by conjugation is more pressing. As mentioned earlier, we decided not to include this template builder mostly because the existing one cannot yet handle arbitrary number of states in the case of conjugation. However, noticing that the notion of color blindness is essentially the notion of rules with maximum symmetry by conjugation, generalised for any -state rule, using the same idea implemented for color blindness it is now possible to face the generalisation of arbitrary values of symmetry by conjugation. This is clearly future work to be done.
Also, it is tempting to add completely new template builders to the present package, referring to other parameters, like those in . In fact, we hope that this paper triggers collaborative participation from the cellular automata community in terms of both the system’s expansion and its use in applications. This is why we decided to keep the work in GitHub, publicly available.
As for the possibility of extending the framework to support rules in higher dimensions, we would say this would be readily possible for all current properties but one: number conservation. This is due to the fact that the underlying algorithm we used to implement the corresponding template builder comes from , which is restricted to one-dimensional rules. In order to change that, a general algorithm would have to be used, quite likely the one described in . This is certainly feasible and desirable, but we had not yet had the opportunity to go about that.
The data used to support the findings of this study are available from the corresponding author upon request, and the CATemplates Mathematica package, directly from GitHub .
Conflicts of Interest
The authors declare that they have no conflicts of interest.
The authors are grateful to financial support from IPM (Instituto Presbiteriano Mackenzie) and CAPES (Coordenação de Aperfeiçoamento de Pessoal de Nível Superior, Brazil), by means of STIC-AmSud (CoDANet) project no. 88881.197456/2018-01 and PrInt project no. 88887.310281/2018-00.
- S. Wolfram, A New Kind of Science, Wolfram Media Inc, 2002.
- J. L. Zapotecatl, D. A. Rosenblueth, and C. Gershenson, “Deliberative self-organizing traffic lights with elementary cellular automata,” Complexity, vol. 2017, Article ID 7691370, 15 pages, 2017.
- D. Wolz and P. P. B. de Oliveira, “Very effective evolutionary techniques for searching cellular automata rule spaces,” Journal of Cellular Automata, vol. 3, no. 4, pp. 289–312, 2008.
- I. Barragan-Vite, J. C. Seck-Tuoh-Mora, N. Hernandez-Romero, J. Medina-Marin, and E. S. Hernandez-Gress, “Distributed control of a manufacturing system with one-dimensional cellular automata,” Complexity, vol. 2018, Article ID 7235105, 15 pages, 2018.
- J. Yang, W. Liu, Y. Li, X. Li, and Q. Ge, “Simulating intraurban land use dynamics under multiple scenarios based on fuzzy cellular automata: a case study of Jinzhou District, Dalian,” Complexity, vol. 2018, Article ID 7202985, 17 pages, 2018.
- H. Betel, P. P. B. De Oliveira, and P. Flocchini, “Solving the parity problem in one-dimensional cellular automata,” Natural Computing, vol. 12, no. 3, pp. 323–337, 2013.
- M. Bidlo, “On routine evolution of complex cellular automata,” IEEE Transactions on Evolutionary Computation, vol. 20, no. 5, pp. 742–754, 2016.
- P. de Oliveira and M. Verardo, “Representing families of cellular automata rules,” The Mathematica Journal, vol. 16, no. 8, 2014.
- Wolfram Research, “Wolfram mathematica 11,” http://www.wolfram.com/mathematica/, 2018.
- M. Verardo and P. P. B. de Oliveira, “CATemplates,” https://github.com/mverardo/CATemplates, 2019.
- P. P. B. de Oliveira, “On density determination with cellular automata: Results, constructions and directions,” Journal of Cellular Automata, vol. 9, no. 5-6, pp. 357–385, 2014.
- P. P. B. de Oliveira and M. Verardo, “Template based representation of cellular automata rules,” in Proceedings of the Exploratory Papers - AUTOMATA 2014 - 20th International Workshop on Cellular Automata and Discrete Complex Systems, T. Isokawa, K. Imai, N. Matsiu, F. Peper, and H. Umeo, Eds., pp. 199–204, 2014.
- G. Theyssier, “Captive cellular automata,” in Mathematical Foundations of Computer Science, vol. 3153 of Lecture Notes in Computer Science, pp. 427–438, 2004.
- V. Salo and I. Törmä, “Color blind cellular automata,” in Cellular Automata and Discrete Complex Systems, J. Kari, M. Kutrib, and A. Malcher, Eds., pp. 139–154, Springer, Heidelberg, Berlin, 2013.
- Z. Soares, M. Verardo, and P. P. de Oliveira, “The difference operation between templates of binary cellular automata,” in New Advances in Information Systems and Technologies, Á. Rocha, A. M. Correia, H. Adeli, L. P. Reis, and M. M. Teixeira, Eds., vol. 444 of Advances in Intelligent Systems and Computing, pp. 707–715, Springer International Publishing, Cham, Swizerland, 2016.
- G. M. Oliveira, P. P. Oliveira, and N. Omar, “Definition and application of a five-parameter characterization of one-dimensional cellular automata rule space,” Artificial Life, vol. 7, no. 3, pp. 277–301, 2001.
- N. Boccara and H. Fuks, “Number-conserving cellular automaton rules,” Fundamenta Informaticae, vol. 52, no. 1-3, pp. 1–13, 2002.
- B. Durand, E. Formenti, and Z. Róka, “Number-conserving cellular automata I: decidability,” Theoretical Computer Science, vol. 299, no. 1-3, pp. 523–535, 2003.
Copyright © 2019 Mauricio Verardo and Pedro P. B. de Oliveira. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.