At 6'5", Aaron Dennis towers over the whiteboard beside him. Blue marker in hand, the 22-year-old hunches slightly to jot down suggestions being shouted by a group of people deep into a brainstorming session. Dressed mostly in nerdy T-shirts (one reads Science! with a test tube in place of the letter i), they're trying to come up with names for a tech tool they plan to build during a two-day hackathon at Tufts University’s data lab.

The group includes computer science PhD candidates, mathematicians, political operatives, and experts in so-called geographic information systems, or GIS. That’s the mapping technology that underlies many apps and software tools that run our lives, from Google Maps to logistics software.

It also comes in handy when you’re carving the American electorate into voting districts that favor your political party, a time-honored—and reviled—tradition known as gerrymandering.

That’s what’s brought the group here to Tufts. They’re participants in a weeklong summer camp of sorts for adults focused on how math and technology can be used to make electoral maps more fair, and to convince judges and juries when they’re not. Gerrymandering, they believe, allows politicians to choose their voters, not the other way around. This event is the first of many planned by the unfortunately named Metric Geometry and Gerrymandering Group at Tufts. You can think of the hackathon as the arts and crafts part of the week—a chance for the geeks to get their hands dirty. Attendees had to apply to this session; just 14 made the cut.

On the whiteboard Dennis has scribbled “Gerrymandr,” “Gerrymetrics,” and “Politishape.”

“What about Salamander?” offers 33-year-old Ariel M'ndange-Pfupfu, a data scientist from Washington, DC. Gerrymandering got its name, after all, in 1812, when then-Massachusetts Governor Elbridge Gerry ratified a political map in which one district looked like a salamander.

The group quickly settles on the name Mander. The consumer-friendliness pretty much ends there. Try to stay awake for this part: Mander is a set of code written in the Python programming language that calculates how compact a district is. Compactness is often used as a kind of shorthand for fairness in legal debates over gerrymandered districts. The thinking assumes, not always correctly, that compact districts are better for democracy. But there’s no uniform way to measure compactness. In some places officials just eyeball it. Dennis and his team want to build a simple tool to ensure “everyone’s using the same code.”

It’s not exactly the sexiest idea, particularly when some believe tech could eradicate gerrymandering. Just feed a machine data about the electorate and a few legal parameters, and surely it will draw fairer maps than the partisan hacks who do most redistricting today. Spend a week at gerrymandering camp and you’ll quickly see how naive that is.

Justin Solomon is the organizer of the Metric Geometry and Gerrymandering Group hackathon and an assistant professor in MIT's Computer Science and Artificial Intelligence Laboratory. M. Scott Brauer for WIRED

“It’s not enough to have a system that learns how to do this,” says Justin Solomon, a professor at MIT’s Computer Science and Artificial Intelligence Lab who is running the hackathon. “You need a system that learns and explains what it learned.” Since no human can definitively explain to a judge why a machine drew a map the way it did, Solomon says, "That's a critical problem."

Judges increasingly need such explanations. Courts from Texas to North Carolina are challenging the legality of gerrymandered maps. In October, the Supreme Court will hear arguments in a case on partisan gerrymandering in Wisconsin, which has the potential to rewrite the rules on district-drawing. After the 2020 census, every state will begin the once-a-decade process of redrawing political maps. From algorithmic tools such as Mander that aim to help with the complicated math to educational efforts designed to teach citizens about gerrymandering, there’s ample room for innovation.