Skip to content
0:00 / 0:00

#montecarlo#gerrymandering#simulatedannealing

Algorithmic Redistricting: Elections made-to-order

AlphaPhoenix

725K subscribers • 2 videos on Hallway

YouTube
  • Recommended by 2 people: 2 on Hacker News.

Intermediate. Assumes working knowledge.

583K views5 years ago2 recommendations

Computer scienceAlgorithmsMath for programmers

AlphaPhoenix demonstrates how to use Monte Carlo simulations and annealing-style algorithms to generate both fair and highly gerrymandered congressional district maps.

If you're a long-time viewer, you'll know that I *really* like random numbers. Today, I'm USING random numbers to generate some distinctly nonrandom maps. I first heard of Monte Carlo simulations in undergraduate computational physics, and have long thought about using it to draw maps with optimized districts. (see "Ising model" for a very similar physics simulation). I wrote a program to draw maps of Gerrymandered (or not) congressional districts in the state of North Carolina. I'm not getting into the methods and politics, I just think gerrymandering is a fascinating problem to solve, and the Monte Carlo simulation is great at it! You program in an initial condition, and your "desired election results", and the program handles the rest, adjusting the map pixel-by-pixel until it aligns to your desired metrics (and either a really GOOD map, or a really BAD map). Sharable GIF: gfycat.com/illfatedgargantuankusimanse Extra links for the curious: en.wikipedia.org/wiki/Ising_model en.wikipedia.org/wiki/Markov_chain_Monte_Carlo en.wikipedia.org/wiki/Metropolis%E2%80%93Hastings_algorithm en.wikipedia.org/wiki/Gerrymandering Source for election data by precinct (note that precincts and Census tracts are not the same shapes): openprecincts (update: website link broken now) #Gerrymandering #Politics #Math Music in this video: I Dunno by grapes is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/by/3.0/) ccmixter.org/files/grapes/16626 Arcadia - Wonders by Kevin MacLeod is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/by/4.0/) Source: incompetech.com/music/royalty-free/index.html?isrc=USUAN1100… Artist: incompetech.com/ Dial Up Internet Sound BY SPANAC, Attribution 4.0 International (CC BY 4.0) freesoundslibrary.com

Why it's here

2 people recommend this

What people say. Recommended as an entertaining and powerful demonstration of how algorithmic simulations can be used to manipulate or optimize voting districts.

opdahlon Hacker News • Recommends

On “Math Has Changed the Shape of Gerrymandering”

For a great (and entertaining!) look into how you can use simulations to generate these types of maps you should check out this video by the superb channel AlphaPhoenix: link to this video

Spivakon Hacker News • Recommends

Required watching to put things into perspective of how powerful gerrymandering can be link to this video There was a proposed (and failed) ballot initiative in Ohio that tried to address this in the only way you actually can. The tl;dr is that there is no such thing as a fair map and so the state would be required to gerrymander the districts to match the state-wide election results. Basically proportional representation with extra steps, but brings the "secret metric" in map making to the forefront and requires it be a specific value so you can't tune it to your favor.

j5155on Hacker News • Mentions

On “What if you did the exact opposite?”

This aspect of adding randomness to avoid local randomness reminds me of AlphaPhoenix’s automated gerrymandering project: link to this video