Randomness is not always as random as you think. It's actually very challenging for computers to generate true randomness, because algorithms introduce subtle patterns that can be detected, meaning the numbers they come up with are pseudorandom, and not ultimately unpredictable.

Which is not to say machines can't play a part. What if we took something, like a robot, and combined it with a truly random process? Scientists have made just such a thing, harnessing the innate unpredictability of chemistry in a way that's never been done before: in this case, watching crystals grow.

Crystallisation is not actually a chemical reaction, but a physical change that happens when crystal solids form from the products of a reaction, and researchers say the randomisation possibilities provided by the crystallisation process may be endless.

"In a chemical system, each time a reaction is performed there is an almost infinite number of energetically equivalent ways for particular reagents to combine, resulting in both high uncertainty and entropy, and the exact pathway undertaken will never be repeated," a team from the University of Glasgow explains in a new study.

"As such, the entropy of such a chemical system is extraordinarily high, and may therefore serve as a very good entropy pool for application of random number generation."

010 crystals random 1(Lee et al., Matter, 2020)

In the new work, the researchers exploited this seemingly endless potential for randomness by building a robotic system to prepare, initiate, and monitor hundreds of parallel chemical reactions in a vast array of chemistry vials.

As crystals grew randomly in each vial, the robot would observe the formations via camera, detecting and recording the myriad of variables resulting, including crystal location, size, shape, orientation, and colour.

Snapshots of the vial array were captured every 10 minutes, and the images then converted into binary sequences. In subsequent encryption-cracking tests, the output of the crystallisation robot satisfied randomness tests specified by the National Institute for Standards and Technology, beating the results of conventional computer-based pseudorandom number generators.

"We found our messages encoded with the genuinely random numbers took longer to crack than the algorithm, because our system could guess the algorithm and then just brute force it," one of the team, chemist Leroy Cronin told Vice.

Of course, while it's a remarkable proof of concept – the first example of generating true random numbers using the stochasticity of chemistry, the team claims – it might not be the most practical way of achieving randomness.

After all, not everybody may have the physical space to host a crystallisation robot running hundreds of chemical experiments in tandem.

Fortunately, the researchers suggest the same kind of system might be capable of miniaturisation in the future – somehow sealing all those infinite possibilities within the body of conventional electronic computers.

"This is a bit of a crazy idea, but this is a way of searching chemical space," Cronin told Vice. "Because chemical space is just too big to explore. There's a lot to be said for going in a random direction."

The findings are reported in Matter.