Literally weighing the universe may sound like an impossible task, but it can be done—at least to a degree. For decades, astrophysicists turned to what’s known as “integrated electron pressure” as a proxy for measuring the mass of galaxy clusters, which involves the interaction of photons and gravity, among many other complicated factors. But that stand-in is by no means perfect, and often can result in less-than-reliable measurements depending on galaxy clusters’ various influences. Now, however, researchers believe they have developed a (relatively speaking) simple solution to the issue alongside some assistance from artificial intelligence.

As detailed this month in a paper published with Proceedings of the National Academy of Scientists, a team composed of researchers from the the Institute for Advanced Study, the Flatiron Institute’s Center for Computational Astrophysics (CCA), Princeton University, and elsewhere have utilized an AI tool called “symbolic regression” to hone their galactic weigh-ins. As a statement from collaborators at the CCA explains, the tool “essentially tries out different combinations of mathematical operators—such as addition and subtraction—with various variables, to see what equation best matches the data.”

[Related: We finally have a detailed map of water on the moon.]

The team first entered a cutting edge universe simulation featuring a host of galaxy clusters into the tool, then the AI located variables that could increase mass estimations’ accuracy. From there, the AI generated a new equation featuring a single new term atop the longstanding version focused on integrated electron pressure. Working backwards, researchers discovered that gas concentration corresponds to areas of a galaxy cluster featuring less reliable mass estimations—i.e. the supermassive black holes located within galactic cores.

“In a sense, the galaxy cluster is like a spherical doughnut,” the CCA’s announcement describes. “The new equation extracts the jelly at the center of the doughnut that can introduce larger errors, and instead concentrates on the doughy outskirts for more reliable mass inferences.”

In any case, the team plugged the AI-scripted new equation into a digital suite containing thousands of simulated universes, and found that it could produce galaxy cluster mass estimates with between 20 and 30 percent less variabilities. “It’s such a simple thing; that’s the beauty of this,” study co-author and CCA researcher Francisco Villaescusa-Navarro said in the announcement. “Simple,” of course, may be a bit of an overstatement to those not in the business of weighing galaxies, but one thing is for certain—a jelly donut sounds pretty good right now.