On not designing circuits with evolutionary algorithms

[Henrik] has been working on a program to design electronic circuits using evolutionary algorithms. It’s still very much a work in progress, but he’s gotten to the point of generating a decent BJT inverter after 78 generations (9 minutes of compute time), as shown in the .gif above.

To evolve these circuits, [Henrik] told a SPICE simulation to generate an inverter with a 5V power supply, 2N3904 and 2N3906 transistors, and whatever resistors were needed. The first dozen or so generations didn’t actually do anything, but after 2000 generations the algorithm produced a circuit nearly identical to the description of a CMOS inverter you’d find in a circuit textbook.

[Henrik] says his algorithm didn’t test for how much current goes through the transistors, so implementing this circuit outside of a simulation will destroy the transistors and emit a puff of blue smoke. If you’d like design your own circuits using evolution, [Henrik] put all the code in a git for your perusal. It’s damn cool as it stands now, and once [Henrik] includes checking current and voltage in each component his project may actually be useful.

Then the next problem you run into is setting the fitness criteria for the device.

It’s impossible to develop a complete fitness test for something as simple as an amplifier because you have to exhaust all possible inputs, or at least all possible inputs that are relevant to you, and all the other cases such as rejection of EMI.

And if you don’t, then evolution will pick any shortcut possible and answer to your criteria, but only your criteria. For example, if you want a stable oscillator, you’ll get a phase locked loop radio reciever tuned to 60 Hz, because the line hum all around you stays constant regardless of temperature etc.

Author here, since writing this post I’ve added the current measurements and multithreading. I have also tried to simulate a new bandgap reference. This time measurements are input current(60C)(rload=100k), output voltage(27C)(rload=100k), output voltage(60C)(rload=100k), output voltage(50C)(rload=10k). Results seem good in simulation and it should work when built with real components. I bought some transistors today to actually build this circuit and make some real measurements. I think I’m going to write a post about the results later this week.

“[Henrik] says his algorithm didn’t test for how much current goes through the transistors, so implementing this circuit outside of a simulation will destroy the transistors and emit a puff of blue smoke.”

Quote: Five individual logic cells were functionally disconnected from the rest– with no pathways that would allow them to influence the output– yet when the researcher disabled any one of them the chip lost its ability to discriminate the tones.

It’s more like slight crosstalk between the logic cells, because the circuit they evolved works in analog mode.

It’s tricky, because just changing the room temperature by 1 degrees throws it off. There was never any consideration for different operating temperature while they were evolving the circuit, so evolution ignored robustness to temperature changes alltogether and made use of very fragile quirks of the hardware.

Can you provide a reference or explanation for the comment pertaining to “quantum weirdness.” Thompson’s paper titled “An evolved circuit, intrinsic in silicon, entwined in physics” makes reference to electromagnetic coupling or power line coupling explaining the unusual circuit design but does not mention quantum mechanics.