Evolution of Acoustic Logic Gates
in Granular Metamaterials
Atoosa Parsa1(B) , Dong Wang2 , Corey S. O’Hern2 ,Mark D. Shattuck3 , Rebecca Kramer-Bottiglio2 , and Josh Bongard1
1

Department of Computer Science, University of Vermont,
Burlington, VT 05405, USA{atoosa.parsa,josh.bongard}@uvm.edu
2
Department of Mechanical Engineering and Materials Science, Yale University,
New Haven, CT 06520, USA{dong.wang,corey.ohern,rebecca.kramer}@yale.edu
3
Benjamin Levich Inst. & Physics Dept., City College of New York,New York, NY 10031, USA
shattuck@ccny.cuny.edu

Abstract. Granular metamaterials are a promising choice for the realization of mechanical computing devices. As preliminary evidence of this,we demonstrate here how to embed Boolean logic gates (AND and XOR)
into a granular metamaterial by evolving where particular grains areplaced in the material. Our results conﬁrm the existence of gradientsof increasing “AND-ness” and “XOR-ness” within the space of possible
materials that can be followed by evolutionary search. We measure thecomputational functionality of a material by probing how it transforms
bits encoded as vibrations with zero or non-zero amplitude. We compared the evolution of materials built from mass-contrasting particles
and materials built from stiﬀness-contrasting particles, and found thatthe latter were more evolvable. We believe this work may pave the way
toward evolutionary design of increasingly sophisticated, programmable,
and computationally dense metamaterials with certain advantages overmore traditional computational substrates.
Keywords: Granular metamaterials · Mechanical computing · Inverse
design problem

1

Introduction

The concept of mechanical computing can be traced back to the second century BC when the earliest known analogue computer, the Antikythera mechanism, was invented [4]. Since then many other mechanical devices were invented
for applications other than astronomical calculations such as basic mathematical operations [18], solving arbitrary equations [5], and even diﬀerentiation andThis material is based upon work supported by the National Science Foundation under
the DMREF program (award number: 2118810).
c Springer Nature Switzerland AG 2022

J. L. Jiménez Laredo et al. (Eds.): EvoApplications 2022, LNCS 13224, pp. 93–109, 2022.
https://doi.org/10.1007/978-3-031-02462-7_7

94

A. Parsa et al.

integration [21]. With the invention of operational ampliﬁers in the early twentieth century, electronic analog computers became feasible. Soon after, digitalcomputers emerged and rapidly became the dominant form for computation[9]. Although they impose a more abstract form of system representation, digital computers rapidly outpaced their mechanical counterparts. Moreover, higher
precision and the capacity for miniaturization helped make the digital computing paradigm more desirable. But, recently, rapid advances in the chemical,
biological and materials sciences have opened new opportunities for embedding
computation directly into physical substrates [20].
Metamaterials are one such promising class of substrate that has surfaced
in recent years. Metamaterials are engineered composite materials that exhibit
properties diﬀerent from their constituent materials, and from material properties observed in nature [7]. Granular metamaterials (GMMs) are a speciﬁcclass of metamaterials consisting of discrete particles. GMMs exhibit increased
plasticity compared to continuous metamaterials because they can be dynamically programmed by reconﬁguring the material’s physical structure or changing
particles’ properties using external stimuli [19]. In this paper, we investigate
the potential of granular metamaterials as a physical substrate for mechanicalcomputation.
Starting with logic gates as the basic computational blocks upon which more
complex units can be built, we focus our work on evolving GMMs that act as
acoustic logic gates: vibrations with near-zero and non-zero amplitudes arriving
at and leaving the material are treated as incoming and outgoing bits. There areseveral advantages for this type of computation compared to the conventional
approach of designing logic gates using electrical transistors. First, by moving toa mechanical substrate, we can avoid analogue to digital conversion, also thereby
bypassing all of the limitations of abstract representations and discretizations
necessary for a digital computing system [21]. Second, outsourcing computation
to the physical substrate provides opportunities for conﬂating computational,
mechanical, energetic, sensing and actuation properties into the same material.
This could lead to robots built from continua of materials rather than modular
components. This in turn could allow these machines to better exploit the natural dynamics of the materials, leading to better energy eﬃciency and higher
robustness and stability. Finally, our approach aﬀords a bottom-up design view
point for computer architecture where the exact form of computation is not predetermined [11] and useful, non-intuitive exploitations of the material itself canbe found by evolutionary search [16].
Some work on embedding mechanical computation into materials has been
conducted. In [15], a universal logic gate is implemented as a nonlinear massspring-damper model. In [13] a soft bistable building block is designed and usedin the implementation of soft mechanical diodes and logic gates. [6] utilizes
a bistable spring embedded in a unit cell to implement simple logic gates. In[17] connected origami units are used to program the behavior of a mechanical
bit and thus produce logic gates. [8] and [1] present examples of acoustic gate
design in a 1D chain of elastic particles. Despite these advances, in none of theEvolution of Acoustic Logic Gates in Granular Metamaterials

95

aforementioned works is the material automatically optimized for the desired
computational function. Instead, the building blocks are hand-designed based onhuman intuition. In contrast, we here propose using evolutionary algorithms forautomatically optimizing materials to exhibit desired computation. Moreover,
the abovementioned works involved continuous metamaterials or 1D particle
chains, while we here investigate the computational potential of 2D granularmetamaterials. This type of material can exhibit diﬀerent responses to diﬀerent
environmental stimuli by reconﬁguring their physical structure and changing
the material properties of individual particles. Thus, we anticipate a greater
potential for extending our work to more complex computational operations.
Granular metamaterials have many parameters that aﬀect the response of thesystem. For example, the position, size, shape, stiﬀness and mass of each particle
can aﬀect the eigenfrequencies of the system and consequently the propagationof acoustic waves through the material. With so many design parameters, deciding on the optimal micro-structure to achieve a desired macro-behavior (i.e. a
logic gate) is a non-trivial optimization problem. For this reason, evolutionary
algorithms have already proven useful for designing metamaterials that exhibit
mechanical properties [10,12] rather than the computational properties we study
here. In this paper, we apply evolutionary algorithms to the design of 2D granular metamaterials to act as acoustic logic gates, where the input and output
signals are acoustic waves. The granular assembly is designed such that it passes
or ﬁlters the propagation of certain waves and thus acts as a Boolean logic gate.
The remainder of the paper is organized as follows: ﬁrst, we formally deﬁne
the problem and introduce the simulator used for optimization. Then, simulation
results are presented for two diﬀerent cases: designing an AND gate and designing
an XOR gate. Finally, the results are discussed and the paper is concluded withsome future possible directions of work.

2

Problem Statement

Our material is comprised of a two dimensional assembly of two types of circularparticles placed on a hexagonal lattice. As mentioned in the introduction, thegoal is to reconﬁgure this granular material to act as a logic gate where theinputs and the output receive and emit acoustic waves respectively. The setup is
shown in Fig. 1. We choose two particles on one side of the material to serve as
the input ports and one particle on the other side to serve as the output port.
Each input particle i receives a sinusoidal wave with amplitude Ai and frequency
ω applied in the x direction (the particle is vibrated left and right). When thissignal is applied to a particle, it causes a displacement from its initial positionx0i .
In order to represent a logic gate in this substrate, a representation for thebits must be chosen. One option is to use the amplitude of the displacement
signal (xi (t)) as the bit abstraction. In this case, applying a sinusoidal wave
with amplitude zero (Ai = 0) to an input port denotes the presentation of azero at that port. We ﬁxed the non-zero amplitude to 1 × 10−2 , which is 10%

96

A. Parsa et al.

Fig. 1. Problem formulation: a logic gate with two inputs (green and blue) and one
output (red) embedded in a 2D granular assembly composed of heavy (dark blue) andlight (light blue) particles. A1 and A2 denote the amplitudes of oscillations appliedin the x direction to the input ports (D = particle diameter). ω denotes the input
frequency. The truth table indicates how ‘bits‘ are supplied to the input ports, andthe signal obtained at the output port that will be used to determine how much of adesired logical function the material encodes. (Color ﬁgure online)of the diameter of a particle. This is at present an arbitrary design choice. The
frequency of the applied signal (ω) is also ﬁxed to 7, chosen based on the frequency spectrum of a typical random conﬁguration of light and heavy particles,
which will be discussed in the next section. The truth table in Fig. 1 shows our
bit representation. The output signal Oij (i, j ∈ 0, 1) denotes the amplitude ofthe displacement of the particle at the output port. The three particles chosen
to represent the three ports is also currently an arbitrary design choice.
Using zero and non-zero amplitudes directly to interpret bits arriving at theoutput port however is problematic: excitation of both input ports biases thesystem to produce larger amplitudes at the output port compared to excitationof just one input port, biasing any material conﬁguration toward linear functions.
Thus we instead use low and high gain at the output port to represent bits. In
each of the four input cases, the gain of the system is deﬁned as the amplitudeof the fast Fourier transform (fˆ) at the driving frequency (ω) at the output
divided by the sum of the amplitudes of the fast Fourier transform at the driving
frequency (ω) in the inputs:
Gij =fˆ(Oij )fˆ(ini ) + fˆ(inj )i, j ∈ 0, 1

(1)

In our experiments, for each material we measure the gain for each of the four
input cases. In order for the material to act as a logic gate, the relative magnitude of the gain in each case must be consistent with desired functionalityof the gate. For example, for an AND gate when both input ports are driven
with a sinusoidal wave, we expect to see a high amplitude of oscillation at theoutput and therefore we expect a high gain (G11 ). But in the other three cases

Evolution of Acoustic Logic Gates in Granular Metamaterials

97(00, 01, 10) we expect a low gain. Based on this, we can measure the similarityof any material’s functionality to a desired logic gate by taking the distance
between the four expected output bits and the four gain values.

3

Simulation Setup

In this section, we ﬁrst present some details of our 2D granular metamaterial
simulator. Then, we provide details of the evolutionary algorithm used for optimization.
3.1

2D Granular Simulator

We model a simpliﬁed granular metamaterial inspired by [19]. The system is 2D
and composed of frictionless circular disks with ﬁxed and equal diameters. The
particles can be assigned diﬀering masses and/or stiﬀnesses. The particles areplaced on a 5 by 6 hexagonal lattice, resulting in 30 particles available for optimization. The system has a periodic boundary condition in the x direction anda ﬁxed boundary condition in the y direction. There is no gravity in the systemand the only forces acting on the particles are the result of a purely repulsive linear spring potential between the disks which can be formalized as Lennard-Jones
potential. This system is simulated using Discrete Element Method (DEM). At
each simulation time step, repulsive forces are calculated for those particles incontact with other particles, based on their distances to particles with which
they are in contact. Then the accelerations, velocities and positions of each particle are updated using Verlet integration. Before probing the bulk propertiesof the material, a post-processing step is taken to ensure that the system is
at equilibrium: the sum of the total forces between particles is near zero. This
ensures that the particle packing is statistically stable. This is done by calculating the total force acting on each particle and updating their positions using thesteepest-descent method to reduce total force. In the experiments where we haveparticles with diﬀerent stiﬀnesses, we need to ﬁnd the stable initial positions foreach conﬁguration separately. This will increase the total simulation time of our
optimizations. In those cases Fast Inertial Relaxation Engine (FIRE) was usedin order to reduce computational eﬀort.
As computational metamaterials must selectively amplify or extinguish certain input waves to perform logical functions in the frequency domain, it is useful
to take a closer look at their frequency spectrum. One useful property of granularmetamaterials is the existence of band gaps in their vibrational density of states[2]: a contiguous range of input frequencies extinguished by the material. To
locate a material’s band gap, its mass-weighted dynamical matrix is calculatedusing the Hessian of the total potential energy. The eigenvalues of this matrix
are the eigenfrequencies of the system and the eigenvectors are the modes. If
the eigenfrequency spectrum is plotted by sorting the frequencies in increasingorder, gaps in the spectrum become visible. The widest gap is denoted as theband gap (An example is shown in Fig. 2c). If the granular system is excited

98

A. Parsa et al.

at a frequency within the band gap, the signal will not propagate through thematerial. On the other hand if the signal is outside the band gap, the system will
be excited at one of its resonant frequencies and the output will be magniﬁed.
For this reason, we will choose input frequencies near the low and high cut-oﬀ
frequencies of a typical material’s band gap to facilitate the evolution of computational metamaterials capable of selectively amplifying or suppressing input
waves, as explained in the next section.
3.2

Optimization Method

For optimization we use Age-Fitness Pareto Optimization (AFPO) [14]. AFPO
is a multi-objective, multi-deme evolutionary algorithm that periodically injects
new random individuals into the population and temporarily reduces selection pressure on their resulting lineages, thereby achieving diversity maintenance without requiring additional hyperparameter tuning. In all experiments
we employed a direct encoding scheme for the genome: length-30 binary vectors
indicated which particles were light or heavy in the mass-contrasting experiments, and which particles were soft or stiﬀ in the stiﬀness-contrasting experiments. Two way tournament selection was employed to select which individuals
produced oﬀspring. Oﬀspring were mutated by ﬂipping each bit with probability
0.05. Crossover was not employed because there is no evidence that combining
parts of two materials preserves any of their respective bulk behaviors. In all theexperiments (unless mentioned otherwise) a population size of 50 was used, andeach evolutionary trial was conducted for 200 generations. Three replicates were
performed for each experiment. Each replicate began with a diﬀerent random
initial population. The ﬁtness function for each experiment will be introducedin the subsequent sections.

4

Results and Discussion

In the ﬁrst experiment, the goal was to evolve a particle conﬁguration that maximizes the band gap. This evolved band gap was used to choose input frequencies
for the subsequent experiments in which AND and XOR gates are evolutionarily
embedded into two diﬀerent metamaterials: those with mass-diﬀering particles
and those with stiﬀness-diﬀering particles. Source code for all of the experiments
is available in our GitHub repository.
4.1

Evolution of an Acoustic Band Gap

Vibrational frequency band gaps can be used to shield materials from vibrations and other perturbations. As mentioned before, vibrations with frequencies
within the band gap do not propagate into the material. To block vibrations
over a range of frequencies, wider band gaps are necessary. We can also tune
the location of the central region of the band gap to block perturbations overdiﬀerent frequency ranges. A granular metamaterial’s band gap can be alteredEvolution of Acoustic Logic Gates in Granular Metamaterials

99

by changing the number of particles embedded within it, as well as the particles’
masses, positions, stiﬀnesses and shapes. Here, we focus on particle arrangements and deﬁne the optimization problem as ﬁnding the placement of a ﬁxed
number of heavy and light particles on a hexagonal lattice to maximize the bandgap. In this section, we assume that we have 9 light and 21 heavy particles (30particles in total), an arbitrary design chose at present. The genome encodes the
positions of the light particles on the lattice. The result of three evolutionary
trials is shown in Fig. 2.

Fig. 2. Evolving the placement of 9 light and 21 heavy particles on a hexagonal lattice
to maximize the acoustic band gap. (a): The ﬁtness curve (solid blue) reports evolutionary progress as the ﬁtness of the best individual from each generation averaged
over 3 runs. The three most ﬁt solutions from three independent runs are shown on theright. (b): The histogram shows the distribution of 10000 randomly generated samples.
(c): The plot shows the frequency spectrum of the best solutions along with the width,
start and end points of the band gap on the left. (Color ﬁgure online) This problem admits C9 (30) = 30
9 = 143071150 possible materials. To judge
the quality of optimization, we generated 10000 random conﬁgurations and calculated the band gap for each of them (Fig. 2b). The mean value of this distribution lies near 4. At the end of 500 generations (with a population size of 30),AFPO was able to ﬁnd conﬁgurations with a band gap of Δω = 7.94. It’s worth
mentioning that in this section, we chose to increase the number of generations,because probing the evolutionary progress showed a continued improvement.
Interestingly, the optimal designs with the highest band gaps are symmetricand show an ordered arrangement, which is consistent with our knowledge frommaterials sciences. Band gaps are known to occur in crystalline mixtures withregular patterns [3]. Moreover, because of the periodic boundary condition in
the x direction, the three best solutions are the same conﬁguration, just shifted
diﬀerent distances horizontally.

100

4.2

A. Parsa et al.

Evolving an AND Gate

In this experiment, particle conﬁgurations are evolved on a hexagonal lattice
to act as much like an acoustic AND gate as possible. As we mentioned in thesimulation section, we can measure the gain of the system (the relative amplitude
of output oscillations to the input oscillations) for each of the four possible input
cases (00, 01, 10, 11). G00 is trivial: if the input is 00—no displacement is applied
to either of the input particles—the output particle will yield no displacement
either. For the other three cases, a signiﬁcant gain should only be observed whenboth inputs are activated (high G11 ). To achieve this, we deﬁned the following
ﬁtness function:
G11(2)f“AND-ness” =(G10 + G01 )/2
The next two sections present the results of evolving mass-varying and stiﬀnessvarying granular metamaterials with this ﬁtness function.
4.2.1 Evolving an AND Gate in a Mass-Varying Material
Figure 3 reports the results of evolving the placement of light and heavy particles,with a mass ratio of 10, using Eq. 2 as the ﬁtness function.
The histogram in panel (a) shows the distribution of 5000 random conﬁgurations sampled from 230 = 1.07 × 109 total possible conﬁgurations based on
the measure of “AND-ness” (Eq. 2). The mean AND-ness for a random conﬁguration is 0.715. The best conﬁguration found by random search has a ﬁtness of
3.52. Optimization was able to ﬁnd a conﬁguration with a ﬁtness of 8.21 after
200 generations. Figure 5 reports the ﬁttest designs from the three independent
evolutionary trials. We notice that these conﬁgurations are not intuitive or symmetric, which makes it much harder to obtain from scratch in material design.
Figure 4 illustrates how one of these best designs approximates the behavior of
an AND gate: there is signiﬁcant gain in the signal at the output port, at thedriving frequency, only when both input ports are excited at that frequency.

Fig. 3. Designing an AND gate in a mass-contrasting assembly of particles. (a): The
histogram shows the distribution of the AND-ness in 5000 random conﬁgurations. (b):The plot shows the progress of optimization during 200 generations.

Evolution of Acoustic Logic Gates in Granular Metamaterials

101

Fig. 4. (a): One of the best designs for an AND gate with mass-contrasting particles.
(b): its band gap characteristics. (c): amplitudes at the driving frequency (7), and allother frequencies, at the input and output ports, for three of the four input cases, inthe frequency domain. (d): the same signals, shown in the time domain. The orange
rectangle in each of the plots in panel (c) highlights the behavior of the output port.
The 00 → 0 case is not shown as it is trivial and always holds, regardless of material,
because no energy can enter the material except through the input ports. (Color ﬁgure
online)Fig. 5. The ﬁttest AND gate designs from the three evolutionary trials, using masscontrasting particles. Their frequency spectra, band gap features, and ﬁtness values(Eq. 2) are also shown.

4.2.2 Evolving an AND Gate in a Stiﬀness-Varying Material
To investigate how diﬀerent materials facilitate or obstruct the ability to evolve
computational abilities into them, we evolved materials composed of particles
with the same mass but diﬀering stiﬀnesses: AFPO places stiﬀ and soft particles,

102

A. Parsa et al.

with a stiﬀness ratio of 10, and evolves materials to maximize “AND-ness” using
Eq. 2. Figure 6 reports the result of optimization. As seen in the histogram,mean AND-ness for conﬁgurations found by random search is 0.760. The best
conﬁguration found by random search has a ﬁtness of 7.88. AFPO performed
signiﬁcantly better than random search: in one of the three trials, it found a
conﬁguration with a ﬁtness of 10.61 after 200 generations. Figure 7 shows how
this conﬁgurations acts as an AND gate. Figure 8 shows the three best designs
from the three trials.

Fig. 6. Designing an AND gate in a stiﬀness-contrasting assembly of particles. (a):The histogram shows the distribution of “AND-ness” in 5000 random conﬁgurations,as well as the best and worst material found. Light and dark green colors indicate softand stiﬀ particles, respectively. (b): The plot shows the progress of optimization during
200 generations. (Color ﬁgure online)

4.3

Evolving an XOR Gate

An AND gate is not that far from a linear function, as more energy put into thesystem at the two input port should produce more energy at the output port,
at least when both inputs are activated. Thus we next attempted to evolve an
XOR gate into materials, as it is a more non-linear function and thus would
intuitively seem to require more design eﬀort. In an XOR gate, we expect to see
a signiﬁcant displacement at the output if only one of the input ports is being
driven by a sinusoidal displacement (the 01 and 10 input cases). In order toachieve this, we deﬁned an “XOR-ness” ﬁtness function as follows:
f“XOR-ness” =(G10 + G01 )/2
G11

(3)

such that increasing values denote materials that act increasingly like an XOR
gate. As before, we investigated evolving materials with mass-contrasting particles and materials with stiﬀness-contrasting particles against this ﬁtness function.

Evolution of Acoustic Logic Gates in Granular Metamaterials

103

Fig. 7. One of the best designs for an AND gate with stiﬀness-contrasting particles. (a)and (b) show the conﬁguration and its band gap respectively. (c) shows the responseof the material at the driving frequency, and the other frequencies, for three of the four
input cases. (d) shows the displacements of the input ports and the output port overtime.

Fig. 8. The most “AND-like” stiﬀness-varying materials from the three evolutionary
trials. The band gap for each conﬁguration is shown below each of them.

4.3.1 Evolving an XOR Gate in a Mass-Varying Material
We performed three evolutionary trials that optimize the placement of heavy andlight particles (mass ratio = 10) into materials such that they maximize “XORness” (Eq. 3). Figure 9 shows the result of optimization. There we see that mean
XOR-ness in materials found by random search is 1.775, while the best material
had an XOR-ness of 26.59. Evolutionary search performed signiﬁcantly better: it

104

A. Parsa et al.

Fig. 9. Designing an XOR gate in a mass-contrasting assembly of particles. (a): The
histogram shows the distribution of XOR-ness across 5000 materials found via random
search. (b): Progress of evolutionary optimization.

Fig. 10. One of the best designs for an XOR gate found for materials with masscontrasting particles. (a) and (b) report the evolved conﬁguration and its band gap
features. (c) reports the material’s response at the driving frequency (7) and all otherfrequencies. (d) shows material’s behavior over time when presented with three of thefour input cases.

found a material with an XOR-ness of 91.08. Figure 11 shows that material andthe best materials found in the other two trials. Figure 10 reports the detailed
behavior of one of these materials.

Evolution of Acoustic Logic Gates in Granular Metamaterials

105

Fig. 11. The most XOR-like mass-varying materials found by each of the three evolutionary trials. The frequency spectrum of each conﬁguration along with its ﬁtness
values is shown below each one.

Fig. 12. Evolving XOR behavior into a stiﬀness-contrasting assembly of particles. (a):The distribution of XOR-ness (as deﬁned in Eq. 3) in 5000 materials found by random
search. (b): Average performance of the three evolutionary trials.

4.3.2 Evolving an XOR Gate in a Stiﬀness-Varying Material
As with the AND gate experiments, we investigated whether diﬀerent kinds ofmaterials facilitate or obstruct evolving XOR gates into them. To do so, we
performed another three evolutionary trials using the XOR-ness ﬁtness function(Eq. 3) on materials in which 30 soft or stiﬀ particles could be placed into thematerial. Figure 12 reports the relative performance of random and evolutionary
search. Although the mean ﬁtness of materials found by random search is only
1.622, the best material achieved an XOR-ness of 60.24. Evolutionary search,on the other hand, again performed signiﬁcantly better than random search: itfound a particle assembly with a ﬁtness of 94.08. Figure 13 shows one of thethree best solutions from evolutionary optimization. Figure 13c shows that thismaterial does indeed act as an XOR gate: the amplitude of oscillations at theoutput is signiﬁcantly higher when only one of the input ports is activated.
Figure 14 shows the best solutions from the three trials.

106

A. Parsa et al.

Fig. 13. One of the most XOR-like evolved materials, composed from stiﬀnesscontrasting particles. (a) and (b) report the conﬁguration and its band gap features.
(c) reports how the material responds at the driving frequency (7) and all other frequencies. (d) shows how the three ports displace, over time, during three of the four
input cases.

Fig. 14. The most XOR-like stiﬀness-varying materials, produced by each of the three
evolutionary trials. The frequency spectrum of each conﬁguration along with its ﬁtness
is shown below each one.

5

Conclusion and Future Work

Here we demonstrated the potential for granular metamaterials to act as physicalsubstrates for computation expressed as ampliﬁcation or extinction of acoustic
waves. The signiﬁcant performance advantage obtained by evolutionary searchover random search, for two diﬀerent logical operations and two diﬀerent kindsof granular materials, indicates that such materials can embed computation, butEvolution of Acoustic Logic Gates in Granular Metamaterials

107

ﬁnding ones that do is non-trivial, even for simple Boolean operations. Moreover, as the computation becomes more challenging, the eﬃcacy of evolutionary
over random search increases: evolutionary search is 10 times better at ﬁnding
materials that act like AND gates compared to random search (Figs. 3, 6); it is
100 times better at ﬁnding materials that act like XOR gates (Figs. 9, 12).
Moreover, we noticed that evolutionary search can embed computation intosome materials better than others. For example, the most AND-like mass-varying
material shows a much weaker ‘1‘ signal at its output port (Fig. 4c) comparedto the ‘1’ output by the most AND-like stiﬀness varying material (Fig. 7c). Similarly, the ‘1’s output by the most XOR-like mass-varying material (Fig. 10c)
are weaker than the ‘1’s output by the most XOR-like stiﬀness-varying material(Fig. 13c).
The non-intuitive nature of embedding computation into granular metamaterial is also evidenced by the lack of obvious common patterns across the evolved
materials that best embody the logic gates: each has unique ratios of light/heavyor soft/stiﬀ particles, geometric patterns, and there is no obvious regularity orsymmetry (Figs. 5, 8, 11 and 14). This emphasizes the utility of automated designin this domain. Designing a conﬁguration of particles to behave as a logic gate isa rather diﬃcult task to accomplish without the aid of computer optimization.
Future work is planned in which the design space is expanded by expanding lattice resolution, and subjugating particle shape and input/output port
placement to evolutionary optimization as well. Analytic eﬀorts will focus on
attempting to understand how vibrating particles encode computation by training machine learning methods to seek common patterns across successful designs
not visible to human inspection. We will also investigate whether successful
designs compute sub-functions in diﬀerent regions of the material and then
combine them downstream, or do not need recourse to such divide-and-conquer
strategies.
We will also explore verifying our simulation results in physical hardware. It
is possible that, given the discrete nature of granular metamaterials compared tocontinuous media, crossing the reality gap may prove easier for former comparedwith the latter. Also, because diﬀerent designs are currently just diﬀerent placements of two types of particles on a predeﬁned grid, we expect the fabrication
process to be cheaper, faster and easier as well.
Granular metamaterials, unlike continuous media, aﬀord the possibility ofserving not just as computational substrates but as reconﬁgurable computational substrates: it may be possible to build physical GMMs from particles thatdynamically change stiﬀness in response to external stimuli such as temperature.
This may allow for the packing of more computational ability within the same
dynamic material. Creating increasingly computationally dense GMMs will also
be investigated by providing waves with increasingly complex and diverse shape,at more input ports, with summed oscillatory components that drive diﬀerent
computations in the same material at the same time. This may in time showthat granular metamaterials, or other emerging exotic materials, may be com-

108

A. Parsa et al.

petitive with or possibly superior to current electronic devices as vehicles forcomputation.
Acknowledgment. The authors would like to thank Qikai Wu for providing the simulator for mass-contrasting assembly of circular particles. The computational resources
provided by the Vermont Advanced Computing Core are also gratefully acknowledged.

References
1. Bilal, O.R., Foehr, A., Daraio, C.: Bistable metamaterial for switching and cascading elastic vibrations. Proc. Natl. Acad. Sci. 114(18), 4603–4606 (2017)
2. Deymier, P.A.: Acoustic Metamaterials and Phononic Crystals, vol. 173. Springer
Science & Business Media (2013)
3. Fornleitner, J., Kahl, G., Likos, C.N.: Tailoring the phonon band structure inbinary colloidal mixtures. Phys. Rev. E 81(6), 060401 (2010)
4. Freeth, T., et al.: Decoding the ancient greek astronomical calculator known as the
antikythera mechanism. Nature 444(7119), 587–591 (2006)
5. Hartree, D.R.: The bush diﬀerential analyser and its applications. Nature
146(3697), 319–323 (1940)
6. Ion, A., Wall, L., Kovacs, R., Baudisch, P.: Digital mechanical metamaterials. In:
Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems,
pp. 977–988 (2017)
7. Kadic, M., Milton, G.W., van Hecke, M., Wegener, M.: 3d metamaterials. Nature
Rev. Phys. 1(3), 198–210 (2019)
8. Li, F., Anzel, P., Yang, J., Kevrekidis, P.G., Daraio, C.: Granular acoustic switches
and logic elements. Nat. Commun. 5(1), 1–6 (2014)
9. MacLennan, B.J.: A review of analog computing. Department of Electrical Engineering & Computer Science, University of Tennessee, Technical report UT-CS-07601 (September) (2007)
10. Miskin, M.Z., Jaeger, H.M.: Adapting granular materials through artiﬁcial evolution. Nat. Mater. 12(4), 326–331 (2013)
11. Nakajima, K.: Physical reservoir computing-an introductory perspective. Jpn. J.
Appl. Phys. 59(6), 060501 (2020)
12. O’Hern, C.S., Shattuck, M.D.: Highly evolved grains. Nat. Mater. 12(4), 287–288(2013)
13. Raney, J.R., Nadkarni, N., Daraio, C., Kochmann, D.M., Lewis, J.A., Bertoldi, K.:
Stable propagation of mechanical signals in soft media using stored elastic energy.
Proc. Natl. Acad. Sci. 113(35), 9722–9727 (2016)14. Schmidt, M., Lipson, H.: Age-ﬁtness pareto optimization. In: Riolo, R.,
McConaghy, T., Vladislavleva, E. (eds.) Genetic Programming Theory and Practice VIII, pp. 129–146. Springer, New York (2011). https://doi.org/10.1007/9781-4419-7747-2 8
15. Serra-Garcia, M.: Turing-complete mechanical processor via automated nonlinear
system design. Phys. Rev. E 100(4), 042202 (2019)
16. Thompson, A.: An evolved circuit, intrinsic in silicon, entwined with physics. In:
Higuchi, T., Iwata, M., Liu, W. (eds.) ICES 1996. LNCS, vol. 1259, pp. 390–405.
Springer, Heidelberg (1997). https://doi.org/10.1007/3-540-63173-9 61
17. Treml, B., Gillman, A., Buskohl, P., Vaia, R.: Origami mechanologic. Proc. Natl.
Acad. Sci. 115(27), 6916–6921 (2018)

Evolution of Acoustic Logic Gates in Granular Metamaterials

109

18. Tympas, A.: The delights of the slide rule. In: Calculation and Computation in the
Pre-electronic Era, pp. 7–38. Springer, London (2017)19. Wu, Q., Cui, C., Bertrand, T., Shattuck, M.D., O’Hern, C.S.: Active acoustic
switches using two-dimensional granular crystals. Phys. Rev. E 99(6), 062901(2019)
20. Yasuda, H., Buskohl, P.R., Gillman, A., Murphey, T.D., Stepney, S., Vaia, R.A.,
Raney, J.R.: Mechanical computing. Nature 598(7879), 39–48 (2021)
21. Zangeneh-Nejad, F., Sounas, D.L., Alù, A., Fleury, R.: Analogue computing withmetamaterials. Nat. Rev. Mater. 6(3), 207–225 (2021)