HomeSociety & EconomicsGerrymandering Simulator — Packing & Cracking Districts

🗺️ Gerrymandering Simulator — Packing & Cracking Districts

Gerrymandering simulator with a grid of red and blue precincts. Redraw district boundaries and watch packing and cracking distort election outcomes. Live efficiency gap, seat count and popular vote stats show how the same votes can produce different winners.

Society & Economics3DEasy60 FPS
gerrymandering ↗ Open standalone

🗺️ Gerrymandering Simulator — Packing & Cracking Districts

A grid of red and blue precincts is partitioned into electoral districts by a live boundary-redrawing algorithm. Set the "Gerrymander bias" slider away from zero and watch the algorithm pack opposing voters into a few lopsided districts and crack the rest into many thin majorities — turning the same vote totals into wildly different seat counts.

🔬 What It Demonstrates

Packing concentrates a party's supporters into few districts they win by huge, wasted margins. Cracking splits them into many districts as a minority. Both tactics convert vote share into disproportionate seat share without changing a single vote — the mechanism this simulator makes visible in real time.

🎮 How to Use

Choose the number of districts, then drag "Gerrymander bias" left or right to favor Blue or Red. The boundary-redrawing algorithm runs continuously, animating district shapes as it optimizes. Click "New Map" for a fresh precinct layout, or "Reset Boundaries" to return to a compact, fair starting map.

💡 Did You Know?

The term "gerrymander" dates to 1812, coined after Massachusetts Governor Elbridge Gerry signed a district shaped like a salamander. Modern redistricting software can generate thousands of legal maps per second, making algorithmic packing and cracking far more precise than 19th-century pen-and-ink drawing.

About Gerrymandering Simulator — Packing & Cracking Districts

This simulation models partisan gerrymandering: the manipulation of electoral district boundaries to advantage one political party. A 14×9 grid of precincts, each leaning red or blue by a randomly generated but geographically clustered margin, is partitioned into a configurable number of districts by a continuously running boundary-optimization algorithm. When the "Gerrymander bias" slider is nonzero, the algorithm favors moves that increase the target party's seat count — packing opposing voters into a small number of districts they win overwhelmingly, and cracking them thinly across many districts where they fall just short of a majority. At zero bias, the same algorithm instead optimizes purely for compact, contiguous shapes, producing a fair map.

The efficiency gap, popularized in a widely cited 2015 paper by law professors Nicholas Stephanopoulos and Eric McGhee, quantifies gerrymandering by comparing "wasted votes" — votes beyond what a winner needed, plus all votes for a loser — between parties. Courts in several U.S. states have cited efficiency-gap analysis in redistricting litigation, and the concept remains central to ongoing debates about partisan and racial gerrymandering, independent redistricting commissions, and algorithmic map-drawing reform.

Frequently Asked Questions

What is gerrymandering?

Gerrymandering is the deliberate drawing of electoral district boundaries to give one political party or group an unfair advantage in elections. It works by manipulating how voters are distributed across districts without changing how anyone votes — the same total votes can produce very different numbers of seats depending on where the lines are drawn.

How do I use this simulation?

Pick the number of districts with the "Districts" slider, then move "Gerrymander bias" away from zero to favor Red or Blue. Watch the boundary lines redraw themselves in real time as the algorithm packs and cracks precincts. Compare the "Popular vote" and "Seats won" bars on the right to see the disproportion the map creates.

What do "packing" and "cracking" mean?

Packing crams a large share of the opposing party's voters into a small number of districts, so they win those districts by huge, wasted margins but control few seats overall. Cracking spreads the opposing party's voters thinly across many districts so they form a persistent minority in each one, winning zero of those seats despite substantial total support.

How is the efficiency gap calculated?

For each district, "wasted votes" are counted for both parties: all votes cast for the losing party, plus any votes the winning party received beyond the minimum needed to win (roughly half the district's votes plus one). The efficiency gap is the difference between the two parties' total wasted votes, divided by the total votes cast, expressed as a percentage. A large efficiency gap indicates one party's votes are being wasted far more than the other's — a signature of packing and cracking.

Why can the same votes produce different election outcomes?

Legislative seats are awarded per district, not by statewide popular vote, so the geographic arrangement of voters into districts determines outcomes as much as raw vote totals do. A party can win a majority of total votes across all districts yet win a minority of seats if its supporters are inefficiently distributed — concentrated in a few districts (packed) or spread as consistent minorities (cracked) in many others.

Who first coined the term "gerrymander"?

The word combines "Gerry," after Massachusetts Governor Elbridge Gerry, and "salamander," describing the shape of an 1812 state senate district he signed into law that critics said resembled the amphibian. The term has since become the standard label for any manipulated electoral map, regardless of which party benefits.

Is gerrymandering legal?

Rules vary widely. Racial gerrymandering that dilutes minority voting power is prohibited under the U.S. Voting Rights Act and constitutional case law. Partisan gerrymandering, however, was ruled a non-justiciable political question by the U.S. Supreme Court in Rucho v. Common Cause (2019), leaving state courts, state constitutions, and independent redistricting commissions as the primary remedies in many jurisdictions.

What is an independent redistricting commission?

Several U.S. states, including California, Michigan, and Arizona, have transferred district-drawing authority from state legislatures to independent commissions designed to reduce partisan control. These commissions typically use explicit compactness and competitiveness criteria similar to the "bias = 0" fair-map setting in this simulation, aiming to minimize the packing and cracking that produces large efficiency gaps.

How does modern redistricting software affect gerrymandering?

Advances in computing power let map-drawers generate and score thousands of potential district plans per second, testing each for partisan advantage down to the precinct level. This has made gerrymandering far more precise and durable across multiple election cycles than the manual, map-by-hand redistricting of past decades, which is one reason algorithmic and statistical detection tools like the efficiency gap have become important countermeasures.

What are current research directions in redistricting analysis?

Researchers use Markov chain Monte Carlo methods to generate large ensembles of valid district maps and compare a proposed map's partisan outcomes against that distribution, flagging statistical outliers as likely gerrymanders. Other active areas include multi-metric fairness scoring beyond the efficiency gap, automated compactness measurement, and open-source redistricting tools that let the public evaluate and propose alternative maps during official redistricting processes.

⚙ Under the hood

Redraw district boundaries on a grid of red and blue precincts and watch packing and cracking distort seat counts and the efficiency gap.

electionsredistrictingpolitical geographygame theory

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)