Algorithmic Redistricting: Elections made-to-order

Поділитися
Вставка
  • Опубліковано 27 чер 2021
  • 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/illfatedgargantuan...
    Extra links for the curious:
    en.wikipedia.org/wiki/Ising_m...
    en.wikipedia.org/wiki/Markov_...
    en.wikipedia.org/wiki/Metropo...
    en.wikipedia.org/wiki/Gerryma...
    Source for election data by precinct (note that precincts and Census tracts are not the same shapes):
    openprecincts.org/
    #Gerrymandering #Politics #Math
    Music in this video:
    I Dunno by grapes is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
    ccmixter.org/files/grapes/16626
    Arcadia - Wonders by Kevin MacLeod is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
    Source: incompetech.com/music/royalty-...
    Artist: incompetech.com/
    Dial Up Internet Sound BY SPANAC, Attribution 4.0 International (CC BY 4.0) www.freesoundslibrary.com
  • Наука та технологія

КОМЕНТАРІ • 2,6 тис.

  • @AlphaPhoenixChannel
    @AlphaPhoenixChannel  3 роки тому +1058

    Hope everybody likes the video! If anybody has questions about implementing similar algorithms, how the pixel maps I've drawn can't be converted directly to districts because of the realities of the census maps, or how this simulation is actually taking a random walk through a 30,000-dimensional box, ask away!
    Corrections:
    1ucasvb: I did my napkin statistics very wrong, and the number of ways to give 27921 pixels one of 13 districts is actually 13^27921=10^31102… that’s a LOT
    Judah Karesh: The reason some regions on the OpenPrecincts map had no opposing votes was probably a lack of challenging candidate.
    Me: Since there are an awful lot of comments taking this video politically, this project was 100% a math/compsci project from my perspective, and in no way should be construed to endorse gerrymandering or our current mechanisms of choosing representatives - the current rules present a fun optimization puzzle I found interesting.

    • @1ucasvb
      @1ucasvb 2 роки тому +67

      Didn't you invert the count of number of maps? 27921^13 is "pick 13 out of 27921 choices", but you want 13^27921: "pick 27921 out of 13 choices". That's a much, much, much larger number.

    • @elraviv
      @elraviv 2 роки тому +3

      @@1ucasvb Yes, you are correct.

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +28

      If you have n boxes that can hold one of x numbers, there aren’t n^x possible sets of boxes? Am I really confused? I swept all of the “districts need to be connected” stuff under the rug
      My comment after the NEXT post got deleted randomly, so something along the lines of “wow that’s embarrassing, I added it to the list”

    • @1ucasvb
      @1ucasvb 2 роки тому +31

      ​@@AlphaPhoenixChannel You are confused, I'm afraid. Basic example: you have 3 numbers {0,1,2} for 2 boxes. That gives you: {00, 01, 02, 10, 11, 12, 20, 21, 22} = 3^2 = 9 options. 2^3 would be 3 bits (3 boxes, 2 numbers): {000, 001, 010, 011, 100, 101, 110, 111}.
      Basically: for the first pixel, you have 13 options. For the second pixel, you have another 13, and so on. So 13 x 13 x ... x 13 a total of 27921 times, so 13^27921.

    • @1ucasvb
      @1ucasvb 2 роки тому +35

      @@AlphaPhoenixChannel Nothing to feel embarrassed about. You designed and coded a kickass experiment and made a great video. This sort of silly mistake is nothing! I get confused all the time with much sillier things!

  • @01cton
    @01cton 2 роки тому +1836

    “I inadvertently simulated extreme voter fraud” is not a sentence I was expecting today.

    • @virginiahansen320
      @virginiahansen320 2 роки тому +6

      Sure... "inadvertently"... *wink* *wink*

    • @MeanBeanComedy
      @MeanBeanComedy 2 роки тому +1

      I don't think this is "voter fraud."

    • @BrianMelancon
      @BrianMelancon Рік тому +14

      Just another day in office for a politician.

  • @ellowell8160
    @ellowell8160 2 роки тому +3412

    Me: Oh cool he's going to solve the problem of gerrymandering with AI-generated districts
    AlphaPhoenix: Designs even worse gerrymandering districts that look more convincing and innocuous
    Me: Wait no

    • @SmoothTurtle840
      @SmoothTurtle840 2 роки тому +204

      “You became the very thing you swore to defeat!”

    • @Berniebud
      @Berniebud 2 роки тому +199

      why are we letting politicians decide whose vote counts and whose doesn't in the first place

    • @alistairgrey5089
      @alistairgrey5089 2 роки тому +14

      @@Berniebud who else would decide?

    • @mjs3188
      @mjs3188 2 роки тому +151

      @@alistairgrey5089 just get rid of districts. Ranked choice within the state + Top 13 will get you a far more representative group.

    • @mitchellroberts7954
      @mitchellroberts7954 2 роки тому +59

      @@mjs3188 Ranked choice voting gives preference to singular areas with the largest populations that a single candidate has "bias" in. While I agree that ranked choice voting can be viable, it just isn't in its current state. Individuals outside of large populated cities would have votes that are essentially meaningless. As an example, New York city would define the outcome for the entire state.

  • @crisis8v88
    @crisis8v88 2 роки тому +545

    It's neat that the algorithm could, with a few tweaks, also make a perfectly fair election map with districts that look as gerrymandered as possible while still being contiguous.

    • @ChaoticNeutralMatt
      @ChaoticNeutralMatt 2 роки тому +39

      That would be hilarious

    • @majormelon8855
      @majormelon8855 Рік тому +6

      but that would be too easy for politicians

    • @TatharNuar
      @TatharNuar Рік тому +16

      I thought it was notable that "fair" and "gerrymandered" are just a matter of perspective.

    • @Anankin12
      @Anankin12 Рік тому +12

      @@TatharNuar nope

    • @mars5train601
      @mars5train601 Рік тому +16

      @@TatharNuar a coin that only lands on heads does not have much perspective to look at. These maps can be made to effectively only favour one side, but a fair one would give equal chances (or properly reflect the population). There isn't much space for perspective here

  • @carykh
    @carykh 2 роки тому +856

    Ooh, I used MCMC for a college class to play QWOP a few months ago. It's cool to see that MCMC can play shitposty video games AND manipulate governments!

  • @evanfelch7689
    @evanfelch7689 2 роки тому +2769

    Someone get this to CGP Grey.

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +607

      Oh my god I LOVE Grey

    • @Bbonno
      @Bbonno 2 роки тому +160

      @@AlphaPhoenixChannel In Greys terms you are the paid weasel :P

    • @Mobin92
      @Mobin92 2 роки тому +9

      Yeah would be nice to have an analysis of the results, and compare them to the real districts.

    • @Juttutin
      @Juttutin 2 роки тому +43

      @@Mobin92 or also, to start with the current districting map, rather than random, and see how that transforms under the fair and biased targets.

    • @michaelokeefe7938
      @michaelokeefe7938 2 роки тому +8

      He had a video on the shortest splitline algorithm didnt he ?

  • @Runix1
    @Runix1 2 роки тому +563

    I can only imagine the amount of pain is hidden behind the phrase "So I ended up fixing that"

    • @Arcanefungus
      @Arcanefungus 2 роки тому +33

      Especially in combination with "how did I even do that"

    • @monad_tcp
      @monad_tcp 2 роки тому +3

      I worked with inventory systems in the beginning of my programmer career, before I switched to being a computing scientist and doing more fun things.
      It is painful, even more so every time you change anything anywhere, you have to pay attention to the accounting.
      I just hate accounting with such a passion now, that I stay away from anything related to it.
      I really could have used some formal methods, but that requires linear types and better programming languages. Which is one of the reasons I decided to become a computing scientist to begin with.
      I absolutely hate imperative languages and their manual accounting of memory, state and behavior.

    • @user-zn4pw5nk2v
      @user-zn4pw5nk2v 2 роки тому +3

      He could have just checked the 4 pixels next to the flipped, if 2 opposing are the same colour, but not 3, then you will break a line into two regions. The only exception is when you have regions within a region making a donut or "is there a path to the outside from every center point with one (but check every) region impassable " AKA flood fill all touching except the one you test for donutness if you get 1 region you are definitely fine.

    • @DevinDTV
      @DevinDTV 2 роки тому

      @@user-zn4pw5nk2v smart

    • @user-zn4pw5nk2v
      @user-zn4pw5nk2v 2 роки тому

      @@DevinDTV reading it again, if 3(4) touching pixels are same colour, you can still break it in 3 different regions if there is no path between them, but you can test for that (1 more flood fill, but this time from one pixel to the other two to check if they connect or 3 flood fills in turn from each pixel for speed (sub par if regions are the same size and divided, and higher code complexity)) (from memory of what the subject matter was about), and thanks for the compliment (there is a reason most of the guys in pixar(& other CG studios) are my countrymen, my national pride(from what i've heard, may be false or not), wasn't really my thing, but maybe in top 10, after AI, low level computing, and security (but i am disclosing too much personal info so i will stop here))

  • @HexerPsy
    @HexerPsy 2 роки тому +235

    Awesome video :)
    The Monte Carlo algorithm is also used in radiation treatment for cancer patients.
    The map is a 3D scan of the patient.
    We mark the edges of tumors and healthy organs.
    And then set targets for the treatment dose, and set contraints to reduce as much damage to health tissue.
    The algorithm optimizes with the values given - and we evaluate if the resulting treatment plan meets our (international) standards.
    The program does indeed take high level decisions into smaller decisions before finishing.
    I often compare it to being dropping in a foggy mountain range. You can only see several feet around you and you are tasked to get to the lowest valley.
    You walk down hill to the lowest point - but perhaps there is a deeper valley the next mountain over...
    And every change to the parameters of targets and contraints completely changes the landscape...

  • @NStripleseven
    @NStripleseven 2 роки тому +54

    That’s kind of terrifying. You can ask this thing to gerrymander a region to any result you want (within a certain set of bounds, but those bounds are quite large), and it will produce exactly that result with districts that look completely innocuous.

  • @MajorWX2
    @MajorWX2 2 роки тому +1730

    Now for the ultimate challenge: redraw the 48 continental states as if they were voting districts in a single state

    • @neverendar1778
      @neverendar1778 2 роки тому +97

      That would be hilarious

    • @whophd
      @whophd 2 роки тому +54

      LOL yes, begin with “the 48 states” as your starting state ROFL

    • @UnlikelyToRemember
      @UnlikelyToRemember 2 роки тому +146

      @@whophd Well you pretty much have to leave the contiguous bits alone. On the other hand, I suspect the Republicans would be very excited to, for example, turn NY red by making NYC's polling location be Barrow Alaska

    • @freakymoejoe2
      @freakymoejoe2 2 роки тому +71

      @@UnlikelyToRemember that would be one long state lol. A little snakey boy going around the edge of the entire country

    • @estonalexander704
      @estonalexander704 2 роки тому +48

      Yes. Except there should be natural barriers such as rivers and mountains to separate the new states. It's just logical. Like a "you should try to follow this line, but if the political version is favored more than the urge for a natural barrier, then go ahead and expand". Basically redrawing the US states to make them perfect lmao.

  • @itsevilbert
    @itsevilbert 2 роки тому +1866

    Damn you, my "information should be set free" vs "this WILL absolutely be abused" sides of my brain are screaming at each other. Great video.

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +448

      That’s how I feel lol

    • @mskiptr
      @mskiptr 2 роки тому +129

      Maybe we should push for better voting systems, where districts cannot be gerrymandered. Kinda like what EFF did with bad encryption standards in the nineties…

    • @TheNerd484
      @TheNerd484 2 роки тому +82

      @@AlphaPhoenixChannel I feel like if this program were well enough known, people could use it just as well to verify that districts aren't jerrymandered.

    • @turun_ambartanen
      @turun_ambartanen 2 роки тому +132

      @@mskiptr Simply not using "first past the post" would be a good start.

    • @happyundertaker6255
      @happyundertaker6255 2 роки тому

      Mah furst thought too!

  • @whydontiknowthat
    @whydontiknowthat 2 роки тому +89

    This is genuinely one of the best math/programming videos that I’ve seen on the platform

  • @aniquinstark4347
    @aniquinstark4347 2 роки тому +65

    My AP civics class in high school did a project where we gerrymandered our own state and projected the results. It was a really interesting experiment and taught us a lot about how elections really work.

    • @whermanntx
      @whermanntx 2 роки тому +3

      In that they don't. With one party continuing to gerrymander without opposition be abuse they are dying as an idea.

    • @dragonhold4
      @dragonhold4 2 роки тому +1

      ​@@whermanntx
      In recent history:
      > New York 10th District, Democrats gerrymandering to protect the geriatric Jerrold Nadler (as if this map wasn't already ridiculous enough)
      > & 11th District, Democrats gerrymandering because Max Rose(D) lost to Nicole Malliotakis(R)
      Classic:
      > Illinois's 4th District, with this we can all agree Democrats are just straight trolling
      Republicans are too tame. With this and other matters Democrats are typically given a free pass to trample on the system meanwhile Republicans like typical 'boy scouts' are constantly appealing to honor and fairness rather than fighting back with equal force.

    • @whermanntx
      @whermanntx 2 роки тому

      @@dragonhold4 such projection. You're looking at the small peanuts that don't matter. Swing states that determine the presidency were made worse in favor of Republicans with this partisan sham of a SC siding with maps made like these, where half the votes are for both sides, yet Republicans get 80% of the seats.
      You show me a Democratic state with Republicans not getting anywhere near their representation in the house or senate. You'll probably come back with some 4% error and not the 30% that republican are taking.

    • @mitlanderson
      @mitlanderson Рік тому

      @@dragonhold4 hmm yes, just like Republicans constantly gerrymandering in South Texas and having their maps thrown out *multiple times* buy the courts. Both parties do it, neither are innocent in the matter. Republicans are just as bad with it in states like Texas, Georgia, and Missouri as Democrats are in New York, California, and Illinois.

    • @chaklee435
      @chaklee435 Рік тому +11

      @@dragonhold4 I'd suggest reviewing how you get your news. There are plenty of examples of either side gerrymandering. Since you have already given examples for Democrats, I'll mention Ohio and Florida for the Republicans.

  • @JakubSkowron
    @JakubSkowron 2 роки тому +1221

    Important metric which should be added: borders need to be sparsely populated. If you have a district border cutting a part of a city it does not look "fair", it looks gerrymandered. If you have a district border through farmlands or woods - it looks "legit". So additional metric of "population density at the borders should be low" would work nice, I think.

    • @hassiaschbi
      @hassiaschbi 2 роки тому +30

      That would favor the democratic Party
      How about make them as equal as possible

    • @eclogite
      @eclogite 2 роки тому +376

      @@hassiaschbi it's still a gerrymandering algorithm. How fair the map is is arbitrary, this change would just optimize better for what LOOKS fair

    • @sportsracer48
      @sportsracer48 2 роки тому +52

      Does the population centrality weight kinda do this?

    • @KX36
      @KX36 2 роки тому +155

      @@hassiaschbi my instinct would that it would favor the red party as cities can't have borders through them meaning you get a couple of strongly blue city districts and all the rest of the districts are marginally red.

    • @watchingvids1078
      @watchingvids1078 2 роки тому +3

      @@KX36 It would only favor democrats that don't manage farmland very often because the biggest wall they have to deal with is the Republicans themselves who hate to explain themselves.
      If a single city has a massive population that needs food, its harder to convince an expert farmer who knows what everyone wants and is less likely to cave over believes, then a new farmer who just had their first successful year and has no idea what to do with all the money they just earned. Though I have to say that is the best way I could explain this.

  • @yitzakIr
    @yitzakIr 2 роки тому +645

    Can we see the most gerrymandered maps with the "looking fair" parameter turned off? Let's see how totalitarian this bad boy can get

    • @tykeorama9898
      @tykeorama9898 2 роки тому +62

      Start with New York. They are one of the worst states in the union when it comes to gerrymandering

    • @seg162
      @seg162 2 роки тому +86

      @@tykeorama9898 *Maryland has entered the chat*

    • @antoniozavaldski
      @antoniozavaldski 2 роки тому +69

      @@tykeorama9898 I can name a lot of states that are worse than New York. Maryland and Ohio come to mind. Texas has some very weird districts too. And there's one district in Chicago that's barely even connected. New York's map actually is pretty fair and compact outside of NYC.

    • @ethanbottomley-mason8447
      @ethanbottomley-mason8447 2 роки тому +14

      @@antoniozavaldski I just looked at Chicago and wow. Somebody was having far too much fun making that map. What happened to the north side of Chicago in the district map?

    • @IconOfCyn
      @IconOfCyn 2 роки тому +42

      @@antoniozavaldski and it should be further noted that it's actually pretty hard to make "fair looking districts" when you have nearly half your entire population crammed into an area which is ~0.5% of your landmass.

  • @silverandexact
    @silverandexact 2 роки тому +22

    Man, if videos like this had been on UA-cam in 2009, I probably wouldn't have chosen to go to college to be a high school English teacher. I thought math and most sciences were too difficult for me relative to their possible applications, but now I find myself watching tons of videos on how everyday technology works and questions answered using coding.
    (Here from Veritasium's mention in his clarification video.)

    • @leocurious9919
      @leocurious9919 Рік тому +1

      You watch this stuff, but why? Because it entertains you? Do you feel the curiosity to explore these things yourself? Do you then actually do it yourself? If not, why not?

    • @actually_well_
      @actually_well_ Рік тому +3

      It's never too late to change course! Don't settle for a life you don't want.

  • @matthiaswandel
    @matthiaswandel 2 роки тому +57

    really enjoy this sort of deep dive. Glad the video id doing well. Getting too technical usually doesn't work well with my audience.

    • @ExtremeSquared
      @ExtremeSquared 2 роки тому +4

      What is the strongest saw horse made with the lowest linear feet of dimensional lumber, derived by Markov Chain Monte Carlo Simulated annealing.

  • @msnhao
    @msnhao 2 роки тому +476

    Politicians are about to hire a lot of computer scientists

  • @mr.boltun1043
    @mr.boltun1043 2 роки тому +392

    God bless the youtube recommendations. A channel with 20k subs, that I would have never found on my own, with a very interesting topic and top notch presentation - instant sub.

  • @EvilAng3la
    @EvilAng3la 2 роки тому +15

    I think this video is an absolutely great demonstration of why single-representative districts need to be done away with entirely. I've seen in the past that going to three-member districts with proportional representation almost completely eliminates any potential for gerrymandering when it comes to drawing districts. No more having to worry about if redistricting is fair or not. Far, far better than what we have given how easy it is to manipulate the results.

  • @Kukielka
    @Kukielka 2 роки тому +25

    Holy shit this is actually genius.
    Please, for the sake of mankind, never release this and destroy your harddrives.

  • @jerwahjwcc
    @jerwahjwcc 2 роки тому +310

    Another enhancement that might make it fun would be to add physical barriers, ie rivers, lakes, mountains, etc which could offer constraints on shapes

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +136

      This would be very cool but a real pain to implement. Real districts are assembled from census tracts I think which take some of that into account

    • @specific_pseudonym
      @specific_pseudonym 2 роки тому +33

      Given this: redistricting.lls.edu/redistricting-101/where-are-the-lines-drawn/
      It seems like there is basically only ONE firm requirement of district shaping - equal population - but states have their own specific shenanigans. The federally-agreed upon boundary "restrictions" are more like guidelines, and boil down to:
      1. Racial discrimination (hard to objectively define; basically done by analyzing previous voter decisions)
      2. Contiguity (you basically have this; sometimes geographical factors are considered, but not always)
      3. Political boundaries, e.g. city/town/county limits (e.g. attempt to draw districts that share those boundaries, rather than crossing them)
      4. Compactness (weirdness of shape in some states, distance to polling places in others, might involve looking at road maps where they exist)
      5. "Communities of interest" (this is hard to define, and I'm not even sure where they get their data from)
      6. Partisan outcomes (no enforced federal restrictions, states vary, and it's basically origin of the problem)
      7. "Nesting" (district boundaries for state/senate have to/should share the same boundaries)
      8. Multi-member districts (more than 1 rep per district; federally illegal, but some states allow them for their local positions)
      9. "Floterial" districts (e.g. 3 districts, 2 towns with equal population; hard to define really)
      I think 2, 3, and 4 would be easy-ish to resolve by altering the pixel choice algorithm: Pixels on those borders are more likely to flip if pixels on the far side of those edges are the same (e.g. "if border pixel, flip probability is proportional to sum of same-district pixels on other side of line").
      7 could maybe be done at the same time in the same way as 2, 3, and 4, but it would have to be done with state-specific districts and their restrictions done before pushing the federal level.
      9 impacts 8, which then influences 7, but not 2-4 directly...not really sure how the hell to handle it honestly. There isn't really a good fix for it, but it does give 8 a bit of justification?
      This video was all about 6 so...it's good.
      Finally, 1 and 5 are much more nebulous than the others. 1 could technically be achieved by looking at race information in the census I guess? The only way I can think of doing #5 is scraping social media platforms, lol.
      Anyways...if we wanted to make this a perfect tool, it gets very complicated very fast. My assumption is that the current manually-defined lines are almost entirely governed by existing voter history, MAYBE a little bit if the people drawing the lines know their communities well, so adding 2-4 in would lead to maps that are more like the existing ones in terms of wiggliness. Factoring in the rest would be hell and I'm sure it could induce even more wiggles, but we'd still get less insane-looking district shapes than the current ones, lol.

    • @EmyrDerfel
      @EmyrDerfel 2 роки тому +1

      How about instead of using raster graphics and pixels, you generate irregular tiles in vector graphics, aligning the edges to real-world boundaries, so e.g all of a cul-de-sac-tree should be on a single tile. Now your n^13 is working with a much smaller n, and you can apply better shape-based metrics, like rejecting districts where the actual perimeter is more than y% longer than a smoothed version of the same perimeter. You could assign different weights to tile edges, so a tile that stops at a river is a better district boundary than a tile which runs down the middle of a street.

    • @Nukepositive
      @Nukepositive 2 роки тому

      @@AlphaPhoenixChannel A more "realistic" version then would be a system of nodes and each map could flip a node instead of a pixel. That would be a lot more work, though, and I know you spent a lot of work dealing with the maps already.

    • @tananam9782
      @tananam9782 2 роки тому +2

      But how much of a political barrier are physical barriers, really? I think this would be very hard to implement. For example, My home town is divided by a river, but it also has plenty of bridges. I don't expect the river to be a significant political factor.

  • @Russiansnow
    @Russiansnow 2 роки тому +219

    North Carolina senators with notepads: interesting

    • @debblez
      @debblez 2 роки тому +5

      Quick, write that down, write that down!

    • @ikocheratcr
      @ikocheratcr 2 роки тому +2

      At least it was not solitaire they have open. Oh no, actual physical notepads...

    • @themanhimself3
      @themanhimself3 2 роки тому +1

      They would be very upset if they could read.

    • @jakeschneider9931
      @jakeschneider9931 2 роки тому +2

      Here's an update. The North Carolina legislature just passed their new map. It is now a 10 - 3 map with one district that is evenly split. They probably could have gone with 12 - 2 without much effort, but they didn't go all the way for fear of the map being thrown out by the state courts.

    • @buffaloc20
      @buffaloc20 2 роки тому

      @@jakeschneider9931 yeah most they can do is 11-3, VRA Mandates two M-M seats, and Raleigh is just too dem

  • @kylecook4806
    @kylecook4806 2 роки тому +25

    Politicians : "WRITE THAT DOWN WRITE THAT DOWN!"

  • @jmckinney0040
    @jmckinney0040 2 роки тому +11

    I love the level of algorithmic detail you've gone in this video!!!! I feel like you've added many tools to my tool belt! So glad I found this channel! Keep up the great work.

  • @RellekEarth
    @RellekEarth 2 роки тому +226

    I wonder how many "interested students" wanted an inside look at this code...

    • @tissuepaper9962
      @tissuepaper9962 2 роки тому +38

      This amount of computation power has been cheap enough for long enough that anyone who isn't already doing this is an idiot. I would hazard to guess that computational gerrymandering has been happening for at least a decade, most likely longer. The only consequence of releasing this code would be an increased public awareness of exactly how it's done and what to look for. More information is always better.

    • @greenshrek488
      @greenshrek488 2 роки тому +6

      @@tissuepaper9962 yes

    • @ZuluboProductions
      @ZuluboProductions 2 роки тому +29

      @@tissuepaper9962 I think you underestimate how incredibly out of touch and technologically illiterate our government is

    • @tissuepaper9962
      @tissuepaper9962 2 роки тому +22

      @@ZuluboProductions Press [X] to doubt.
      In all seriousness, where do you think all the polisci grads go? There are plenty of young, highly technically literate people in the government, it's just that they aren't rich enough to become congresspeople or cabinet members. Campaigning takes a lot of money. Behind the scenes all those people who can't quite manage to get a seat are stuck working for current politicians, doing things like drawing optimal district maps, and/or hiring people with more technical experience to write algorithms just like this one to help them. MATLAB has excellent documentation and libraries. Something tells me they'd be able to figure it out when the incentive is more money.

    • @maibaolinh1253
      @maibaolinh1253 2 роки тому +3

      @@ZuluboProductions If a technology can lead to a win in an election, well, you will be surprise about how fast the politicians are in adapting that.

  • @sirfloppy
    @sirfloppy 2 роки тому +357

    How was your statistical massage?
    It was pretty good on average

    • @Kavukamari
      @Kavukamari 2 роки тому +5

      it was fine, but for some reason now my state is run by neonazis

    • @boxcarz
      @boxcarz 2 роки тому +2

      @@Kavukamari ?????

    • @Kavukamari
      @Kavukamari 2 роки тому

      @@boxcarz it's just a joke, dont worry about it

    • @birdie394
      @birdie394 2 роки тому

      @@Kavukamari this fucking got me LMAOOO

    • @kindlin
      @kindlin 2 роки тому

      @@boxcarz
      Someone will explain it, eventually, for the rest of us.

  • @_Pyroon_
    @_Pyroon_ 2 роки тому +14

    Next video:
    "hey guys, it's been a while since my last post as the fbi claimed there was suspicious software on my computer"

  • @vyladence
    @vyladence 2 роки тому +23

    jesus christ, you gained 10k subs overnight. i'm honored to be one of them.

  • @raz1572
    @raz1572 2 роки тому +237

    From a stats pov is insanely cool. On the other hand, I now have a sad appreciation for how bad politicians are at gerrymandering. At least right now a person can just look at a district map and intuitively understand something is wrong...

    • @phily708
      @phily708 2 роки тому +17

      finally its good that politicians and parties are dumb

    • @iantaakalla8180
      @iantaakalla8180 2 роки тому +35

      For once the inability of politicians to be effective have saved us. However, they will figure it out.

    • @phily708
      @phily708 2 роки тому +12

      @@CheddarBro the People don’t matter the map does!

    • @zewhatyouwannasay
      @zewhatyouwannasay 2 роки тому +17

      @@CheddarBro Gerrymandering works to disenfranchise voters. In a state with a 60-40 ratio, why would it be fair to gerrymander seats in such a manner to make seats like 3-7? The point of using maps is to divide people by geography and locations, not by ridiculous borders which cut out black voters and put them into one district solely, for example.

    • @halycon404
      @halycon404 2 роки тому +8

      It's not that they are "bad" at gerrymandering. Map redraws are limited in most states. It can only happen every X number of years. Usually once a decade. It's not enough to look at one election result, they have to project out for several election cycles. They use several years worth of voting and expected population changes to project out a decade worth of elections. There has to be some level of 'safe' baked in. By the end of a map cycle a few districts will start to get out of alignment from the proposed result a gerrymandered map is aiming for. They can't do it by this method because it won't last a decade.

  • @Fasteroid
    @Fasteroid Рік тому +1

    The monte-carlo earbud untangling fucking blew my mind, I did not expect it to work that well.

  • @tuftman6092
    @tuftman6092 2 роки тому +2

    this is one of the coolest things I've seen on youtube, and I'd love to see more content like this. I love experimenting and watching other people experiment with this kind of stuff.

  • @mlutteral
    @mlutteral 2 роки тому +109

    "how did I do that?" (goes for the notes).... so relatable :D
    Amazing work.

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +35

      Admittedly that was a recreation, but the first time I was about to explain it to camera I said almost the same words xD

    • @oddixgames6704
      @oddixgames6704 2 роки тому +1

      Hi Martin!
      Not surprised to find your comment under this video :)

  • @NikoKun
    @NikoKun 2 роки тому +117

    This seems like it could be a pretty good interactive tool for people to learn more about gerrymandering, as well as help people transparently design ideal districts, and be more aware of manipulations that can be done.

    • @SievertSchreiber
      @SievertSchreiber 2 роки тому +7

      U r the first comment I see using the magic word: manipulation. That’s what gerrymandering is, manipulating the voting area to give a benefit to one party (most often in benefit of the of the ruling party). This system is hugely flawed imo! With the voting system the USA has in place gerrymandering is allowing the ruling party to manipulate the voting and results. Which is very undemocratic. Fixed borders for voting districts would be a great first step to fixing the gerrymandering issue!

    • @violentdesire7325
      @violentdesire7325 2 роки тому +9

      quite frankly; no. this code just shows the entire voting system to be non-functional. think of it: how would you design ideal districts? by setting a "fair" 50:50 distribution as a goal? but population is not 50:50. so design it to fit the population distribution then? why bother? just let the people vote directly, its more efficient and not as outdated anyway. There is not really any other way to spin this. It clearly proves the voting system inadequate.

    • @IconOfCyn
      @IconOfCyn 2 роки тому +7

      @@SievertSchreiber This is absolutely the wrong take away from determining the system is flawed. Even a "fair districting" is a form of gerrymandering, invalidating the votes of people who live in areas that have voting tendencies different to theirs.
      You can *approximate* fairness by making the seats roughly match proportional representation. But the solution to the problem is switching to a PR system, instead of trying to duct tape the original one together so that it looks like a PR system.
      Static voting districts have a few distinct issues.
      Who gets to decide the districts/algorithm? If it starts biased it stays biased.
      What happens if the static districts become naturally unfair overtime as populations move?
      What's stopping malicious actors at the city levels from employing strategies that decrease fairness in their district? Reducing school funding tends to produce a less educated population which corresponds to higher republican voting, static districts mean that you have the time to employ such strategies that may take decades to realize.

    • @hens0w
      @hens0w 2 роки тому

      Its probably a bit slow to be called interactive

  • @imaskier
    @imaskier 2 роки тому +1

    Just stumbled onto you channel. This is one of the best channels I have found in a long time. Very well done, breaking down difficult to understand concepts into bite sized chunks easily consumed by the layman. 👏 The production value is on par with "smarter everyday", "veritasium", "Steve Mould". I can't believe you have less than 50k subs. Keep it up, I'm sharing with everyone I know! Best of luck!

  • @xgozulx
    @xgozulx 2 роки тому +2

    this was so cool, I loved to see the entire process, I would even watch an extended version with more details about fixing things

  • @adamwhitney3935
    @adamwhitney3935 2 роки тому +184

    This video and your program are an intellectual work of art. I would like to see if your program could be used to analyze each state's district lines to give that state a "grade" based on its current level of skewness or gerrymander-ness. Seeing a grade for all 50 states would be very interesting and illuminating.

    • @thedebate4836
      @thedebate4836 2 роки тому +8

      i agree. i think that would be an amazing video too. would love to see texas grade and how bad the Onix district is graded (Texas's 2nd congressional district)

    • @goe591
      @goe591 2 роки тому +6

      This would be an awesome tool to create in a transparent or 'Open source' way. I'm hopeful in 10-20 years re-redistricting will be handled by balanced and independent collaboration. Before we get there having a published, transparent-box algorithm, that could grade or score districts would be a place to start. Heck states could than have a process to point to and documented algorithm to use if they believed fair districts
      mattered to the people they represent.

    • @randomneko9
      @randomneko9 2 роки тому +2

      There is definitely an argument to be made for publishing this code publicly. I doubt the political parties would want anything to do with this but the public is a different story.

    • @zsfekete5211
      @zsfekete5211 2 роки тому +5

      Issue is, sometimes gerrymandering is needed. Look at Illinois 4. It looks very very wrong, but the reason is to group 2 largely latino populations into 1 district so they can have their "specific" representative, while the middle part is mostly black (Illinois 7). This way Ill4 is 70% hispanic, 4.4% black, Il7 is 50% black, 14.1% hispanic.
      Similar cases exist all of the country with both race and urban-rural divide being the driving factor. Yes, bad gerrymandering cases exist too, but a district looking "weird" is NOT sufficient evidence that there is anything wrong there.

    • @Cygnus888
      @Cygnus888 2 роки тому +1

      @@zsfekete5211 Why do you need all hispanics in the same district?

  • @Miziziziz
    @Miziziziz 2 роки тому +327

    Wow really good video, great explanations and learned some cool algorithms

  • @kevinfoley7667
    @kevinfoley7667 2 роки тому +8

    I'm calling it now. He has all the tools to be a 500k subscriber UA-camr

  • @russelljazzbeck
    @russelljazzbeck 2 роки тому

    The way you explained how you applied randomness to make this algorithm work was so easy to understand. Thanks!

  • @garthgoldwater5256
    @garthgoldwater5256 2 роки тому +324

    seems like we should just implement proportional representation if our definition of fairness for districting is “matches proportional representation”

    • @1ucasvb
      @1ucasvb 2 роки тому +40

      Yep, or adopt consensus-based voting methods, instead of faction-based.

    • @EFCasual
      @EFCasual 2 роки тому +1

      It isn't though.

    • @Benjome
      @Benjome 2 роки тому +10

      How about multi-member house districts with Ranked Choice Voting (each district has 3-5 reps, top 3-5 votegetters in RCV win a seat), paired with an increase in the size of the house to about 600?

    • @1ucasvb
      @1ucasvb 2 роки тому +35

      @@Benjome Really bad system to use RCV like that, it's in general an awful system. You need something like Single Transferable Vote instead, which usually uses a Droop quota and reweighing to ensure proportionality.
      But PR in general is only halfof the equation. Not that anybody really cares about changing the system, anyway...

    •  2 роки тому +12

      Part of the purpose of state senates though is that each senator represents a certain area and is supposed to vouch for the needs of that certain area

  • @nikolaymorgun3204
    @nikolaymorgun3204 2 роки тому +82

    There’s a program called Dave’s Redistricting that basically does everything shown in this video. You can make your congressional districts for all 50 states and you’re given election data to work with, that depending on what election you have set for a certain state, highly alters the outcome. I recommend checking it out and making your own maps.

    • @stefanoleidi1006
      @stefanoleidi1006 2 роки тому +1

      This is insane

    • @denp54z
      @denp54z 2 роки тому

      Why is election data needed if all that required that each district be of basically the same population regardless of political party affiliations and/or race ?
      A Representative represent all the people in their district not just a privilege group.

  • @snow-uy1dg
    @snow-uy1dg 2 роки тому

    Just stumbled across your channel. I like the balance between accessibility and not dumbing things down. Keep up the great work!

  • @dandaigle4546
    @dandaigle4546 Рік тому

    your enthusiasm is intoxicating, loved the explanations and possibilities

  • @Cyndr_
    @Cyndr_ 2 роки тому +53

    This is legitimately one of the best videos you have made. I hope more people find you because of this!

    • @goe591
      @goe591 2 роки тому +1

      I did! I'm excited to find other videos that won't have so much political narrative slinging in the comments. I'm staying for more jokes from the undergrad physics department!

  • @darrinocke7504
    @darrinocke7504 2 роки тому +12

    As someone whose actually worked on redistricting projects (starting with giant paper maps laid out on the floor and colored pencils) I think this an amazingly cool project.
    If you want to inject some political reality in to, I'd suggest you add two elements:
    1. Your very first starting map should have each district centered on the home of the incumbent- that is a huge driving force in redistricting (not drawing incumbents together)
    2. Race, because the maps have to pass muster under the Voting Rights Act which requires that minority communities be given the opportunity to elect representatives of that minority - that's why you often see strange shapes - because far-flung minority communities are drawn together to make a "majority-minority" district.
    Just a couple thoughts to build in a truly awesome project.

    • @fifthcolumn388
      @fifthcolumn388 2 роки тому +2

      “Gerrymandering is bad, except when it benefits minorities” is a weird thing.

    • @jamescollier3
      @jamescollier3 2 роки тому

      @@fifthcolumn388 we all be Democrats if it wasn't so hypocritical (and bad policy lol]))

  • @UNDERGROUNDBASS
    @UNDERGROUNDBASS 2 роки тому +1

    Your channel deserves so much more recognition. Seriously one of the best educational youtubers I've seen on this website, I wish you nothing but the best and hope you continue making videos like you have been.

  • @DIMOHA25
    @DIMOHA25 5 місяців тому

    I never thought this would be actually useful in my life, but I just came back to your video to get inspiration and some basic pointers on actually implementing this simulated annealing stuff 2+ years later. Funny thing is, it's because your video got stuck in my head thanks to the cable untangling method. It's legitimately been popping up in my mind almost every time I had a tangled cable on my hands, so I never forgot about the rest of the video too.

  • @jonnyeh
    @jonnyeh 2 роки тому +134

    I'd love to see your algorithm run but with a limitation that no border can cross a zipcode boundary. There's a theory that this one rule could greatly limit the effects of gerrymandering.
    Note: You can still have multiple zipcodes in a district, but no zipcode can be in two districts.

    • @lmmlStudios
      @lmmlStudios 2 роки тому +12

      this just becomes a combinatorics problem though, very very easy to solve given the limited number of zip codes

    • @jefflistman4178
      @jefflistman4178 2 роки тому +9

      There is also a problem that some zipcodes would need to be split to create sensible and balanced maps. Houson, for example, has three zipcodes with more than 100,000 people in them. Such a rule would result in districts snaking out of Houston to find low population zipcodes to meet the equal population constitutional requirement.

    • @albertbatfinder5240
      @albertbatfinder5240 2 роки тому +1

      Watch as the USPS is surreptitiously infiltrated by political operatives. You might just be shifting the problem.

  • @mikewilliams6025
    @mikewilliams6025 2 роки тому +37

    Can you make a follow-up where you walk though the final map you created with real world examples where it succeeded and failed? Does it cut any metropolitan areas in half? Does it follow naturally occurring geographical features? Mountains, rivers, etc? How does it stack up with established motorways and county lines? Very cool project!

    • @trousersnake81
      @trousersnake81 2 роки тому +4

      These are great questions, good things to include in a finished product of (ideally) a de-gerrymandering algorithm.

  • @BlindmanDru
    @BlindmanDru Рік тому

    I found this really interesting. When I first read the title, I thought this was going to get political, but you krpy it impartial and I appreciate that a lot

  • @erdub84
    @erdub84 2 роки тому +2

    New subscriber here. Your topics and videos are possibly the most stimulating videos I've experienced in a while. Thank you

  • @OfficialBiggBenn
    @OfficialBiggBenn 2 роки тому +4

    Wonderful video. A lot of people tend to underestimate the value of getting a "good" solution as opposed to "the best" solution. Very well done.
    Additionally, your explanations were really good too.
    Getting big number crunching code efficient enough to actually use, while not *over*simplifying everything is impressive.

  • @mr.bulldops7692
    @mr.bulldops7692 2 роки тому +8

    "How did I even do that?" + moments of panic wondering if you missed something that makes your results total garbage.

  • @Somerandom1922
    @Somerandom1922 9 місяців тому +3

    Us: Wow this is so terrible! The politicians are gerrymandering!
    AlphaPhoenix: Omg you're right, it is terrible, they've barely even optimised it!

  • @Spit823
    @Spit823 2 роки тому

    I don’t know why UA-cam hasn’t shown me your channel until now but I am so happy. I’ve watched several of your videos already and you are up there with channels like Applied Science, Thought Emporium, Nile Red, Cody’s lab, etc...
    Awesome stuff dude, you are going to blow up soon

  • @TheArmyofWin
    @TheArmyofWin 2 роки тому +5

    I've been on the "Thinking: years" stage of this exact project idea for... well, years. Super great to see someone actually made it!

  • @bowenheinrich
    @bowenheinrich 2 роки тому +29

    Never thought I'd see a video on both politics and metaheuristics. This is great!

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +6

      Hahahahaha welcome to the channel 😂

    • @fei0x
      @fei0x 2 роки тому

      It is pretty nice, though this is my third. Stand-up Maths did two politics & math videos last year: ua-cam.com/video/etx0k1nLn78/v-deo.html

  • @Jjrage1
    @Jjrage1 2 роки тому +2

    Hey mate, just figured I'd leave you a comment to let you know you're doing super well. This certainly isn't the type of content I could watch every day myself, goes right over my head, but the videos of yours I have watch are super well done! All the best to you getting some more traction with your channel.

  • @zackthompson2505
    @zackthompson2505 2 роки тому

    Yo! I love it! Every time I check back with your channel it keeps going up! Keep up the good work man!

  • @tim.kuechler
    @tim.kuechler 2 роки тому +20

    I'm working with MCMC in my bachelor thesis but I use it for a completely different goal. Thanks for showing this very cool application of MCMC. Maybe if I have time after my thesis I will try to replicate your algorithm as it seems like a really cool algorithm to code :D

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +6

      Cool! What are you using MCMC for? I remember doing a couple metropolis ising models (and I think some general equation solving? don't remember...) in undergrad. That's where I heard of the technique.

  • @Chloe-ju7jp
    @Chloe-ju7jp 2 роки тому +9

    Yo that headphone untangling thing is actually genius

  • @johannes123abc4
    @johannes123abc4 2 роки тому +5

    This dude is about to get so many e-mail requests from politicians

  • @ericlajoie8028
    @ericlajoie8028 2 роки тому

    I love how UA-cam has made it possible for so many people, with a love of learning and science, a way to become a science communicators! So many great creators solving all the problem most of us didn't know we needed answers to!

  • @BreakingTaps
    @BreakingTaps 2 роки тому +37

    Fascinating stuff! I coded up a very basic simulated anneal once and was surprised by how robust and effective it was, considering the simplicity. I'm assuming all voters were considered 100% red or blue, with no probability distribution? Might be interesting to see how it changes if votes had some variability to it... although I imagine that would make it hellish to optimize, and getting real data to work with likely impossible. Fun to think about all the ways this could be used (for good and evil) as a way to model different scenarios. Cool stuff!

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +22

      Yeah I LOVE simulated annealing. It's dirt simple but it works! At first I actually had ONLY voter data because I originally hacked something together to play with as fast as possible, so basically everyone in the state was forced to vote. It changed a surprising amount when I merged in the census population data. Before the merge I could actually get a 13-0 red but it was difficult to reach 7-6 for the fair map. I didn't run the numbers but I think that means there are more nonvoters in cities that get grouped blue? Haven't thought about it too hard.

    • @Treviisolion
      @Treviisolion 2 роки тому +3

      @@AlphaPhoenixChannel It’s decently well known that poorer people tend to vote less for a number of reasons, that poor people tend to vote democratic, and that poor democratic people tend to be grouped into urban cores as opposed to suburban areas which tend to be more purple and home to the middle and upper classes.
      Right now the Republican party isn’t exactly incentivized to make it easier for voters of the opposing party to vote, so the reasons why poorer voters don’t vote generally are either never addressed significantly in red controlled states red stares, or actively worsened in red controlled purple states.

    • @Treviisolion
      @Treviisolion 2 роки тому +1

      @@AlphaPhoenixChannel It’s decently well known that poorer people tend to vote less for a number of reasons, that poor people tend to vote democratic, and that poor democratic people tend to be grouped into urban cores as opposed to suburban areas which tend to be more purple and home to the middle and upper classes.
      Right now the Republican party isn’t exactly incentivized to make it easier for voters of the opposing party to vote, so the reasons why poorer voters don’t vote generally are either never addressed significantly in red controlled states red stares, or actively worsened in red controlled purple states.

    • @alexjago51
      @alexjago51 2 роки тому +1

      On voter probability, I suspect that by the time you get up to "pixel level" it basically averages out.

  • @rizy2001
    @rizy2001 2 роки тому +7

    Yo this is sick! Came here from a reddit link not expecting too much, but this is really high quality content and a very understandable explanation. Keep it up! :D

  • @qwgar
    @qwgar 2 роки тому +1

    This is so amazing! I'm a completely new viewer, so I dont know if it's something you would do, but I would love a follow up video comparing results of different intended outcomes of these algorithms to where they're currently at now(irl), what real world changes they might/would have, and what our current districts should aim for to be more equal. Loved the video and thank you

  • @sorenberg9156
    @sorenberg9156 2 роки тому

    This is fantastic. Thank you so much for doing the finicky work and sharing this fascinating exploration.

  • @momi7473
    @momi7473 2 роки тому +17

    Great stuff gives me, although it anxiety knowing how a normal and fair looking map can be skewed to rig results

    • @momi7473
      @momi7473 2 роки тому

      @@CheddarBro a minority group can become majority representative in the house of parliament/government. Which will lead to people of majority not being represented and then having there problems ignored also probably getting less needed resources than the minority group. Also goes against the idea of democracy entirely.

    • @josephang9927
      @josephang9927 2 роки тому +2

      @@momi7473 Elections are not about democracy alone but also equal representation.
      For instance, gay marriage become legal because (legal) representation without popular support.
      So we have Democratic and Representative forces.

  • @aidan_mundy
    @aidan_mundy 2 роки тому +3

    Great stuff, surprised to see something this high quality in my recommended section from such a small channel!

  • @adrianstephens56
    @adrianstephens56 2 роки тому +3

    Great piece of work. Please keep at it. The lab I was working in used simulated annealing in 1985 to perform voice recognition. The algorithm was parallelised and ran on an array of BBC model B microcomputers (each with a 6502 processor). The task was to adjust a parametric speech synthesis model (with a large number of parameters) to a recording of a speaker, so that speech could be generated that sounded like that individual. Speech was represented as a sequence of lower phonetic segments, each of which contained position, velocity and other parameters for several formants. Those parameters were varied to minimize a cost function representing the difference between the synthetic version and the original version. During the optimization a temperature parameter was lowered, and the system "froze" into a hopefully good local minimum.

  • @dharma4248
    @dharma4248 2 роки тому

    Recently discovered your content and immediately needed to subscribe. Your videos are amazing. Keep up the great work!

  • @Youtube_Hivemind_Member
    @Youtube_Hivemind_Member 2 роки тому +12

    Hey! This is really cool, and also terrifying!
    This video showed up in my reccomended and I've never heard of your channel, so the algorithm may have chosen your video to spread about (or I've been watching too much about video game coding aha)
    I thought I'd let you know in advance just incase this video has been chosen? Since you were uncertain about uploading it and educating people about this sort of thing in the first place and virality could attract politic-y people and whatnot
    This was fascinating!! I'm gonna see what else is up here on the channel now

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +2

      Thanks! Glad you liked it! This is far and away the most the algorithm has ever latched onto one of my videos so I’m real excited to see how long that lasts. I do some coding projects, some astronomy and photography stuff, and a lot of random physics and materials science. Hope you enjoy!

  • @Juttutin
    @Juttutin 2 роки тому +13

    It would be interesting to try and bring in natural boundaries, like major roads and streams. The surface tension aspect could maybe incorporate this.

    • @Juttutin
      @Juttutin 2 роки тому +5

      After reading other comments, things like forests and parks and other unpopulated areas would also make good boundaries. They are fuzzy thou, compared to things that make lines on a map. Not sure if fuzzy natural boundaries are easier or harder to handle than hard natural boundaries.

  • @iankelley9302
    @iankelley9302 2 роки тому +1

    Wow! Your channel is great! Thanks for the cool videos!

  • @fh3652
    @fh3652 2 роки тому

    The most beautiful nerd I have ever encountered. I have learned specific knowledge points watching this.
    Carry on forever and more.

  • @edwardatnardellaca
    @edwardatnardellaca 2 роки тому +9

    I think this has a lot of potential to do a lot of good, especially if the creation of swing districts is emphasized, could even run a new map every election with a bias to switching pixels from swing districts to safe districts. It's also terrifying.

  • @ultraderek
    @ultraderek 2 роки тому +6

    Who could have imagined that our election process and results were so opaque?

    • @Arrica101
      @Arrica101 2 роки тому +1

      Everyone. It has been known for years and years that the US voting system is hugely flawed. The only republican candidate to win by popular vote in the last 25 years was George Bush second term and that's questionable because he probably wouldn't have won that had he not been elected his previous term where he lost the popular vote. Gerrymandering is literally the only thing keeping the republican party alive

  • @mj2carlsbad
    @mj2carlsbad 2 роки тому +1

    Watched this video months ago. Still just as cool, and still just as damning.

  • @LeoStaley
    @LeoStaley 2 роки тому +5

    Came for the cool vacuum chamber stuff, stayed for all the other cool physics stuff, and get political/AI algorithm content as a bonus.
    I set this video down to listen to as I drift off to sleep because I like your voice, but it was so damn interesting I got back up and kept watching. Never happened to me before. On a freaking half hour video. You're amazing. Guess I'll just go listen to David Butler for sleep again (watch him at 1.5x speed for the best astronomy and quantum physics learning of your life. Watch him at normal speed for the quickest sleep of your life). Toodles.

  • @y337
    @y337 2 роки тому +8

    This reminds me of simulated annealing, a process inspired by metallurgy, where (steel I believe) was heated to incredibly high temperatures and allowed to cool down SLOWLY to allow the atoms to “settle” into the strongest/most stable areas. It involves the random “jostling” of data under a decreasing temperature to allow it a better chance of finding a global minima, whereas no randomness will have it settle into a local minima. This roughly resembles how you calculated the district borders

  • @xremming
    @xremming 2 роки тому

    The 10:27 "Monte Carlo method for untangling tangled headphones" has saved me so many times after I saw this video for the first time. Although I usually use it for USB or Ethernet cables.

  • @DevashishGuptaOfficial
    @DevashishGuptaOfficial 2 роки тому

    I'm so glad I found your channel! Made my day!

  • @deepspacemachines
    @deepspacemachines 2 роки тому +8

    it seems ironic that an org dedicated to fighting gerrymandering ended up providing the data for the most extreme examples of the practice :o

    • @Asdayasman
      @Asdayasman 2 роки тому +1

      Gerrymandering and not gerrymandering are the same practice, just taken in opposite directions. Makes sense they come from the same data.

  • @pyromen321
    @pyromen321 2 роки тому +7

    Absolutely incredible work! This must have been a really fun and challenging project to work on!
    From an algorithm design standpoint, I really like the phase where you let little dendrites grow out of each district to feel around surrounding areas. That’s not something I would have though to try at first! It’s a super clever way to avoid local maxima!

    • @AlphaPhoenixChannel
      @AlphaPhoenixChannel  2 роки тому +5

      That dendritic-y part was the last real discovery I made while working on this that took it from "this pretty much works" to "oh my god"

  • @fishy9447
    @fishy9447 Рік тому

    Really interesting! Really shows how subtle gerrymandering can be and the algorithm stuff is super cool!

  • @SeresHotes25
    @SeresHotes25 2 роки тому

    Omg! I love your ideas. You've inspired me to be more brave to create my own things!

  • @carpdog42
    @carpdog42 2 роки тому +13

    This really is great stuff. I feel like its a real slap in the face to people who think fixing gerrymandering is somehow easy. On some level I feel like its all wanking over a broken system though. There is no way that two parties actually represents the spectrum of people's actual opinions; the whole problem is oversimplified from the beginning. I feel like this is solving a puzzle where the image is just a finger flipping you off because nothing about the result actually matters when the actual choice is so small to begin with.

  • @dark_mage2
    @dark_mage2 2 роки тому +3

    With great power comes great responsibility. We've got to keep a close eye on what people are using algorithms for. UA-cam itself could probably use some scrutiny... but then again it did end up delivering this video so I'm happy about that at least.

  • @nicademous6396
    @nicademous6396 Рік тому +1

    This is extremely impressive. I would love if the US government was able to validate this approach to something resembling a "fair" election process. Keep up the amazing work!

  • @Ryan-rq6dx
    @Ryan-rq6dx 2 роки тому +1

    Random bumping around plus a driving force is literally evolution

  • @1ucasvb
    @1ucasvb 2 роки тому +10

    Experiments like this are good to show that the notion of districts, winner-takes-all, and having only two parties are all fundamentally anti-democratic, as they can be made arbitrarily unrepresentative. The actual solution is to use better voting methods that are consensus-driven instead of faction-driven and, if possible, some form of proportional representation.

    • @sofia.eris.bauhaus
      @sofia.eris.bauhaus 2 роки тому +2

      score voting! 🎉🎉🎉

    • @1ucasvb
      @1ucasvb 2 роки тому +2

      @@sofia.eris.bauhaus Yes! Cardinal voting. in general.

    • @sofia.eris.bauhaus
      @sofia.eris.bauhaus 2 роки тому

      @@1ucasvb oh yeah, i looked into highest median voting recently. and damn, that's a whole other world again 👀.
      from what i've seen they tend to have labeled ratings, which i dislike. and they often seem hugely skewed to the positive for some reason. i've seen the second-to-worst option being labeled "mediocre", which is just bizarre. and overall i'm not convinced that a high median is really what should matter.
      and one of my highest criteria for voting methods is predictability for the voter: they should be able to understand what effect their vote will have on the result. and i feel like score voting is hard to beat in this regard, except by less expressive systems.

    • @1ucasvb
      @1ucasvb 2 роки тому +1

      @@sofia.eris.bauhaus Using the median is full of issues, and basically destroys most of the benefits of cardinal voting: being representative of a consensus in multiple issues simultaneously. Using the mean (like in score voting) is much better and there's some really fundamental mathematical reasons for it.

    • @Tuxfanturnip
      @Tuxfanturnip 2 роки тому

      Even statewide multiple member constituencies would be better, directly turning the proportion of votes into a proportion of representatives from different parties and letting smaller parties stake out a claim even if their voters are spread across different districts.

  • @ProjectPhysX
    @ProjectPhysX 2 роки тому +4

    Basically the Ising model with more than 2 states?

  • @aaronrodriguez1226
    @aaronrodriguez1226 2 роки тому

    I'm not a long time viewer, I only kind of find math interesting, and I watched this entire video so intently my dinner got cold. Great content, man!

  • @markknecht9416
    @markknecht9416 2 роки тому

    Hooray for UA-cam recommendations. Excellent work and now one new (pixel flip) subscriber.

  • @elijahberegovsky8957
    @elijahberegovsky8957 2 роки тому +3

    Yaaay! Simulated annealing!!! My favourite algorithm, love it

  • @dakrontu
    @dakrontu 2 роки тому +8

    Can you end up with one district entirely encapsulating another? (I suspect your algorithm won't let that happen. But it would be interesting to see what happens if one district starts to wrap another and reaches the point where, in doing so, it meets itself, ie is that situation recognised, and action taken, or not?)

  • @nils9586
    @nils9586 2 роки тому

    The best Video I have seen in a while. Love it thanks!

  • @oncedidactic
    @oncedidactic 2 роки тому

    Dude, subscribed immediately. Great work!

  • @shatterdpixel
    @shatterdpixel 2 роки тому +11

    kinda wanna see the districts "go to war" allow them to be completely overtaken