Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Analysis of Unconventional Evolved Electronics

Adrian Thompson & Paul Layzell


Centre for Computational Neuroscience and Robotics,
School of Cognitive & Computing Sciences,
University of Sussex, Brighton BN1 9QH, UK.
adrianth, paulla @sussex.ac.uk

1 Introduction form the task. Super cially, this suggests an increased


chance of success, and a guaranteed utility of the nal
In recent years, several research groups have demon- result, in that we know it is likely to be `well-behaved'
strated the potential for arti cial evolution to design and amenable to analysis using established techniques.
electronic circuits automatically. An `evolutionary al-
gorithm' is implemented, usually as a computer pro- The unconstrained approach, however, is alluring
gram, which mimics some aspects of Darwinian evolu- (Thompson, 1998). Evolution is free to explore very un-
tion: small random variations (`mutations') are repeat- usual designs: circuits with strange structures and intri-
edly made to one or more candidate circuit designs. Nat- cate dynamical behaviours beyond the scope of conven-
ural selection is replaced by a ` tness' measure of the de- tional design and analysis. In this larger search-space,
gree to which a circuit meets the target engineering spec- there is the possibility of better solutions, if we are pre-
i cation of behaviour, size, power-consumption, and so pared to set aside our prejudices (based on existing de-
on. Mutations resulting in a poorer tness measurement sign methods) of how an electronic circuit should be. The
are rejected, whereas those producing an improvement unrestricted design-space may also contain more evolv-
(or at least no deterioration) are allowed to persist and be able circuits: those more susceptible to gradual adap-
built upon by further rounds of variation and selection. tation, through a sequence of small changes, towards
Commencing with either randomly generated circuit de- meeting the speci cation. Attempts to aid evolution by
signs, results of previous evolutionary experiments, or restricting it to conventional architectures, usually the
an initial hand-designed attempt, repeated cycles of au- products of top-down design, may actually hinder it if
tomated evolution can eventually produce circuits which these structures are not so easily improved through evo-
satisfy the speci cation. Many elaborations to this basic lution's more bottom-up activities. Furthermore, if the
scheme exist, such as allowing `recombination' of features most promising application domains are the ones prob-
from two or more individuals in an evolving population lematic for conventional design, then the exploration of
of variants. new strategies is appropriate. Finally, if we are to learn
Electronics design through arti cial evolution is be- or be inspired by the products of arti cial evolution, then
coming practical for some real-world applications (Sip- we must give it the freedom to produce circuits working
per, Mange & Perez-Uribe, 1998), especially in do- in an unexpected way.
mains where conventional design methodologies strug- Clearly, to learn from an evolved circuit, we need to be
gle. These include automated analogue circuit design able to discern some of its principles of operation. How-
(Rutenbar, 1993), and design under dicult implemen- ever, even if the goal is merely to evolve a circuit that
tation constraints such as size, power-consumption, or works (and we don't need to know how), some degree of
even fault-tolerance (Thompson, 1997a). Here there are analysis may still increase its utility as an engineering
applications even for relatively simple evolved circuits. product. In particular, if bounds on possible long-term
When setting-out to evolve a circuit for some task, changes in the circuit's behaviour can be derived, then
there is a fundamental decision to be made: whether the circuit can be applied with con dence more widely.
the evolutionary process is free to explore any possible The need for extended consistent performance is di-
design, or whether it is constrained to encourage `sensi- cult to accommodate within an evolutionary framework,
ble' circuits more like those arising from conventional de- because usually the tests for tness measurement of can-
sign methods. In many ways, the constrained approach didate solutions (the bottleneck in the evolutionary pro-
seems like a good idea. The search-space of possible de- cess) are as brief as possible. The evolutionary approach
signs through which evolution must navigate is reduced can be made more viable if, through analysis, it can be
in size, to a set of circuits that we can readily under- predicted that a circuit will perform adequately in the
stand, and some of which we know should be able to per- long term, even though it was never tested for long dur-
ing its evolution. tions (Simon, 1996). Systems designed by humans can
There are two components to long-term stability of be- usually be understood in this way, because of the `di-
haviour. First, the circuit must be insensitive to certain vide and conquer' approach universally adopted to tackle
variations in its implementation or environment, or able complex designs.
to adapt to them. Examples include thermal drift, noise, Although an evolved system may have particular func-
and ageing e ects in semiconductor devices and inte- tions localised in identi able subsystems, this is not al-
grated circuits. Second, it is possible for even simple dy- ways so. Dynamic systems theory (Burton, 1994) pro-
namical systems to display intermittent behaviour over vides a mathematical framework in which systems can
long time-scales (Pomeau & Manneville, 1980). This is be characterised without a functional decomposition.
not due to any external uctuations, but is a property of Hence, what to many people is the essence of under-
the system's own dynamics. Circuits can be constructed standing | being able to point at parts of the whole and
which will inevitably | though after a long period of say what function they perform | is not always possible
normal operation | suddenly and unpredictably change for evolved systems. In this case, more precisely formu-
in their qualitative mode of behaviour; possibly forever, lated questions regarding the organisation of behaviour
or perhaps to return to normal operation for another long must replace fuzzy notions of `understanding' or `expla-
interval (Je eries & Deane, 1997). An evolutionary algo- nation' rooted in functional decomposition. In our case,
rithm, unless using debilitatingly long tness evaluation these questions are centred around the suitability of an
tests, would be blind to this pathological behaviour, and evolved circuit for engineering applications. Addressing
could present such a circuit as a solution to the engineer- these questions, such as those regarding long-term dy-
ing speci cation. Inherently erratic dynamics of this kind namics, is what we mean by `analysis.'
can also interact with the time-dependent exogenous in- The successful action of a circuit can be considered
uences mentioned above. If analysis can provide re- as a property of the interface between its inner mecha-
assurance against long-term sporadic misbehaviour, the nisms and the external environment (Simon, 1996): the
circuit is rendered more useful. inner has been adapted so that the behaviour at the in-
In critical applications, complex circuits can be em- terface satis es the speci cation. Observations at the
bedded within an error-recovering framework (Anderson, interface (eg. at input and output connections) during
1985). The error recovery mechanisms themselves can be normal circuit operation may reveal little about the inner
simpler, and perhaps formally veri ed. For example, if a mechanisms, but instead will largely re ect the demands
failure condition is detected, the circuit responsible could of the speci cation. Analysis therefore requires internal
be automatically reset to a safe initial state. The more probing, and/or observation under abnormal conditions,
a circuit's potential failure modes are understood, the either internal or external.
more feasible it becomes to construct a resilient system There are surprisingly many tactics that can be used
containing it. to piece-together an analysis:
When encouraging evolution to explore beyond the
scope of conventional design, there can be engineering
bene ts to some sort of analysis even without a com-  Probing and abnormal conditions. Abnormal
plete understanding of how the circuit works. In the conditions include: manipulation of the input sig-
next section, we discuss what `analysis' is, and how it nals, varying temperature or power-supply voltage,
can be done. We then apply these techniques to illu- replacing parts of the circuit with alternative or non-
minate an unconventional evolved circuit, showing that functional pieces, and injecting externally generated
one can indeed address some analysis questions even if signals at internal points. Monitoring an internal
the circuit is so strange that parts of its inner workings voltage always has some side-e ect, often placing a
remain unknown. mostly-reactive load at the probing point. This may
have negligible consequences, but potentially per-
2 The Analyst's Toolbox turbs the measurement, or even stops the circuit from
working altogether. Probing internal signals of a cir-
Analysis of exotic evolved circuits is di erent to that cuit implemented on a VLSI (Very Large-Scale Inte-
undertaken as part of orthodox design. At an abstract gration) chip can require routing extra connections to
level, the appropriate tools are sometimes more akin to reach the external pins of the device, with a danger
neuroscience than to electronic engineering. It is espe- of further disrupting the circuit under study.
cially important to recognise that an evolved system may
not have a clear functional decomposition. A functional  Mathematical techniques, including standard
analysis decomposes the system into semi-independent electronics theory, are preferable for their rigour and
subsystems with separate roles; the subsystems interact generality. If a whole unconventional evolved circuit
largely through their functions and independently of the is mathematically intractable, there may still be parts
details of the mechanisms that accomplish those func- of it which yield.
 Simulation of a circuit allows rapid and extensive was present at the input, and a steady low for the
interactive exploration. As we shall see, circuits other. It was evolved directly on a Xilinx XC6216 Field-
evolved not in simulation, but using real recon g- Programmable Gate Array (FPGA). In simple terms,
urable hardware, may rely on detailed hardware prop- this VLSI device consists of an uncommitted array of
erties not easily modelled in a simulation. Attempts components (or `cells'). Switches made from transistors
at simulation can at least help to clarify the extent (multiplexers) control how each component behaves, and
of this dependence. how they are connected to each-other. The settings of
the switches are controlled by the contents of RAM mem-
 Synthesis: a circuit can be implemented using al- ory bits distributed throughout the chip; this memory
ternative electronic devices. For example, a circuit can be rapidly and repeatedly written to by a host mi-
evolved on a single VLSI recon gurable chip, might croprocessor, causing any of a vast number of possible
then be constructed out of a number of hard-wired electronic circuits to be physically instantiated in silicon.
small-scale chips. This provides easy access for prob-
ing and manipulation of `internal' signals, and again Evolution was allowed to exploit the capabilities of the
can clarify what aspects of the hardware are impor- FPGA as freely as possible. Each candidate design was a
tant to the circuit's operation. setting of the con guration bits for a 10  10 corner of the
array of cells. To test its tness, each design was con-
 Power Consumption for the most common VLSI gured onto a real FPGA (no simulation), half-second
technology (`CMOS'), is related to the rate of change bursts of 1kHz and 10kHz test stimuli were applied to its
of the internal voltages. After removing any power- input, and a tness score was automatically assigned ac-
supply smoothing capacitors, power consumption can cording to the degree to which the output approximated
be monitored with high temporal precision, while the the desired discrimination behaviour. The behaviour of
circuit is exposed to test conditions. the nal circuit (shown in the diagram) is near-optimal
according to this tness measure.
 Electromagnetic emissions, resulting from rapidly The FPGA chip is intended for digital designs: the
changing electrical signals, can sometimes be de- cells can be con gured to perform various Boolean func-
tected using a tuned radio receiver. Circuit activity tions. However, being made of real transistors, a cell
within a chip, which might be dicult to monitor is really an analogue component behaving in continuous
directly, can thus be roughly characterised. time. These analogue cells have very high gain (ampli-
 Evolutionary history: The mechanism underlying cation); for most inputs their output rapidly saturates
a task-achieving behaviour may be more apparent either fully high or fully low. Consequently, if certain
soon after its evolutionary origin, rather than after design-rules are followed, then the system's behaviour
evolution has re ned it closely to match the speci - can be abstracted to a binary description: a digital logic
cation. It may be possible to identify the innovation system. The basic digital design rule is that recurrent
(perhaps caused by one or more mutations) giving connections | paths through the circuit by which a com-
rise to the behaviour's origin in an ancestor, and to ponent's output can (indirectly) later a ect its own input
relate this to the operation of the nal circuit. | must only be allowed to operate at particular discrete
instants. This gives the components time to saturate to
 Population diversity: Sometimes there can be sev- their extreme (digital) states before their inputs change
eral slightly di erent (but related) forms of high- again. In synchronous design, this is done on the tick-
tness circuit in an evolutionary population, which ing of a global `clock', whereas in asynchronous digital
can help to reveal the basic mechanisms used. design more local co-ordination is used.
Although unconventional evolved circuits can seem In our experiment, no constraints were placed on the
dauntingly unfamiliar, the analyst is far from powerless. circuit's structure or dynamical behaviour. No clock
was provided, so evolution was searching the space of
3 Case Study continuous-time dynamical systems made from the high
gain analogue components normally used as logic gates.
We now present an analysis of probably the most bizarre, Evolution was free to explore the full repertoire of the
mysterious, and unconventional unconstrained evolved FPGA's possible behaviours, of which digital systems
circuit yet reported. The aim is to explore how analysis constitute but a small subset. The components behave
may be able to abate some of the worries associated with on the timescale of nanoseconds, and one of the original
employing very unusual evolved circuits in an engineering motivations of the experiment was to see if the dynamics
application. of the FPGA could be organised to give an orderly be-
The task of the evolved circuit (Fig. 1) was simply haviour on a very di erent timescale: the periods of the
to distinguish between 1kHz and 10kHz audio tones, two tones to be distinguished are 1ms and 0.1ms. The
producing a steady high output whenever one tone experiment (fully described in (Thompson, 1998)) was
Out

In

In:

1kHz 10kHz 1kHz

Out:

Figure 1: The circuit for analysis, after pruning. For simplicity, only the connections between the cells are shown,
not their functions, which are also under evolutionary control. Of the signals arriving from its four neighbours, those
used as inputs to a cell's function are marked with small boxes. Each of a cell's four outputs (to the four neighbours)
can be driven either directly from one of the cell's inputs, or by the output of the cell's function.
successful, and the resulting circuit of Fig. 1 is consid- staying constant until the input next goes to 0.
erably smaller than would be achieved by conventional Part C of the circuit is based around a 2:1 multiplexer.
methods given the same resources. When Part B is in the static state, the multiplexer selects
Until the present study, one could only speculate as to the input marked `1' to be its output. This input comes
the circuit's means of operation, so unusual are its struc- from the multiplexer's own output via an even number
ture and dynamics. It was clear that continuous time of inversions, resulting in no net logic inversion but a
played an important role. If the circuit was con gured time delay of around 9ns. Under certain conditions, it is
onto a di erent, but nominally identical, FPGA chip possible for such a loop to oscillate (at least transiently),
(not used during evolution), then its performance was but the most stable condition is for it to settle down to
degraded. If the temperature is raised or lowered, then a constant logic state. The output of the whole circuit is
the circuit still works, but the frequencies between which taken from this loop. As this Part C loop provides the
it discriminates are raised or lowered. (Digital circuits only possibility for circuit activity during a high input,
usually display unchanged behaviour followed by brittle the next step in the analysis was to inspect the output
failure on approaching their thermal limits.)(Thompson, very carefully while applying test inputs.
1997b) These initial observations warranted a concerted We had already observed that the output only ever
application of our tactics for unconventional analysis. changes state (high)low or low)high) on the falling
In Figure 1, the rst analysis step has already been edge of the input waveform (Fig. 1). Although never
taken. Of the 10  10 corner of FPGA cells, only those required to do so during evolution, we discovered that
actively contributing to the behaviour are shown. All the output also responds correctly to the width of sin-
of the cells not shown can be simultaneously `clamped' gle high-going pulses. Figure 3 shows a low)high out-
without a ecting the output. To clamp a cell, the con g- put transition occurring after a short pulse; further short
uration sent to the FPGA was changed so that the cell's pulses leave the output high, but a single long pulse will
function produced a constant output, and this sourced switch it back to the low state. The output assumes the
all four of the cell's output connections. Where a con- appropriate level within 200ns after the falling edge of
nection is shown passing through a clamped cell, all of the input. The circuit does not respond to the width of
the cell's attributes except for this connection could be low-going pulses, and recognises a high-going pulse de-
clamped. The cells shaded grey in the diagram were enig- limited by as little as 200ns of low input at each end of
matic. Although not connected to the rest of the circuit, the pulse. The output is perfectly steady at logic 1 or 0,
if they were clamped then the output became less re- except for a brief oscillation during the 200ns `decision
liable, brie y changing to spurious states occasionally. time' which either dies away or results in a state change.
One of the aims of further analysis was to learn the in- This is astonishing. During the single high-going
uence of these `grey cells'. pulse, we know that parts A and B of the circuit are
If the input frequency was gradually changed from `reset' to a static state within the rst 20ns (the pulse
1kHz to 10kHz, the output (low at 1kHz) would be- widths are vastly longer: 500s and 50s correspond to
gin rapidly to alternate between low and high, spending 1kHz and 10kHz). Our observations at the output show
more time high as the frequency was increased, even- that Part C is also in a static state during the pulse. Yet
tually staying steady high for frequencies near 10kHz. somehow, within 200ns of the end of the pulse, the cir-
This binary behaviour of the output voltage suggested cuit `knows' how long it was, despite being completely
that perhaps part of the system could be understood in inactive during it.
digital terms. By temporarily making the assumption This is hard to believe, so we have reinforced this nd-
that all of the FPGA cells were acting as Boolean logic ing through many separate types of observation, and all
gates in the normal way, the FPGA con guration could agree that the circuit is inactive during the pulse. Power
be drawn as the logic circuit diagram of Figure 2. consumption returns to quiescent levels during the pulse.
The logic circuit diagram shows several continuous- Many of the internal signals were (one at a time) routed
time recurrent loops (breaking the digital design rules), to an external pin and monitored. Sometimes this prob-
so the system's behaviour is unlikely to be fully captured ing altered (or destroyed) the circuit's behaviour, but
by this Boolean level of abstraction. However, it contains we have observed at least one signal from each recur-
many `canalysing' functions (Kau man, 1993), such as rent loop while the circuit was successfully discriminat-
AND and OR: functions where one input can assume ing pulse-widths, and there was never activity during the
a value which makes the other inputs irrelevant. It so pulse. We were concerned that perhaps, because of the
happens that whenever our circuit's input is 1, all of the way the gates are implemented on the FPGA, it was pos-
recurrent loops in Parts A & B are broken by a cascade of sible that glitches (very short-duration pulses) were able
canalysing functions. Within 20ns of the input becoming to circulate in the circuit while our logic-analysis pre-
1, A and B satisfy the digital design rules, and all of their dicts it should be static; possibly these glitches could be
gates deterministically switch to xed, static logic values, so short as to be unobservable when routed to an exter-
Part B

11
2

O
3 0 U
2 IOB T
P
2 1 U
I
N 1 1 T
2 1
P IOB 4 8
U 2
T 2 3
2 1 2 1 2 1

7
2
6 Part C
Part A
Figure 2: The logic circuit representation. The numbers in hexagons are rough estimates of time delays (in ns),
based on the maximum values speci ed by the manufacturer. `IOB' refers to the inverting Input/Output Blocks that
interface the edges of the recon gurable array to the physical pins of the chip.

In:
(single pulse) < 200us

< 200ns
Out:

Circuit Static
Oscillation Oscillation
Activity: (Canalysed)

Figure 3: The response to a single high-going pulse.


nal pin. Hence, we hand-designed a high-speed `glitch- have successfully modelled this in simulation. The time
catching' circuit (basically a ip- op) as a con guration delays on the connections from A to B & C are crucial.
of two FPGA cells. Glitches suciently strong to circu- This explains the in uence of the `grey cells', which are
late for tens of microseconds could be expected to trigger all immediately adjacent to (or part of) the path of these
the glitch-catcher, but it detected no activity in any of signals. Varying the time delays in the simulation pro-
the recurrent loops during an input pulse. duces a similar result to interfering with the grey cells.
We performed a digital simulation of the circuit (us- Mostly, the loop of part C serves to maintain a constant
ing PSPICE), extensively exploring variations in time- and steady output even while the rest of the circuit oscil-
delays and parasitic capacitances. The simulated circuit lates, but immediately after an input pulse it has subtle
never reproduced the FPGA con guration's successful transient dynamics interacting with those of A & B.
behaviour, but did corroborate that the transient as the
circuit enters its static state at the beginning of an in- 4 Conclusion
put pulse is just a few tens of nanoseconds, in agreement
with our experimental measurements of internal FPGA We argued that allowing evolution to explore highly un-
signals, and according with the logic analysis. We then conventional circuits can be advantageous. Analysis of
built the circuit out of separate CMOS multiplexer chips, the evolved circuits enhances their utility, but requires
mimicking the way that the gates are actually imple- novel approaches. There are numerous tactics that can
mented by multiplexers on the FPGA, and also mod- be used to piece-together answers to analysis questions
elling the relative time-delays. Again, this circuit did not even for seemingly impenetrable circuits. We applied
work successfully, and | despite our best e orts | never many of these techniques to the most advanced uncon-
produced any internal activity during an input pulse. ventional circuit yet produced. We still do not under-
We then went back to nd the rst circuit during the stand fully how it works: the core of the timing mech-
evolutionary run which responded at all to input fre- anism is a subtle property of the VLSI medium. We
quency. Its behaviour is shown in Figure 4. During a have ruled out most possibilities: circuit activity (in-
pulse, the output is steady low. After the pulse, the cluding glitch-transients and beat-frequencies), metasta-
output oscillates at one of two di erent frequencies, de- bility (Marino, 1981), and thermal time-constants from
pending on how long the preceding pulse was. These self-heating. Whatever this small e ect, we understand
oscillations are stable and long-lasting. The di erences that it is ampli ed by alterations in bistable and tran-
are minor between this circuit and its immediate evo- sient dynamics of oscillatory loops, and in detail how this
lutionary predecessor (which displays no discrimination, is used to derive an orderly near-optimal output. Cer-
always oscillating at the lower of the two frequencies). tain peripheral cells ne-tune particularly sensitive time
In fact, there are no di erences at all in the logic circuit delays. On the key question of long-term consistency
diagrams; the changes do things like alter where a cell's of behaviour, we know that the entire FPGA circuitry
function takes an unused input from. This lends further is strongly reset to a deterministic stable logic state for
support that circulating glitches are not the key: there every high half-cycle of the input waveform. Long-term
was no change to the implementation of the recurrent pathologies are therefore highly unlikely, demonstrating
loops. that analysis e ort can sometimes remove worries related
to the use of highly unconventional circuits in practical
We see bistable oscillations reminiscent of Fig. 4 at applications.
internal nodes of part A of the nal circuit. On being
released from the canalysed stable state, the di erence in Reference
the rst 100ns of oscillatory behaviour in part A is used
by parts B & C to derive a steady output according to Anderson, T. (Ed.). (1985). Resilient Computing Sys-
the pulse width. There is some initial state of the part A tems. Collins, London.
dynamics which is determined by the input pulse length.
This initial state does not arise from any circuit activity
in the normal sense: the circuit over the entire array Burton, T. D. (1994). Introduction to Dynamic Systems
of cells was stable and static during the pulse. It is a Analysis. McGraw-Hill.
particular property of the FPGA implementation, as it is
not reproduced in simulation or when the circuit is built Je eries, D. J., & Deane, J. H. B. (1997). Noise, traps,
from separate small chips. One guess is that the change and snags in iterating systems. In Proc. 1997 Eur.
in initial state results from some slow charge/discharge Conf. on Circuit theory and Design (ECCTD'97)
of an unknown parasitic capacitance during the pulse, Budapest.
but we cannot yet be sure.
We understand well how parts B & C use A's initial Kau man, S. A. (1993). The Origins of Order. Oxford
oscillatory dynamics to derive an orderly output, and University Press.
Figure 4: Behaviour of the rst frequency-discriminating ancestor. The upper waveform is the output, and the lower
the input; we see the behaviour immediately after the falling edge of a single input pulse. Left: long pulse, Right:
short pulse. The input to the FPGA is actually delayed  40ns by an intervening bu er, relative to the wave seen
here.

Marino, L. R. (1981). General theory of metastable oper-


ation. IEEE Transactions on Computers, C-30 (2),
107{115.
Pomeau, Y., & Manneville, P. (1980). Intermittent tran-
sition to turbulence in dissipative dynamical sys-
tems. Communications in Mathematical Physics,
74, 189{197.
Rutenbar, R. A. (1993). Analog design automation:
Where are we? Where are we going?. In Proc.
IEEE Custom Integrated Circuits Conference, pp.
13.1.1{13.1.8.
Simon, H. A. (1996). The Sciences of the Arti cial (3rd
edition). MIT Press.
Sipper, M., Mange, D., & Perez-Uribe, A. (Eds.). (1998).
Evolvable Systems: From biology to hardware.
Proc. 2nd Int. Conf., Vol. 1478 of LNCS. Springer-
Verlag.
Thompson, A. (1997a). Evolving inherently fault-
tolerant systems. Proc Instn Mechanical Engrs,
Part I, 211, 365{371.
Thompson, A. (1997b). Temperature in natural and arti-
cial systems. In Husbands, P., & Harvey, I. (Eds.),
Proc. 4th Eur. Conf. on Arti cial Life (ECAL'97),
pp. 388{397. MIT Press.
Thompson, A. (1998). Hardware Evolution: Automatic
design of electronic circuits in recon gurable hard-
ware by arti cial evolution. Distinguished disser-
tation series. Springer-Verlag.

You might also like