In a lab near Bedford, UK, the world's largest publicly listed ice cream maker, Magnum, is dreaming up the future of frozen treats. And that future, apparently, glows in the dark. A pale yellow lolly, launched in Ibiza's clubbing scene, uses vitamin B2 to glow under UV lights - because nothing says 'rave' like a dairy product that doubles as a glow stick.

But ice cream is serious business, and innovation is the name of the game. With rivals like Häagen-Dazs owner Froneri and Baskin-Robbins (the world's largest ice cream chain) nipping at their heels, plus a swarm of artisanal upstarts, no one can afford to stand still. The market is as unpredictable as a toddler on a sugar rush, and prices swing with geopolitical whims.

"We've had five years of price volatility impacted by war in Ukraine, Covid, the cost of living crisis. We've now got the Strait of Hormuz. We've just been in this constant state of instability when it comes to pricing," says Georgia Rose, principal analyst at Kantar Retail IQ. Those fluctuations hit everything: dairy, cream, eggs, vanilla, chocolate, sugar, fruit, and the often-overlooked cold-chain energy costs.

Magnum, spun off from Unilever last year with a market cap of around £8bn, is fighting back with tech. They own three million fridges (built by third parties), some fitted with cameras that upload images to data centres. AI identifies each product and uses depth-recognition to estimate sales and restocking needs - because nothing says 'efficiency' like a fridge that tattles on your ice cream consumption.

The fridges are also 40% more energy-efficient than their 2010 counterparts, says Zbigniew Lewicki, chief research, design & innovation officer. "Will we ever be able to absorb every shock? I can't say, but it's definitely one way of making the business long-term resilient."

Innovation is also going global, with Asia leading the charge. Lewicki notes, "The inspiration and trends come from the East. There's an incredible intensity of innovation in places like Japan, Korea and China." One product born from his trips is Volcanics, a chocolate-shelled bar with a caramel lava centre - "four dimensional," he calls it, because apparently three dimensions weren't enough.

Shanghai-based trend researcher Neil Yan of MMR agrees Asia is the new ice cream epicentre. In China, ice cream is "a new centre of gravity, representing a part of Chinese people's lifestyle." And that means flavour experimentation knows no bounds. "We have ham, pickled garlic, tahini, and stinky tofu and liquor. Just below my office is a shop whose speciality is vodka, foie gras and apple in one scoop," Yan says. Because why settle for boring old vanilla when you can have a scoop of pâté with a kick?

Health-conscious innovation is also on the rise. Honorata Jarocka, associate director at Mintel, points to protein-packed ice cream. With the GLP-1 weight-loss drug movement (think Ozempic and Mounjaro), people want filling treats. David bars from US company David Protein pack 20g of protein and cost $39.99 (£30) for a 12-pack - more than double Magnum's Yasso frozen yoghurt bars. But they're a hit because consumers are choosing "high quality, smaller portions, and are able to maybe pay a bit more for products with extra benefits."

Back in Bedford, a robot named Eric is helping perfect the chocolate viscosity on Magnum bars for the ideal crunch. Eric collects data 24/7 - something even the most dedicated ice cream fan couldn't do, unless they're willing to give up sleep for the sake of dessert science.