What makes basil so good? In some cases, it’s AI.

Machine learning has been used to create basil plants that are extra-delicious. While we sadly cannot report firsthand on the herb’s taste, the effort reflects a broader trend that involves using data science and machine learning to improve agriculture.

The researchers behind the AI-optimized basil used machine learning to determine the growing conditions that would maximize the concentration of the volatile compounds responsible for basil’s flavor. The study appears in the journal PLOS One today.

The basil was grown in hydroponic units within modified shipping containers in Middleton, Massachusetts. Temperature, light, humidity, and other environmental factors inside the containers could be controlled automatically. The researchers tested the taste of the plants by looking for certain compounds using gas chromatography and mass spectrometry. And they fed the resulting data into machine-learning algorithms developed at MIT and a company called Cognizant.

The research showed, counterintuitively, that exposing plants to light 24 hours a day generated the best taste. The research group plans to study how the technology might improve the disease-fighting capabilities of plants as well as how different flora may respond to the effects of climate change.

“We’re really interested in building networked tools that can take a plant's experience, its phenotype, the set of stresses it encounters, and its genetics, and digitize that to allow us to understand the plant-environment interaction,” said Caleb Harper, head of the MIT Media Lab’s OpenAg group, in a press release. His lab worked with colleagues from the University of Texas at Austin on the paper.

The idea of using machine learning to optimize plant yield and properties is rapidly taking off in agriculture. Last year, Wageningen University in the Netherlands organized an “Autonomous Greenhouse” contest, in which different teams competed to develop algorithms that increased the yield of cucumber plants while minimizing the resources required. They worked with greenhouses where a variety of factors are controlled by computer systems.

Similar technology is already being applied in some commercial farms, says Naveen Singla, who leads a data science team focused on crops at Bayer, a German multinational that acquired Monsanto last year. “Flavor is one of the areas where we are heavily using machine learning—to understand the flavor of different vegetables,” he says.

Singla adds that machine learning is a powerful tool for greenhouse growing, but less useful for open fields. “These controlled environments are where you can do a lot of optimizing by understanding the complex variables,” he says. “In the open environments it’s still a question how we can close the gap.”

Harper added that in the future his group will consider the genetic make-up of plants (something that Bayer feeds into its algorithms), and that they will look to release the technology to anyone. “Our goal is to design open-source technology at the intersection of data acquisition, sensing, and machine learning, and apply it to agricultural research in a way that hasn't been done before,” he said.