A massive, 7.1-magnitude earthquake struck Mexico City in September, killing 370 people and injuring more than 6,000.

Few experts in the field of seismology were surprised another quake had struck Mexico, one of the world’s most seismically active countries with an estimated average of 40 earthquakes, mostly minor ones, every single day. Yet despite the certainty that earthquakes will occur, scientists have so far failed to gain insight about precisely when they will happen.

The ability to predict future earthquakes — both the timing and strength — is a defining challenge for the field of seismology. Providing enough advance warning for, say, the residents of Mexico City, San Francisco, or other major cities along faultlines to evacuate could save thousands of lives. Yet it’s a task so daunting that some scientists believe it cannot be done.

Now, a team of scientists working at the Los Alamos National Laboratory and the University of Cambridge says they might — just might — have cracked the code by using artificial intelligence.

“One has to be really cautious, because we don’t want to be considered nutcases by our colleagues,” Paul Johnson, a Los Alamos National Laboratory fellow and lead investigator on research recently published in the journal Geophysical Research Letters, told Seeker.

Many attempts have been made in the past to predict earthquakes, from observing the unusual behavior of animals to monitoring for electromagnetic anomalies.

But until now, the best method for predicting earthquakes remains, essentially, looking for a pattern in past earthquakes and then forecasting the likelihood of a future quake based on that pattern.

For example, in late 2016, the Working Group on California Earthquake Probabilities raised its estimate to a 72 percent probability — up from 63 percent — of at least one earthquake of magnitude 6.7 or greater striking somewhere in the Bay Area before the year 2043.

“The Bay Area has been anomalously quiet,” David Schwartz of the US Geological Survey and who participates in the earthquake program told The Mercury News last year. “That has to end.”

The technique involves listening to the subtle “creaking and grinding” of the fault zone between major earthquakes — information that computers, using machine learning techniques, can use to determine when the next big rupture is coming by making judgments about underground forces and friction. The technology to interpret those signals has in fact been available for years, according to Johnson, but recent upgrades in computing power allow for the collection and storage of vast amounts of data in between earthquakes. The ability to actually process all that extra data has made Johnson’s approach technically feasible.

This machine-learning technique, in which the computer was fed the raw data and directed to find the signal of a forthcoming quake, turned up markers that human scientists had missed, Johnson said.

The new system has been operating on an “earthquake machine” within a laboratory, essentially a miniature model of a geological fault. And so far the system is working well.

“We completely missed these signals, and it turned out they were incredibly important,” Johnson said. “They allowed us to predict the timing of the next laboratory earthquake. We can do this over and over again. It’s a very well-supported statement.”

Now, Johnson and his colleagues are taking the process out into the field. The field study has already yielded encouraging results, which are now being drafted into a forthcoming paper, Johnson says.

“We succeeded in the laboratory,” Johnson says. “But can we do it in the earth? That’s to be seen. The earth is much, much, much more complicated. But our initial work suggests the kinds of things we’re looking for in earth are there.”