❌

Reading view

This AI entrepreneur is developing agents that can plan ahead for the unexpected

Danijar Hafner’s office in San Francisco’s SoMa district sits mostly empty. His brand-new startup is still in stealth mode and doesn’t even have its name on the door. On the day I visit, there’s only one other person there, and little in the way of furniture. But what it lacks in decor, it makes up for in robots. Humanoids of various shapes and sizes hang like marionettes from racks that run down the center of the wide-open space.

While Hafner, 31, won’t say too much about his new venture just yet, he describes it as a continuation of his longtime work to enable AI to navigate environments it has not encountered in training. The humanoids, which he imports from China, are the next evolution of this work—and its physical embodiment. Their ability to react in previously untested scenarios will be key to getting robots into human spaces. Because if you want to send a robot into a person’s home, for example, it needs to be able to handle a floor plan and furniture it’s never seen before. 

To achieve this, Hafner relies on something called model-based reinforcement learning. He develops world models—AI models designed to emulate physical reality—and trains agents within them. The agent essentially treats the model as a real-world simulation and learns how to act there. It then uses those experiences to make predictions (to dream or imagine, Hafner might say) about future outcomes. That allows agents—or the robots they’re embedded in—to navigate unfamiliar situations IRL.

“I get to interact with a lot of really smart people in research at Google, and he easily sits in the top half of 1%.”

Timothy Lillicrap, Google DeepMind

Unlike other efforts, Hafner’s technique enables agents and the robots they control to execute massively complicated tasks without the real-world trial-and-­error training that’s traditionally been used in robotics. 

Hafner grew up in a rural town in northeastern Germany, where his parents were both classical musicians. He learned programming from a neighbor, and in high school he began taking online courses about AI, which quickly developed into a passion. “I was always fascinated with how thinking works,” he says. AI offered him a way to emulate it on a computer.

In 2015, as a second-year under­graduate studying engineering at Hasso Plattner Institute in Potsdam, he won a role as a student researcher at Google Brain. From there, he went on to a dozen internships and other positions at the company, including stints with Google Brain and Google DeepMind (the two have since merged under DeepMind) in the UK, Canada, and the US. He worked with industry legends including Geoffrey Hinton, who is often referred to as one of the godfathers of AI, and Ashish Vaswani, coauthor of the groundbreaking research paper “Attention Is All You Need,” which described the transformer technology used by today’s large language models.

One of Hafner’s former managers and coauthors at Google, Timothy Lillicrap, describes him as a standout among standouts. “I get to interact with a lot of really smart people in research at Google, and he easily sits in the top half of 1%,” Lillicrap says. “In many cases he would build, single-­handedly, things it would take entire teams of engineers to build.”

Over the years, Hafner has honed and proved his approach by pitting agents trained within his world models against popular video games. His first breakthrough was PlaNet, a model that allowed agents to execute actions by planning ahead. His Dreamer 2 was the first agent to hit human-level performance playing Atari 2600 games using a world model. Dreamer 3 was the first one to solve the Minecraft Diamond challenge—successfully mining in-game gems on its own. And Dreamer 4 went a step beyond that by learning to mine diamonds from an offline data set of recorded game-play videos, without ever interacting with the game directly. 

More recently, he’s begun to migrate his agents out of the virtual world and into physical reality. His DayDreamer project used the Dreamer algorithm to let robots operate themselves in novel environments and react to new experiences (such as being pushed over) without any specific training. 

Today, Hafner is working on his new startup, which he left Google DeepMind to form in the fall of 2025. Though he’s coy about his next steps, it’s clear he’s dreaming big: “I was interested in solving a problem,” he hints, “that would change the world.” 

  •  

All challenges big and small

When I was 18, I skipped my high school graduation and headed to Kuwait. It was 1991, the first Gulf War had just ended, and the country was in complete chaos. There was little to no electricity, aside from generator power. Rubble and unexploded ordnance were everywhere. Massive oil fires lit up the desert and dimmed the sky overhead. Everything had to be rebuilt, and fast. 

I was there to work on that reconstruction, part of an international effort to fix what war had broken. It was the first time I’d ever seen a truly massive engineering project with my own eyes. The challenge was one that had to be addressed on multiple fronts, simultaneously, to get an entire country back up and running. 

Everywhere you looked, there was something to do. I was mostly working with a labor crew to jump on quick fixes to things like windows and doors blown out in the fighting. But there were, of course, bigger jobs too. Most notably, there were those massive fires to put out. The Iraqi army had set hundreds of oil wells ablaze, the majority of which were still spewing soot and oil smoke into the air. On bad days, the sky would remain dark all day, and the air would burn your eyes and hurt your throat.

It was so apocalyptic that none other than Carl Sagan warned of massive environmental consequences. If smoke from the oil fires reached the stratosphere, he predicted, the result could be akin to the 1815 explosion of the Tambora volcano in Indonesia, which triggered what’s known as “the year without a summer”; global temperatures dropped between 0.4 and 0.7 °C, and crops failed around the world. Fortunately, the plume from Kuwait never made it that high, and although temperatures did decline regionally, there was little effect on a planetary scale. As it turns out, predicting what will or won’t lower global temps is quite hard. (Reader, I am foreshadowing here.) 

Firefighters from companies with monikers like the Red Adair Company or Boots and Coots (as well as less colorfully named outfits, like Bechtel) rushed to Kuwait after the war’s end to figure out how to extinguish the gargantuan blazes and cap the wells. At a hotel in downtown Kuwait City, one of the few places with working phone lines, I would occasionally run into them covered head to toe in black oil and soot. 

Putting out the fires took all sorts of creative thinking. Engineers working in the burning oil fields figured out they could repurpose existing pipelines meant to pump oil out to sea to instead pump water in from the Persian Gulf. One company from Hungary rigged up a firefighting machine called Big Wind by outfitting an old Soviet T-34 tank chassis with two turbines from a MiG-21 fighter jet, each of which could blast 220 gallons of water per second. Sadly, I never got to see it in action (except in the movies). 

Other jobs were less cinematic but no less dire. The retreating Iraqi army had left booby traps all over. They snaked hand grenades into the plumbing (at a facility where I worked, among others). They planted mines everywhere, and those had to be found and removed. Many of them were small plastic “toe poppers” designed not to kill but to maim. Hunting them was a herculean effort. And although it was mostly successful, hundreds of thousands of them, by some estimates, still remain.

Which is to say, we can’t fix everything. But we can be ambitious. We can take on the challenge of making the world better through human ingenuity. 

That’s what the July/August issue of MIT Technology Review is all about. Sometimes the challenges we face are giant, if knowable, like tunneling beneath the seafloor. Some exist at the nanoscale and represent decades of investment and research, as is the case with ASML, a company with the singular ability to produce the machines that make the most advanced computer chips in the world. Others represent problems at a planetary scale and take us into truly unknown territory, like a future where we could engineer the veil of the Tambora volcano to cool the Earth on purpose.

By the end of my 90-day contract in Kuwait, instead of damage everywhere you looked you could see the fruits of a gargantuan international rebuilding effort. The air was not clean, exactly, but inhaling it no longer felt like smoking a pack a day. On the beach, which had been pocked with mines, people swam and splashed at the edge of the gulf. The lights were on. Water ran from the taps. The markets were open. It was a remarkably different place. 

Yes, forces both within and beyond our control will always break things. People will invariably make mistakes, or act out of their own self-interest to the detriment of others. But we can also come together to get to work and, when the smoke clears, find we’ve made real progress. 

  •  
❌