The moon doesn't lose a lot of staring contests.

But every now and then, Earthlings who train telescopes on the natural satellite get a a real eye-opener: the moon blinks back at them.

A light, often red or pink, may suddenly flash from the darkness. It lasts a mere second. Other times, the seemingly random twinklings go on for hours.

Is it Morse code? Is someone stranded up there? What are you trying to tell us, Man on the Moon?

Scientists have a name for the effect — transient lunar phenomenon, or simply,TLP. But they don't know much else. Despite flashing moon lights being recorded for decades, scientists remain as baffled as ever about their origin.

A map showing TLP activity on the moon. A map showing reported sites of TLP, with red dots signifying reddish clouds and all other events represented by yellow dots. (Photo: Wikipedia)

Is there a method to those pulses of light, often emanating from several points of the moon at once? Theories range from meteorites pelting the moon to gasses being vented from deep beneath the surface.

But astronomer Hakan Kayal may have solved this riddle once and for all by literally connecting the dots.

Kayal, a professor at Germany's University of Würzburg, built a moon telescope, deploying it in Spain earlier this year. From its rural base north of Seville, the telescope is mostly free from meddling light pollution, allowing its unflinching eye to remain fixed on the moon.

Make that two eyes. The telescope incorporates dual cameras, each remotely operated from the university campus in Bavaria. When those cameras detect a burst of light, they automatically start recording images, while sending an email to the German research team: The moon is doing that thing again.

But the real sleuthing will be done by software. Kayal's team is still honing an AI system that will be able to zero in on flashes of light that originate strictly from the moon.

That's no small task considering the dizzying number of distractions in the night sky — including counterfeit constellations like Elon Musk's Starlink satellite network.

Scientist Hakan Kayal poses with his lunar telescope. Hakan Kayal pictured here with the the fully automatic lunar telescope he built. (Photo: Tobias Greiner/University of Würzburg)

But once the lunar telescope's AI is trained to tune out distractions — it's expected to be ready in about a year — Kayal says it will be fully tuned into TLP, recording the moon's every twinkling outburst.

"One main task for us is to further develop our software for the detection of the events with as low false alarm rates as possible," Kayal tells Popular Science. "We already have a basic version which works but there are improvements necessary. As the project is not third party-funded yet and only funded by the resources of the university itself, there is not very much manpower for the software. But we have students who can help to improve the software within their study."

Once those dots are connected, scientists may, for the first time, be able to analyze patterns and come up with a credible theory for that baffling lunar light show.

For now, Kayal has one of his own:

"Seismic activities were also observed on the moon," he suggests in a press release. "When the surface moves, gases that reflect sunlight could escape from the interior of the moon. This would explain the luminous phenomena, some of which last for hours."

We're close to solving the mystery of those flashing lights on the moon
A German scientist's AI-powered lunar telescope aims to decipher the moon's twinkling lights.