Louise Comfort was in Pennsylvania when a wildfire tore through the Oakland hills in 1991. A friend called and told her: “Louise, I’m watching your house burn down on CNN.”

Hers was the last house destroyed on Golden Gate Avenue, her home for over 50 years. “Everything east of my house was totally destroyed,” she said. “All that was left was a graveyard of chimneys.”

Dr. Comfort is a professor emerita at the University of Pittsburgh, where she studied decision-making and communications during earthquakes and tsunamis. Although she taught on the East Coast for three decades, she returned to her Oakland home each summer. Now she’s back permanently, working with a University of California, Berkeley, team that’s focused on fire.

The Marin Wildfire Prevention Authority has hired the group to work on a computer modeling project intended to help firefighters, rescue workers and policymakers mitigate obstacles to evacuation before disaster strikes. The effort is being led by Sonoma Technology, a Petaluma environmental firm. It focuses on five communities that face difficult evacuation challenges: Inverness, Fairfax, Novato, San Rafael and Tamalpais Valley.

The modeling project has evolved into a second one—a computer simulation designed to help ordinary citizens consider their personal evacuation plans. Led by the U.C. Berkeley team and researchers from U.C. Davis and U.C. Santa Cruz, the simulation will cover both Marin and Alameda Counties.

Think of SimCity—a video game that allows users to create their own digital town—but with wildfire simulation tools. It will illustrate the different paths a wildfire might take and how it would impact communications, traffic and emergency services. The simulation will identify fire-safe buildings where people could take shelter, potential bottlenecks and alternate routes, where those exist. 

It will be a useful tool for residents across Marin, said Mark Brown, the M.W.P.A.’s executive officer. “When people are panicked, they make their worst decisions,” he said. “One of the ways to reduce panic during an emergency is to practice what you’re doing. This game will help people feel more prepared.”

The M.W.P.A.-funded project is scheduled to be completed in March. The U.C. project will be funded by a $2.5 million grant from the National Science Foundation and will take three years to complete.

Both projects underscore the challenges of planning for evacuations in small, remote communities with few ways in and out—and sometimes just one. People are less likely to panic if they have thought things through in advance, Dr. Comfort said, and they are more likely to anticipate potential obstacles that could impede their escape.

“People understand complex problems much more quickly if they can visualize them,” Dr. Comfort said. “We think these games will literally change the mindset of people who live in these communities.”

The projects took root in an unlikely location: Palu, the capital city on the Indonesian island of Sulawesi.

Dr. Comfort was part of a team in Palu developing a tsunami alert system in 2018. Just days before they were scheduled to try it out, bureaucratic snags prompted the Indonesian government to scratch the test. 

Ten days later, a tsunami swamped the city, killing more than 4,300 people. An Associated Press dispatch about the incident described Dr. Comfort’s project, which was later mentioned in the New Yorker magazine.

Back in West Marin, Judith Shaw, then a board member of the Bolinas Fire Protection District, read the New Yorker piece. She contacted Dr. Comfort to see if her team might be able to develop an early wildfire warning system for her community. 

“Louise said that if they had had a warning system in Palu, then all those people wouldn’t have died,” Ms. Shaw said. “I called her because in Bolinas we had no warning system and only one way out. If a fire’s coming down the road—you can imagine all the cars and the old people coming down with their walkers—it’s insanity.”

Dr. Comfort contacted Kinichi Soga, a traffic engineer who leads the wildfire research team at U.C. Berkeley. They won a $60,000 seed grant and began working on a rudimentary fire simulation game for Bolinas. That effort was disrupted by the Covid-19 pandemic but evolved into the M.W.P.A. project focused on the five other Marin communities.

Dr. Comfort and Dr. Soga studied the Camp fire in Paradise, which killed 84 people just a few months after the tsunami devastated Palu. They hoped to apply some of the lessons from Paradise to communities in Marin. 

Emergency personnel managed to evacuate 26,000 people from Paradise in just three hours, Dr. Comfort said, but many of them sought to escape through the nearby city of Chico, where traffic signals stopped them. 

Chico officials didn’t know people were fleeing in their direction until the cars arrived. If they had known, they could have altered the signals to allow the traffic to flow, Dr. Comfort said. “People were stalling. The fire was coming. Cars were going off the road. It was a very tense situation,” she said. 

The M.W.P.A. project is intended to help firefighters, rescue workers and emergency management planners address such issues before fire strikes. Are the roads too narrow? Are they winding up a hill with houses bunched close together? Are they congested at certain times of day? What kind of vegetation grows along the evacuation route? How will it burn under different weather conditions?

The project has two phases. The first will present a snapshot of the roads as they are currently configured, Mr. Brown said. This will help first responders prioritize which projects to undertake to improve exit routes. The models could then be used for the second phase—developing  software that measures how much an individual project would reduce risk.

The agency is spending $600,000 for the modeling. If it goes ahead with the software, the total project cost would be $1.2 million.

“We’re developing a tool to help them identify vulnerable evacuation routes throughout the county, and to understand what factors make those routes vulnerable,” said Tami Lavezzo, a senior technologist at Sonoma Tech who is managing the project. “These models will allow us to home in on areas that have higher relative risk than others.” 

In places such as Inverness, with one road in and one road out, the best solution might be to head to the nearest body of water—in most cases, Tomales Bay, Dr. Comfort said.

When the fire struck her Oakland neighborhood, a truck stalled in one subdivision, blocking the only road out. People tried to flee on foot but ended up running into a wall of fire. “If they had jumped into the swimming pool, it would have been hot, it would have been scary, it would have been terrible, but they would have lived,” Dr. Comfort said.

Marin’s road network can’t handle the volume of cars and trucks that would attempt to escape during an evacuation, she said. The Berkeley group ran one simulation in which it took 10 hours to evacuate 7,000 people from Fairfax.

“It might not be possible to get everyone out at the same time,” Dr. Comfort said. “So, what are the offramps? Is it possible to create shelters? Are there buildings made of fire-resistant materials where you could house people until the fire passes by?”

In the Paradise fire, she said, about 250 people sheltered in a new Walmart constructed of fire-resistant materials. Fire engines took up positions outside to keep flames at bay. “The people inside were hot, it was smoky, but they were alive,” she said.

Local firefighters agree that advance planning is useful, but some question whether a high-tech, digital solution is the best fit for their small communities. 

“It’s always useful to think about what-ifs,” said Inverness Fire Chief Jim Fox. “But it would be more appropriate where you have a large city with multiple roads where you’re looking at evacuation for a much larger population,” he said.

Inverness first responders are already familiar with the community’s roads and the obstacles to evacuation, Chief Fox said. They know where the houses are and how to reach people in an emergency. “This study is going to pretty much confirm what we already know: There’s one road in and there’s one road out,” he said.

Researchers are hoping their findings can be applied to communities of all sizes and encourage officials to view emergency evacuations in a regional context. For Dr. Comfort, the project is personal. “The memory of the Oakland fire is seared in my mind,” she said.