Top Stories
Top Stories

Hershey's wants to make the perfect Twizzler — so its tapping Microsoft-powered A.I. to do it

Key Points
  • The weight of each Twizzler varies just a little bit because of slight variations in temperature.
  • But when consumers buy a package, it promises them a specified net weight.
  • A partnership with Microsoft has leveraged machine learning to fix the problem.
Julia Ewan | The Washington Post | Getty Images

The licorice-makers at Hershey's factory in Lancaster, Pennsylvania, have been trying for years to perfect the art of the Twizzler.

The weight of each chewy, Helix-like licorice stick varies just a little bit because of slight variations in temperature, said George Lenhart, a senior manager at Hershey's who oversees disruptive technology. If the licorice gets even slightly too cold as it goes through the machines, it will be too light. A tiny bit too much heat makes the licorice heavy, Lenhart said.

But when consumers buy a package, it promises them a specified net weight (such as 1 pound) or number of pieces of the fruit flavored candy. Hershey must consistently follow through, offering a pound or more per package.

This has created a big, expensive mass production problem for the Twizzler assembly line. Yet now, a partnership with Microsoft has leveraged machine learning to teach robots the art of Twizzling.

The challenge of the perfect Twizzler

Each 900-gallon batch of licorice must cook for 4 hours before traveling through holding tanks and pipes to a pressurized machine called an extruder, which pushes the licorice through like Play-Doh.

If the licorice came out of the extruder too light, it either had to be re-extruded or more licorice needed to be added to the batch, a time-consuming process, Lenhart said.

"We had to go a little heavy all the time," Lenhart said.

Source: Hershey's

On the other hand, if it came out too heavy, the machine produced an extra 100 grams of candy per minute, wasting precious ingredients. To minimize waste, Hershey's operators manually weighed the licorice every 15 minutes, adjusting the machine 12 times a day to try and standardize the Twizzlers.

"Variability is something that we are always are trying to minimize," Lenhart said. "They have spent years perfecting it, but if I could predict the weight of the licorice, would I be able to adjust the machine automatically."

He added: "If the highs are not as high, lows are not as low, you are getting closer and closer to the net weight number is without going below. The less waste, the more profitable."

Lenhart has been obsessed with this since he joined Hershey's in 2010. He started by doing business intelligence and data-mining, and gained an intimate knowledge of each plant. Then, he attended a Microsoft tech conference, and it clicked.

60 million data points

Hershey's set up a line to transmit data directly back and forth to Microsoft's Azure cloud, collecting more than 60 million data points from 23 sensors over two months. The system tracks pressure, temperature, rotations per minute, and other factors across the licorice-making process.

After Lenhart was able to use the program to track which data points affected the final weight of the licorice, the machine learned to adjust itself about 240 times a day, reducing weight variability by 50 percent. Along the way, Lenhart also found other fixes across the factory.

Now, Hershey's is building machine learning into its new lines.

"We are looking at the chocolate next," Lenhart said. "The ingredients in chocolate are far more expensive, so small savings have a much higher return. We are putting plans together. They would love it if we could do it on every line right away."