Hunting a serial killer is, according to experts, a fundamentally different type of detective work than any other type of homicide investigation. For decades the top investigators in this hyper-specialized field have turned to technology. In 2017 this means AI, and just like everything else, it’s revolutionizing the industry.

It’s impossible to know how many active serial killers there are in the US right now. Due to law enforcement and other government reporting failures, miscategorized evidence, and genuine mystery the best estimate we have is somewhere between 25 and 340. The FBI thinks about 150 people a year are murdered by these predators. Other experts think that number is much higher.

There’s a dark future ahead for serial killers, but first machines need to understand what they’re dealing with. There’s an adage that goes “to catch a killer, you have to think like one” and this is true of computers as much as men.

One academic, in conjunction with The History Channel, is teaching AI to think like a killer by exposing it to all the information available on The Zodiac Killer. As reported by History.com’s Brynn Holland and Missy Sullivan:

In the late 1960s and early 1970s, the self-named murderer terrorized Northern California with a succession of random killings and taunting letters to the police and newspapers. Four of those communiqués contained ciphers filled with perplexing letters and abstract symbols. Cryptologists consider the Zodiac’s 340-character cipher, sent to The San Francisco Chronicle in November 1969, a holy grail of sorts.

The AI, named CARMEL, and its creator, Kevin Knight, already have a legacy. They broke a code called the Copiale Cipher, that’d held its secrets unsolved since the 18th century.

Another fun fact about CARMEL: it’s quite the accomplished poet. The machine creates impromptu poetry on demand (and free of charge) on its website. You can check it out here and, as you may have guessed, its work is decidedly creepy.

Solving an old case, however, won’t necessarily provide any actionable insight on our current serial killer problem. In order to take the hunt for these very real monsters to the next level, we need to treat the data we have on serial killers as seriously as Facebook treats the data it has on your family.

You probably guessed that this requires AI, and you’re correct.

The New Yorker recently profiled Thomas Hargrove and his algorithms. Together, along with several other team members, they comprise the Murder Accountability Project (MAP). The group writes:

America does a poor job tracking and accounting for its unsolved homicides. Every year, at least 5,000 killers get away with murder. The rate at which police clear homicides through arrest has declined over the years until, today, about a third go unsolved.

That’s terrifying. However, they’re a group with solutions. Thanks to some good old fashioned hardcore investigative journalism and a healthy amount of machine learning insights they’ve been able to create a map of murder. That may sound macabre, and it absolutely is, but it’s also providing the type of pattern based insight that AI is better at gleaning than humans.

In Chicago, right now, the group is concerned there’s a serial killer strangling women. Its AI has identified several “suspicious clusters” of murder activity which it reported to the FBI for investigation. While typically these types of deaths might be attributed to gang activity or other types of killings, AI is able to discern specific types of patterns and connect them.

And it’s not just Chicago. Hargrove’s group has found many clusters all over the country.

On the MAP website users can search through its database of current and historical murder statistics, like a Google Analytics for killings. It appears limited to the US, but otherwise it’s a robust tool, and a fine example of how AI can be used for the forces of good.

Even when AI isn’t purpose built for tracking serial killers or cracking codes, it still represents a future bright with potential.

Just like oncologists will one day rely on AI to confirm their diagnoses (or even provide them), it’ll be imperative that all data gathered at a crime scene be run by an AI that can produce leads or direct investigations.

Agencies are beginning to employ AI, like Veritone’s, to sift through video. This is a task that we’ve had to rely on humans to do traditionally. In a future where thousands of hours of video can be analyzed instantly, our ability to connect the dots between one murder and the next will increase exponentially.

And while, presumably, there will always be twisted humans born with whatever affliction of the mind causes a person to commit atrocity, it’s comforting to know that advances in technology are making our world a safer place.

Read next: Bitcoin exchange NiceHash robbed of $64 million from its wallet