The Quiet Rewrite: How Algorithms Took Over the World's Election Maps
Redistricting moved from smoke-filled rooms to software suites — and the same tools are now sold to governments on three continents, with courts still arguing over what the machines actually did.

In 1812, Massachusetts Governor Elbridge Gerry signed off on a state Senate district so contorted it was nicknamed the "Gerry-mander" after him and a salamander. Two centuries later, the drawing happens in software suites, the partisanship is often baked into a parameter, and the resulting maps can be defended in court with millions of simulated alternatives. The salamander has been quietly rewritten as code.[3][10]
From Vickrey's Dream to the Ensemble Era

The idea of handing redistricting to a machine is not new. According to a SciSpace-hosted paper on redistricting algorithms, enthusiasm for algorithmic redistricting dates back at least to the 1960s, when economist William Vickrey argued for "procedural fairness" that removed the human element as completely as possible. In 1964, Edward Forrest pushed the same line, arguing that "since the computer doesn't know how to gerrymander — because two plus two always equals four — the electronically generated map can't be anything but unbiased."[1]
That optimism has aged unevenly. The same paper notes that fundamental limits involving the computational complexity of certain redistricting problems reveal that Vickrey's and Forrest's dream of perfect redistricting through algorithms may be practically unrealizable. Worse, algorithms can inherit the biases and assumptions of their human designers, because humans write the instructions and define what makes one plan better than another.[1]
What changed in the last decade is not the math but the plumbing. Software has become a ubiquitous partner in the design and analysis of districting plans, according to that same SciSpace paper, leveraging census data, electoral returns, and highly detailed maps. Modern algorithms make it possible to engineer districts with remarkable precision and control — which is another way of saying they provide opportunities to gerrymander in subtle ways.[1]
The Toolkit: Free Apps, Enterprise Suites, and a Harvard Outlier Detector
The commercial landscape splits into two tiers. On one side sit free, public-facing tools. DRA 2020 is a free web app to create, view, analyze, and share redistricting maps for all 50 states and the District of Columbia, according to the Redistricting Data Hub. DistrictBuilder is a free, open-source, web-based tool developed by the Public Mapping Project and Azavea for state legislative, congressional, and local plans. Districtr, built by the MGGG Redistricting Lab, is a free public webtool for districting and community identification, designed to help state legislatures, nonpartisan commissions, and community organizations collect public input.[11]
On the other side sit paid, government-grade products. AutoBound EDGE by Citygate GIS is a standalone desktop application designed specifically for redistricting, using ESRI mapping technology, with automated tools that can recommend district configurations based on user-defined parameters. DISTRICTSolv, developed by ARCBridge Consulting & Training in 2010 on the Esri ArcMap platform, was built using its founder's redistricting experience at the Department of Justice's Civil Rights Division and the Census Bureau.[11]
Ballotpedia's survey of the 2020 cycle counted ten redistricting apps in circulation; five were free, all allowed users to create maps, five allowed users to generate reports, and six included data sets. Some were designed for state governments, others for the general public — a distinction that matters when a well-funded advocacy group and a state legislature are using the same interface.[12]
"Since the computer doesn't know how to gerrymander — because two plus two always equals four — the electronically generated map can't be anything but unbiased." — Edward Forrest, 1964
The Courtroom Becomes a Statistics Seminar
The most consequential algorithmic tool in American litigation is not a map-drawer but a map-auditor. Called "redist," it was started at Harvard in 2020 by statistics and government professor Kosuke Imai and then-PhD candidate Cory McCartan, and it creates a vast pool of alternate nonpartisan plans — thousands of them — that can be compared to a proposed or enacted map. It has been used by plaintiffs in gerrymandering cases in Alabama, New York, Ohio, and South Carolina, according to the Harvard Gazette, and its tests have increasingly been used as evidence in court.[13]
The method is called ensemble analysis. Sampling algorithms generate thousands or even millions of plans to create an ensemble demonstrating the range of possibilities for districting plans subject to the state's districting criteria, according to Duke Law scholarship. Experts then compare the properties of the legislature's enacted plan to the ensemble and declare whether it is a statistical outlier — and thus likely gerrymandered.[14]
There is a catch buried in the design. Initial ensemble methods focused on proving partisan gerrymanders and therefore chose to hold constant the racial characteristics of the ensemble — a decision that allowed computational redistricting experts to avoid the complications of the Voting Rights Act and the Equal Protection Clause. That workaround is now under pressure: with the Supreme Court's declaration of a race-blind Equal Protection Clause in Students for Fair Admissions v. Harvard, the constitutionality of these methods as used in racial gerrymandering cases remains uncertain, per Duke Law scholarship.[14]

The legal ground has shifted further. According to Just Security, the Supreme Court in Louisiana v. Callais eviscerated a portion of the federal Voting Rights Act that outlawed using redistricting as a tool for racial discrimination. Under Callais, partisan gerrymandering is now deemed a legitimate government purpose, even if used as cover for creating maps that dilute the voting power of Black Americans, Latinos, and other groups facing discrimination. Plaintiffs challenging discriminatory maps must now prove there is a way to avoid the discriminatory result while still perfectly achieving the state's purported partisan goals — what Justice Alito described as meeting "all the State's legitimate districting objectives."[15]
This is a reversal of the earlier federal posture. In Rucho v. Common Cause (2019), the Court majority declared there could not be a federal constitutional cause of action to bar gerrymandering because it was too difficult to say when partisanship had gone too far. In Abbott v. LULAC, Alito faulted a lower court panel for not granting the Texas Legislature a safe harbor because the impetus for the Texas map "was partisan advantage pure and simple."[15]
Where the Fights Are
As of December 4, 2025, congressional and/or legislative maps around the country have been challenged in 100 cases, according to the Brennan Center for Justice. Sixty-two challenged congressional maps; 54 raised challenges to legislative maps. Maps in 30 states have been challenged. The vast majority — 82 of 100 — seek changes to maps originally drawn under single-party control. Maps drawn under unified Republican control saw the most challenges, 65 cases, against 17 for maps drawn under unified Democratic control.[16]
The comparative picture is starker. A University of Oregon thesis examining six U.S. states and six international countries concluded that the U.S. and Hungary have the highest levels of gerrymandering and allow the most partisan control over redistricting, while Ireland and Australia have no issues with gerrymandering and their national legislatures have not been part of the redistricting process. The same thesis concluded that every U.S. state redistricting system is flawed to different magnitudes.[8]
A Framework for the Next Fight
When the next redistricting fight lands, four questions cut through the noise. First, what are the constraints? According to the University of Chicago's Center for Effective Government, constraints are rules and standards, such as requiring equal populations, while processes are procedures for drafting and enacting maps — legislature-drawn, commission-drawn, or something in between. In the U.S., 25 states give the legislature primary responsibility, 13 use an independent or bipartisan commission for congressional maps, and five let independent bodies propose plans while legislatures approve them.[4][9]
Second, what criteria are in play? Redistricting criteria may include compactness, contiguity, equal population, preservation of existing political communities, partisan fairness, and racial fairness. Third, remember that shape alone proves little: focusing on the shape alone often misses the big picture, because any shape can be designed to entrench partisan advantage or protect incumbents. The vocabulary to watch is packing and cracking — concentrating the opposing party's voters in one district, or diluting them across many.[9][10]
Fourth, ask who is auditing. A quantitative measure of gerrymandering's effect is the efficiency gap, computed from the difference in wasted votes for two parties summed across all districts. Citing in part an efficiency gap of 11.7 to 13.0 percent, a U.S. District Court in 2016 ruled against the 2011 drawing of Wisconsin legislative districts.[10]
The deeper problem is jurisdictional. According to the University of Chicago Legal Forum, the judiciary generally lacks technical expertise, and the potential for technological advances to create unintended difficulties for judicial decision-making seems likely. The Forum's authors emphasize that political fairness is a philosophical and political concept that must be conceived through human consensus building — a process distinct from algorithm development.[2]
That is the quiet rewrite. The maps are still drawn by people; the people now have better software, better data, and a courtroom vocabulary borrowed from statistics. The 1812 salamander was visible to anyone who looked. The modern version comes with an ensemble of counterfactuals.[1][13]
Sources
- [PDF] Redistricting Algorithms - SciSpace — scispace.com
- Deploying Trustworthy AI in the Courtroom: Lessons from Examining Algorithm Bias in Redistricting AI | The University of Chicago Legal Forum — legal-forum.uchicago.edu
- Where We Have Been: The History of Gerrymandering in ... — newamerica.org
- Redistricting Process Reform - Center for Effective Government — effectivegov.uchicago.edu
- Data and Democracy Lab — mggg.org
- Gerrymandering and computational redistricting - PMC - NIH — pmc.ncbi.nlm.nih.gov
- A Comparative Analysis of Redistricting Institutions in the ... — citizensunion.org
- THE POLITICS OF GERRYMANDERING IN ... — scholarsbank.uoregon.edu
- Wikipedia: Redistricting — en.wikipedia.org
- Wikipedia: Gerrymandering — en.wikipedia.org
- Mapping Tools - Redistricting Data Hub — redistrictingdatahub.org
- Redistricting apps and software available for the 2020 cycle - Ballotpedia — ballotpedia.org
- An algorithm to detect gerrymandering — Harvard Gazette — news.harvard.edu
- "Race-Blind" Redistricting Algorithms — scholarship.law.duke.edu
- The Supreme Court’s Striking Regression on Partisan Gerrymandering — justsecurity.org
- Redistricting Litigation Roundup | Brennan Center for Justice — brennancenter.org
Reported with AI assistance using internet sources.