Controlled generation of two-dimensional patterns based on Stochastic Cellular Automata

Controlled generation of two-dimensional patterns based on Stochastic Cellular Automata

Future Generation Computer Systems 18 (2002) 973–981 Controlled generation of two-dimensional patterns based on Stochastic Cellular Automata Stefania...

153KB Sizes 0 Downloads 10 Views

Future Generation Computer Systems 18 (2002) 973–981

Controlled generation of two-dimensional patterns based on Stochastic Cellular Automata Stefania Bandini, Giulio Pavesi∗ Department of Computer Science, Systems, and Communication, University of Milan-Bicocca, via Bicocca degli Arcimboldi 8, 20126 Milan, Italy

Abstract We present a computational model for the controlled generation of two-dimensional patterns based on Stochastic Cellular Automata. In particular, the approach we propose allows to keep under control both the shape and the size of the patterns generated. Moreover, the model allows to generate either a single pattern, or many different patterns within the same Automaton. Finally, we show how the model has been applied to the parametric generation of artificial percolation beds in the case of carbon black filled in a rubber primary material. © 2002 Elsevier Science B.V. All rights reserved. Keywords: Stochastic Cellular Automata; Pattern generation; Percolation beds

1. Introduction We present a computational model based on Stochastic Cellular Automata for the controlled generation of two-dimensional patterns, that allows to keep under control the morphological properties (shape and size) of the patterns produced. The cells of the Automaton can assume two states: empty or occupied. Patterns are formed by adjacent occupied cells (components), and are dynamically generated starting from a single occupied cell that assumes the role of an initial seed, while the remaining cells of the Automaton are empty. When the Automaton is started the seed starts growing, with a process similar to cell mitosis, and generates new components into adjacent free cells. The reproductive potential of the seed is expressed with an integer number of reproductive abilities, that determines the final size of the pattern. Each reproduction ∗ Corresponding author. E-mail addresses: [email protected] (S. Bandini), [email protected] (G. Pavesi).

uses one reproductive ability; therefore, the maximum number of components that can be generated equals the number of reproductive abilities assigned to the initial seed. A newly generated component inherits some reproductive abilities from its parent component, becoming in this way able to produce offspring components by itself. Once a cell has become occupied by a component, it cannot revert its state back to empty. The choice of the neighboring cells that will contain a new component, that is, the choice of the direction of growth of the pattern, is controlled by a probabilistic mechanism that can be fine tuned in order to obtain patterns of different shapes. Because of the probabilistic nature of the Automaton, each evolution produces (with high probability) a different pattern. Anyway, the patterns generated with the same probability distribution have the same macroscopic properties, that is, look similar to the human eye. More in detail, we adopted a two-dimensional Cellular Automaton with a von Neumann neighborhood. As already mentioned, each cell can be empty or

0167-739X/02/$ – see front matter © 2002 Elsevier Science B.V. All rights reserved. PII: S 0 1 6 7 - 7 3 9 X ( 0 2 ) 0 0 0 7 6 - 6

974

S. Bandini, G. Pavesi / Future Generation Computer Systems 18 (2002) 973–981

occupied by a component; occupied cells can contain an integer number of reproductive abilities, split in four portions corresponding to the four neighbors. The probabilistic transition function divides the reproductive abilities of a component among the four portions, according to a given distribution. The higher is the probability assigned to a portion, the more likely is the pattern to expand in that direction. The Automaton can be initialized with more than one seed. In this case, each pattern is characterized by a different id number. A cell can belong to only one pattern, and all the cells belonging to the same pattern have the same id number. A different number of reproductive abilities, and different growth probabilities can be assigned to each seed, in order to obtain patterns of different size and shape within the same Automaton. Whenever an empty cell has neighbors with different id numbers trying to generate a new component in its position, its occupation is determined by competition among candidate parents. The multi-seed model has been applied to the generation of artificial percolation beds, that is, porous media. Among the issues arising in the design and development of computer environments for the simulation of percolation processes in porous media, the representation of the medium (the percolation bed) is crucial. The choice of the initial position of the seeds and their properties determines both the macroscopic (that is, the position of the different aggregates forming the bed) and the microscopic (that is, the shape and the size of the aggregates) properties of the percolation bed obtained with the Automaton. In particular, we show how the model has been successfully applied to the generation of percolation beds of carbon black rubber compounds.

Fig. 1. The von Neumann neighborhood of cell (i, j ).

• Q = ID, ROT, CAP, P is the finite set of the values of variables of state, where: ◦ ID is the cell identifier, 0 in case of an empty cell, 1 otherwise; ◦ ROT is a rotation parameter defining whether, when, and how probabilities can be exchanged among the four directions; ◦ CAP = N, E, S, W  are integers representing the number of reproductive abilities, respectively, towards north, south, west, east; ◦ P = P N , P E , P S , P W  are the probabilities of directing the reproductive abilities towards north, south, west or east, that is, the probabilities associated withthe four possible directions of growth, such that i∈{N,E,S,W } P i = 1. • f : Q × Q|H | → Q is the transition function; • I : R → Q is the initialization function. The structure of a cell of the Automaton is shown in Fig. 2. From now on, we will refer with C(i, j )

2. The single-pattern model We give now the formal description of the Automaton, defined in order to generate a single pattern. The Cellular Automaton is defined by a 5-tuple CA = R, H, Q, f, I , where: • R = {(i, j )|1 ≤ i ≤ N ; 1 ≤ j ≤ M; N, M ∈ N }, is a two-dimensional N × M lattice; • H is the von Neumann neighborhood (see Fig. 1);

Fig. 2. The structure of a cell of the Automaton.

S. Bandini, G. Pavesi / Future Generation Computer Systems 18 (2002) 973–981

to the cell located at coordinates (i, j ), with ID(i, j ) to its identifier, with ROT(i, j ) to its rotation parameter, with N(i, j ), S(i, j ), W (i, j ), E(i, j ) to the reproductive abilities of its four portions, with P N (i, j ), P S (i, j ), P W (i, j ) and P E (i, j ) to the growth probabilities. The initialization function I picks a cell, usually located in the center of the Automaton, sets its ID to one (it becomes occupied), and sets its parameters corresponding to the number of reproductive abilities, the growth probabilities, and the rotation parameter. The transition function f is the composition of three functions. Therefore, f = r ◦ h ◦ g, where g : Q × Q|H | → Q is defined as follows: g(C(i, j ), S(i − 1, j ), N (i + 1, j ), 

W (i, j + 1), E(i, j − 1)) = C (i, j ) with C (i, j ) = ID (i, j ), ROT (i, j ), CAP (i, j ), ˆ j ), where: P(i, ID (i, j ) = ID(k, l), ROT (i, j ) = ROT(k, l), ˆ j ) = P(k, l). P(i, If ID(i, j ) = 0, (k, l) are the coordinates of the cell corresponding to the maximum of {N (i + 1, j ), S(i − 1, j ), W (i, j + 1), E(i, j − 1)} (the highest bidder among the neighbors). Otherwise, (k, l) = (i, j ). That is, if an empty cell has at least one neighbor with ID set to one, and able to reproduce in its direction, it becomes occupied. Otherwise, the ID does not change, and remains one or zero. Also, an occupied cell (newly or not) collects reproductive abilities from occupied neighbors. That is:  S(i − 1, j ) if ID (i, j ) = ID(i − 1, j ),  N (i, j )= N (i, j ) otherwise. If the ID of the cell at the previous step was zero (that is, the cell has just become occupied), the number of the reproductive abilities inherited from the parent neighbor (at least one) is decreased by one unity, used by the cell (i, j ) itself to become occupied. The function h : Q → Q is defined in the following way: h(C(i, j )) ˆ j ), = ID (i, j ), ROT (i, j ), CAP (i, j ), P(i,

975

ˆ j ) = P(i, j ), and where ID (i, j ) = ID(i, j ), P(i, ROT (i, j ) = ROT(i, j ) (identifier, probabilities, and rotation parameters do not change). The actual change takes place in the distribution in the four portions of the reproductive abilities collected at the previous step (if any). That is, given TN = N (i, j )+S(i, j )+W (i, j )+ E(i, j ), we have: TN 



N (i, j ) =

k=1

rkN ,

where rkN are TN random variables such that ∀rkN , Pr[rkN = 1] = P N (i, j ). Then, set TS = TN −N  (i, j ), we have: S  (i, j ) =

TS  k=1

rkS ,

where ∀rkS , Pr[rkS = 1] = PS (i, j ). In the same way, given TW = TN − S  (i, j ), 

W (i, j ) =

TW  k=1

rkW

with ∀rkW , Pr[rkW = 1] = P W (i, j ). Finally, given TE = TW − W  (i, j ): E  (i, j ) = TE . If ROT = 0, probabilities never change, and the function r : Q → Q is the identity function. The consequence is that the growth of the pattern follows the initial growth probabilities assigned to the starting seed. For example, if the probabilities are 1/4 in each direction, the result is the uniform growth of the pattern in the four directions, with a result that looks circular, as will be shown later. Different simulations would lead (with high probability) to a slightly different result, that anyway would still look circular to the human eye. Instead, if we set P N = P S , and P E = P W , the result is an ellipse, where the ratio between the east–west and north–south probabilities approximately equals the eccentricity e of the ellipse. If ROT > 0 probabilities change exactly every ROT step. More in particular, probabilities are rotated (clockwise) by the function r, that chooses the angle (0 ◦ , 90 ◦ , 180 ◦ , 270 ◦ ) at random. For example,

976

S. Bandini, G. Pavesi / Future Generation Computer Systems 18 (2002) 973–981

let Pt (i, j ) the probabilities of a given cell at step t, Pt+1 (i, j ) the probabilities at step t + 1, and ROT mod t = 0. Let the angle chosen by the function r be 90 ◦ . We have: Pt+1 (i, j ) = r(Pt (i, j )) = PtW (i, j ), PtN (i, j ), PtE (i, j ), PtS (i, j ). Probability rotations produce more irregular patterns, and have been introduced in order to reproduce the shape of carbon black aggregates, as we will show later. However, it is straightforward to see that the update rule could be further modified; e.g., one should redefine probabilities every ROT step instead of simply rotating them. The rules we introduced had mainly the aim of generating patterns similar to the ones found in the percolation beds we studied, in order to reproduce their morphology.

3. The multi-pattern model In order to have more than one pattern growing within the same Automaton, we have to make some changes in the model introduced in the previous sections. The user has now to define the different classes of patterns (each one corresponding to a different probability distribution) he wants to generate, the size of the patterns belonging to each class (usually picked at random between minimum and maximum values), and how many patterns he wants for each class (the exact number, or assigning a probability value to each class). The initialization function has now to plant more than one seed; this can be simply implemented by choosing a cell at random, checking whether it is occupied or not, and, in the latter case, defining the initial parameters of the seed according to the user’s input. An occupied cell can belong to only one pattern. In order to recognize which pattern a cell belongs to, the ID is now defined by an integer (greater than zero, not greater than the number of the patterns). Each pattern is therefore formed by cells with the same ID. The ID is assigned to the patterns by the initialization step, that simply gives a different ID number to each seed. An empty cell can now have neighbors belonging to different patterns trying at the same time to expand towards its direction. The transition function has therefore to be modified in order to solve this conflict. The

idea is simple: the cell takes the ID of the highest bidder, that is, the neighbor which has more reproductive abilities in the portion adjacent to the empty cell. Also, occupied cells can trade abilities with neighbors with the same ID. The transition sub-function g therefore becomes: g(C(i, j ), S(i − 1, j ), N (i + 1, j ), W (i, j + 1), E(i, j − 1)) = C (i, j ) with C (i, j ) = ID (i, j ), ROT (i, j ), CAP (i, j ), ˆ j ), where: P(i, ID (i, j ) = ID(k, l), ROT (i, j ) = ROT(k, l), ˆ j ) = P(k, l). P(i, If ID(i, j ) = 0 and ROT(i, j ) = 0, (k, l) are the coordinates of the cell corresponding to the maximum of {N (i + 1, j ), S(i − 1, j ), W (i, j + 1), E(i, j − 1)} (the highest bidder among the neighbors). Otherwise, (k, l) = (i, j ). Also,  S(i − 1, j ) if ID (i, j ) = ID(i − 1, j ),  N (i, j ) = N (i, j ) otherwise. The terms S  (i, j ), W  (i, j ) and E  (i, j ) are defined in a similar way. As in the single-pattern case if ID(i, j ) = 0, the abilities in the portion corresponding to the parent cell are decreased by one.

4. Artificial percolation beds Percolation processes have been deeply studied both from theoretical [1] and application [2] viewpoints. Percolation theory comprises and offers formal frameworks for the creation of abstract, analytical, and computational models dealing with a wide range of phenomena (e.g., the expansion of galaxies [3], the spreading of epidemics on a territory [1], the simulation of liquids flow through porous media [4,5], visco-elastic properties in rubber compounds [6], and so on). The computer simulation of percolation phenomena occurring in porous media is a challenging problem, involving several computational models and techniques, from finite elements algorithms to Cellular

S. Bandini, G. Pavesi / Future Generation Computer Systems 18 (2002) 973–981

Automata [7]. Among the problems arising in the design and development of computer environments for the simulation of percolation in porous media, the representation of the medium (percolation bed) is a crucial issue. Many sophisticated techniques have been developed and used so far to study and model various morphological properties of porous media and their elementary components (e.g., particles, grains, spheres, and aggregates of them). Such properties regard some relevant aspects of the morphology, namely, the geometrical properties, the general shape of the elementary components or aggregates, their granulometric distribution in case of non-uniform percolation beds, and their local properties (like local concentration and local patterns). The main goal of the random generation techniques usually adopted in the computer generation of artificial percolation beds, is to keep the total concentration under control, in most of the cases disregarding the morphological properties. The problem of capturing morphological properties in artificially generated percolation beds requires the creation of computational models able to keep under control the generation process of the constituents of the porous medium. Also, they must explicitly capture some results derived from the application of analysis and measurement techniques developed experimentally (that is, the morphological aspects and the scaled size and distribution of components or aggregates). A computer-based support system for the generation of artificial percolation beds of carbon black taking into account morphological properties, size and distribution must allow the parametric definition of the categories and the density. Also, the drawing of ideal (virtual) percolation beds has to be possible, combining different categories and/or different density areas. The experimentation of particular global configurations of a percolation bed is a crucial issue in the design of new products. In the case of carbon black rubber compounds, these kinds of virtual percolation beds can be integrated with CA-based computer simulators [6], in order to simulate the dynamic behavior of visco-elastic properties (whose role in tire production is very meaningful). Another application of this generator of percolation beds concerning the simulation of percolation processes of pesticides in soil is described in [8]. Also in the case of coffee industry, such kind of computational

977

environment has been integrated with CA-based applications [5].

5. Patterns of aggregates of carbon black Reinforcement materials are widely used in rubber compounds employed by tire producers. The most important reinforced material used in tires is carbon black. Carbon black is made mainly of carbon obtained by the combustion of natural or artificial substances, with a very high ratio between surface and volume. Carbon black is made of a large number of primary particles, whose size usually ranges from 10 to 100 nm, and aggregates, made of primary particles merged together. Carbon black is characterized by different properties. The most relevant are shape, size, and the distribution of the aggregates. Although carbon black is a very important matter for industry, the physical structure of its beds has not been studied yet. At the moment, it is only possible to obtain some two-dimensional images at the microscope, that show a very complex overall shape (the percolation bed). Even though available data are not sufficient in order to manage the global structure of the bed, a complete comprehension of geometrical characteristics of single aggregates is now completely explored [9]. The shape of the aggregates is directly determined by means of particular measurements obtained by electronic microscopy, or indirectly by means of measurements of the volume of internal voids located into the aggregate. Since the complexity of the shape of aggregates is directly proportional to the presence of internal emptiness, it is possible to measure the volume of empty spaces by measuring the absorbing properties (DBPA adsorption test [10]), and the specific volume (24M4 crushed DBP test [11]). The main shapes of aggregates are represented by standard patterns and have been classified in four categories: spherical, ellipsoidal, linear, and branched (Fig. 3). The size and the distribution of the aggregates directly determine the surface area: the reinforcement power grows with the decrease of the size of particles composing aggregates. The smaller are the particles, the more extended and articulated is the surface area, that is, the homogeneity and the compactness of the rubber compound are higher [9].

978

S. Bandini, G. Pavesi / Future Generation Computer Systems 18 (2002) 973–981

Fig. 3. The four classes of carbon black patterns.

6. Experimental results The rules defined in the previous sections can be informally summed up as follows: empty cells collect abilities from the highest bidder among the neighbors, and distribute them in the four directions according to the corresponding probabilities. One ability is used before distributing the remaining ones. Occupied cells collect abilities from neighbors with the same identifier, and redistribute them in the four directions. By applying different distribution rules, it is possible to obtain aggregates with different shape. In the following are described the main categories of patterns obtained with the model, corresponding to carbon black main shapes. 6.1. Spherical The first category of carbon black aggregates has a spherical shape. The pattern is regular, and extends uniformly in every direction starting from an ideal

center. Our rule reflects this feature, with uniform probability of growth in each direction (1/4). Fig. 4 shows an example of growth of a spherical pattern. 6.2. Ellipsoidal Even if the name is quite counterintuitive, carbon black aggregates corresponding to category 2 are called ellipsoidal. Their overall structure can be seen as composed of many different ellipses merged together. In order to obtain an ellipsoidal pattern, growth probabilities are equal in the opposite directions (P N = P S and P W = P E ). The ratio between the east–west and the north–south probabilities approximates the eccentricity e of the ellipse. An example is shown in Fig. 5. Two directions have probability 1/(2e + 2), while the other two have probability e/(2e + 2). If e = 1, we obtain again a spherical aggregate. To obtain many ellipses merged together, the probabilities are swapped between north–south and east–west as defined in the previous section every

S. Bandini, G. Pavesi / Future Generation Computer Systems 18 (2002) 973–981

979

Fig. 4. Category 1: growth of a seed with 5000 reproductive abilities, at step 5, 10, 50, 100, 200, and 500. Probabilities are set to 1/4 in each direction.

Fig. 5. Category 2: growth of a seed with 5000 reproductive abilities, e = 1.5, at step 5, 10, 50, 100, 200, and 500 (probabilities are not changed).

four updates, by setting appropriately the ROT parameter. Fig. 6 shows an example of the result, while Fig. 7 shows ellipsoidal aggregates of carbon black. It is possible to see the similarity between the original patterns and the ones generated by the model.

This result can be obtained by the user, by setting probabilities such that P N + P S is much greater than P W + P E , or vice versa. In this case, empty cells are more quickly occupied by the growing aggregate. An example is shown in Fig. 8.

6.3. Linear

6.4. Branched

The third category has linear shape, that is, a narrow structure extending along two opposite directions.

Aggregates of category four (branched) have a complex and asymmetrical structure, and were the most

Fig. 6. Category 2: growth of a seed with 5000 reproductive abilities, e = 6, at step 5, 10, 50, 100, 200, and 500 (probabilities are rotated every four steps).

980

S. Bandini, G. Pavesi / Future Generation Computer Systems 18 (2002) 973–981

Fig. 7. Patterns formed by real carbon black aggregates of category two (ellipsoidal).

Fig. 8. Patterns of category three, P = {0.7, 0.03, 0.25, 0.02}.

Fig. 9. Patterns of category four, P = {0.85, 0.07, 0.01, 0.07} and rotation every four update steps.

difficult to reproduce. The four probabilities are set by the user, without any restriction as in the previous cases. Moreover, in order to give to the aggregate a more irregular shape, they are rotated every k steps. Some results are shown in Fig. 9.

7. Conclusions Among the problems arising in the design and development of computer environments for the simulation of percolation in porous media, the correct

S. Bandini, G. Pavesi / Future Generation Computer Systems 18 (2002) 973–981

representation of percolation beds is a crucial issue. The model we presented, that controls both the properties of single components and their overall position, can provide an efficient tool for this task, as shown in this work for the case of carbon black rubber compounds. References [1] D. Stauffer, A. Aharony, Introduction to Percolation Theory, Taylor & Francis, London, 1992. [2] M. Sahimi, Applications of Percolation Theory, Taylor & Francis, London, 1994. [3] P.E. Seiden, L.S. Schulman, Adv. Phys. 39 (1990) 1. [4] S. Succi, E. Foti, F. Higuera, Simulation of three-dimensional flows in porous media with the lattice Boltzmann method, Europhys. Lett. 10 (1989) 5. [5] C. Borsani, G. Cattaneo, V. de Mattei, U. Jocher, B. Zampini, 2D and 3D lattice gas techniques of fluid-dynamic simulations, in: S. Bandini, R. Serra, F. Suggi Liverani (Eds.), Cellular Automata: Research Towards Industry, Springer, Berlin, 1998. [6] S. Bandini, M. Magagnini, Parallel simulation of dynamic properties of filled rubber compounds based on cellular automata, Parall. Comput. 27 (2001) 5. [7] M. Sahimi (Ed.), Flow Phenomena in Rocks: From Continuum Models to Fractals, Percolation, Cellular Automata and Simulated Annealing, Rev. Mod. Phys. 65 (1993) 4. [8] S. Bandini, G. Mauri, G. Pavesi, C. Simone, A parallel model based on cellular automata for the simulation of pesticide percolation in the soil, in: V. Malyshkin (Ed.), Parallel

981

Computing and Technologies, Lecture Notes in Computer Science, Vol. 1662, Springer, Berlin, 1999. [9] F.W. Billmeyer Jr., Textbook of Polymer Science, Wiley, New York, 1984. [10] H.G. Kilian, H. Schenk, S. Wolff, Colloid Polym. Sci. 265 (1987) 410. [11] E.M. Dannenberg, Rubber Chem. Technol. 48 (1975) 410.

Stefania Bandini is Assistant Professor and Director of the Knowledge Engineering Lab at the Department of Computer Science of the University of MilanBicocca. Her research activity concerns two main topics: artificial intelligence and expert systems (case based and qualitative reasoning, knowledge representation and management, dynamics of intelligent systems), and discrete dynamical systems (Cellular Automata-based models and systems).

Giulio Pavesi received his degree in Computer Science from the University of Milan in 1998, and is currently completing his PhD at the University of Milan-Bicocca. His research interests include computational biology, neural networks, genetic algorithms, and discrete models of complex systems.