*2.1. Classification Type Problems*

In a number of recent papers, it has been shown that networks of interacting chemical oscillators can be trained to perform classification tasks with reasonable accuracy [45,46,49]. Let us consider a problem *A* defined by a set of records *DA* = {*rn*, *n* = 1, *N*}. Each record *rn* = (*p*<sup>1</sup> *<sup>n</sup>*, *p*<sup>2</sup> *<sup>n</sup>*, ... , *p<sup>k</sup> <sup>n</sup>*,*sn*) is in the form of a (*k* + 1) tuple, where the first *k* elements are predictors represented by real numbers, and the last element (*sn*) is the record type, and it is represented by an integer. It is assumed that the number of possible predictor values is limited. Let *DA* denote a database of records related to problem *A*. The classifier of *DA* is supposed to return the correct data type if the predictor values are used as its input.

There are classification problems for which *DA* is finite. For example the AND logic gate is equivalent to classification of the database: *DA* = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {1, 1, 1}}. In this paper, I consider a geometrically inspired problem of determining the color of a randomly selected point located on the Japanese flag (cf. Figure 1). The red disk (sun) is centrally located in a white square (here represented by the Cartesian product [−0.5, 0.5] × [−0.5, 0.5]). Let us notice that the location of the Japanese flag differs from the one considered in our previous paper on the problem [47] where it was [0.0, 1.0] × [0.0, 1.0]. This has been done intentionally to see if object location can influence classifier accuracy. The disk radius is *r* = 1/ -(2*π*); thus, the areas of the sun and the white region are equal. Records of the considered problem have the form: (*x*, *y*,*s*), where (*x*, *y*) ∈ [−0.5, 0.5] × [−0.5, 0.5] are the point coordinates, and the record type *s* ∈ {0, 1} tells if the point (*x*, *y*) is located in the red *s* = 1 or in the white region *s* = 0. A network that gives a random answer or a network that always gives the same answer ("the point is red" or "the point is white") to all inputs solves the problem with 50% accuracy (or with a 50% chance of obtaining the wrong answer). I postulate that the Japanese flag problem can be solved with much higher accuracy by a network of chemical oscillators.

**Figure 1.** The geometrically inspired problem of determining the color of a randomly selected point located on the Japanese flag formed by the central red disk and the surrounding white area. The flag is represented by the Cartesian product [−0.5, 0.5] × [−0.5, 0.5]), and the disk radius is *r* = 1/ -(2*π*); thus, the areas of the sun and the white region are equal.

#### *2.2. The Node Model*

Before applying the top-down network optimization strategy, we should select the medium that is supposed to perform the classification. Here I use the two-variable Oregonator model [50] of the BZ reaction to describe the time evolution of an individual oscillator. The model equations are:

$$\frac{du}{dt} = \frac{1}{\varepsilon}(u(t) - u(t)^2 - (fv(t) + \phi(t))\frac{u(t) - q}{u(t) + q}) - au(t) \tag{1}$$

$$\frac{dv}{dt} = -u(t) - v(t) \tag{2}$$

where *u* and *v*, respectively, represent concentrations of the reaction activator *U* corresponding to *HBrO*<sup>2</sup> and inhibitor *V* that in the two-variable Oregonator model is the oxidized form of the catalyst. The time evolution of a medium where the BZ reaction proceeds is determined by the values of parameters: *f* , *q* and *ε*. The parameter *ε* sets up the time scale ratio between variables *u* and *v*, *q* is the scaling constant, and *f* is the stoichiometric coefficient. The time-dependent function *φ*(*t*) that appears in Equation (1) is related to medium illumination. The Oregonator model is computationally simple, and it allows for performing complex evolutionary optimization involving the massive number of evaluations of network evolution needed for evolutionary optimization. It takes into account the effect of the combined excitation of one node by a few neighbors. Despite its simplicity, the Oregonator model provides a better-than-qualitative description of many phenomena related to the BZ reaction. It correctly describes the oscillation period as a function of reagent concentration and also can be used to simulate nontrivial phenomena such as the migration of a spiral in an electric field [51] or reaction of a propagating pulse to time-dependent illumination [52]. Of course, a model with a larger number of variables gives a more realistic description of the BZ reaction but, on the other hand, requires a more precise model of interactions between oscillators.

The last term in Equation (1) describes the activator decay, and it does not appear in the standard form of the Oregonator model. This term can be related to a reaction:

$$
\ell I + D \to \text{products} \tag{3}
$$

where *D* describes the other reagents of the process that occur with the rate *α*. As I discuss later, the existence of this process is equivalent to the presence of a "sink" node in the network that adsorbs the activator molecules.

The reported simulations of network evolution have been performed for two different sets of Oregonator model parameters. The time evolution in one of the considered networks is described by Model I: *ε* = 0.2, *q* = 0.0002 and *f* = 1.1, which was used in the previous study on the color of a point on the Japanese flag [47]. For this set, the period of oscillations is ∼10.7 time unit if *φ*(*t*) = 0. The optimization of other networks was done for the Oregonator Model II defined by: *ε* = 0.3, *q* = 0.002 and *f* = 1.1. The period of oscillations is ∼8 time unit for *φ*(*t*) = 0. The character of activator and inhibitor oscillations for the above-mentioned models and *α* = 0.7 or *α* = 0.5 is illustrated in Figure 2. For both sets of parameters, the system converges to a stable stationary state for *φ* ∼ 0.2 [25,53].

**Figure 2.** (**a**) Time-dependent illumination *φ*(*t*)=(1.001 + tanh(−10 ∗ (*t* − *tillum*)))/10 for *tillum* = 5. (**b**,**c**) The character of oscillations for the 2-variable Oregonator models used in simulations: (**b**) Model II: *f* = 1.1, *q* = 0.002, = 0.3; (**c**) Model I: *f* = 1.1, *q* = 0.0002, = 0.2. Red and blue curves represent concentrations of activator (u) and inhibitor (v), respectively. The values of *α* are 0.5 (**b**) and 0.7 (**c**).

The value of *φ* can be interpreted as the light intensity in the Ru-catalyzed BZ reaction, and it can be used as an external factor to suppress or restore oscillations. For the control of computing networks discussed below, I considered *φ*(*t*) in the form:

$$\phi(t) = \mathcal{W} \cdot \left(1.0 + \eta + \tanh\left(-\mathfrak{J} \cdot (t - t\_{illum})\right)\right) \tag{4}$$

Such a definition of *φ*(*t*) involves a few parameters: *W* and *η* determine the limiting values of illumination at *t* → ±∞. The value of illumination time *tillum* defines the moment of time when the most rapid changes in illumination occur, and *ξ* represents the rate at which the transition occurs. The minus sign in the argument of the tanh() function implies the transition from steady state (high illumination) towards oscillations (low illumination). In the presented simulations, I used fixed values: *W* = 0.1, *η* = 0.001 and *ξ* = 10. For such parameters, the value of *φ*(*t*) is high (∼0.2) in the time interval [0, *tillum* − *δ*] (*δ* = 0.1) (cf. Figure 2a). Oregonator models with parameters given above predict stable steady state. For long times (*t* > *tillum* + *δ*), the value of *φj*(*t*) approaches 0.0001, which corresponds to oscillations.

The use of illumination time (or, in general, the inhibition time for oscillations inside a node) *tillum* to control oscillators is inspired by experiments in which oscillations of individual BZ droplets were regulated by blue light [54]. In these experiments, two illumination levels were used: a low one, for which the droplet was oscillating; and a high one, for which oscillations were inhibited. The transitions between steady state and oscillations predicted by the two-variable Oregonator model were in qualitative agreement with experiments.
