Federal courts cannot hear challenges to partisan gerrymandering, according to a 5-4 Supreme Court decision on Thursday.

In her dissenting, Justice Elena Kagan warned that in the age of machine learning and artificial intelligence, this decision could put US democracy at risk: "Someplace along this road, 'we the people' become sovereign no longer."

To Justice Kagan's point, software is already at work that can help "crack and pack" voting districts into arrangements more suitable to one party or another.

The possibility of ending partisan gerrymandering — the practice of redrawing voting districts in favor one party over another — was all but obliterated on Thursday, when the Supreme Court ruled in a 5-4 decision that challenges to the controversial practice cannot be heard in federal court.

In an impassioned dissent, Justice Elena Kagan warned that in the era of artificial intelligence, such a move could put American democracy at risk.

"Gerrymanders will only get worse (or depending on your perspective, better) as time goes on — as data becomes ever more fine-grained and data analysis techniques continue to improve," she wrote. "What was possible with paper and pen — or even with Windows 95 — doesn't hold a candle (or an LED bulb?) to what will become possible with developments like machine learning. And someplace along this road, 'we the people' become sovereign no longer."

While gerrymandering isn't new, machine learning — the process of making algorithmic predictions based on historical information, and a cornerstone of modern artificial intelligence development — certainly is. Amazon, Google, Microsoft, and just about every other major tech company are making AI and ML core to their products and services, and the technology is increasingly available to software developers for use in their own projects.

Sophisticated computer programs are already being used to more efficiently "crack and pack" voting districts into arrangements more suitable for one party or another; to Kagan's point, the advent of machine learning means this is unlikely to slow down.

And if voting districts look strange now — often resembling stick-figure impressionist paintings, rather than distributed voter groupings — just imagine how they could appear when artificial intelligence is able to predict exactly which voters need to be in which districts in order for a specific party to win.

But Chief Justice Roberts did not seem perturbed by the possibility.

"We conclude that partisan gerrymandering claims present political questions beyond the reach of the federal courts," he wrote in his majority opinion. "Federal judges have no license to reallocate political power between the two major political parties, with no plausible grant of authority in the Constitution, and no legal standards to limit and direct their decisions."