Algorithmic Redistricting: Elections made-to-order

Поділитися
Вставка
  • Опубліковано 24 лис 2024

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

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

    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 3 роки тому +74

      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 3 роки тому +5

      @@1ucasvb Yes, you are correct.

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

      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 3 роки тому +34

      ​@@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 3 роки тому +38

      @@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 3 роки тому +2721

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

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

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

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

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

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

      Just another day in office for a politician.

    • @tamfang
      @tamfang Місяць тому +1

      Yeah, it usually comes around on Thursdays.

  • @ellowell8160
    @ellowell8160 3 роки тому +4395

    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 3 роки тому +247

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

    • @Berniebud
      @Berniebud 3 роки тому +235

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

    • @alistairgrey5089
      @alistairgrey5089 3 роки тому +19

      @@Berniebud who else would decide?

    • @mjs3188
      @mjs3188 3 роки тому +192

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

    • @mitchellroberts7954
      @mitchellroberts7954 3 роки тому +73

      @@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 роки тому +1201

    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 роки тому +100

      That would be hilarious

    • @majormelon8855
      @majormelon8855 2 роки тому +16

      but that would be too easy for politicians

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

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

    • @Anankin12
      @Anankin12 2 роки тому +34

      @@TatharNuar nope

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

      @@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 3 роки тому +1155

    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!

  • @HexerPsy
    @HexerPsy 3 роки тому +363

    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...

  • @Runix1
    @Runix1 3 роки тому +863

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

    • @Arcanefungus
      @Arcanefungus 3 роки тому +47

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

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

      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.

    • @ГеоргиГеоргиев-с3г
      @ГеоргиГеоргиев-с3г 3 роки тому +5

      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 роки тому

      @@ГеоргиГеоргиев-с3г smart

    • @ГеоргиГеоргиев-с3г
      @ГеоргиГеоргиев-с3г 2 роки тому +1

      @@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))

  • @itsevilbert
    @itsevilbert 3 роки тому +2585

    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  3 роки тому +578

      That’s how I feel lol

    • @mskiptr
      @mskiptr 3 роки тому +186

      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 3 роки тому +107

      @@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 3 роки тому +171

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

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

      Mah furst thought too!

  • @MajorWX2
    @MajorWX2 3 роки тому +1955

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

    • @neverendar1778
      @neverendar1778 3 роки тому +118

      That would be hilarious

    • @whophd
      @whophd 3 роки тому +69

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

    • @UnlikelyToRemember
      @UnlikelyToRemember 3 роки тому +172

      @@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

    • @Freekymoho
      @Freekymoho 3 роки тому +78

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

    • @estonalexander704
      @estonalexander704 3 роки тому +56

      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.

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

    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.

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

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

  • @yitzakIr
    @yitzakIr 3 роки тому +800

    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 3 роки тому +79

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

    • @seg162
      @seg162 3 роки тому +100

      @@tykeorama9898 *Maryland has entered the chat*

    • @antoniozavaldski
      @antoniozavaldski 3 роки тому +86

      @@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 3 роки тому +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 3 роки тому +61

      @@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.

  • @DynamicFortitude
    @DynamicFortitude 3 роки тому +1487

    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 3 роки тому +34

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

    • @eclogite
      @eclogite 3 роки тому +462

      @@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 3 роки тому +65

      Does the population centrality weight kinda do this?

    • @KX36
      @KX36 3 роки тому +188

      @@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 3 роки тому +6

      @@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.

  • @evanfelch7689
    @evanfelch7689 3 роки тому +2979

    Someone get this to CGP Grey.

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

      Oh my god I LOVE Grey

    • @Bbonno
      @Bbonno 3 роки тому +174

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

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

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

    • @Juttutin
      @Juttutin 3 роки тому +45

      @@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 3 роки тому +9

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

  • @whydontiknowthat
    @whydontiknowthat 3 роки тому +136

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

  • @Somerandom1922
    @Somerandom1922 Рік тому +27

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

    • @key_bounce
      @key_bounce Місяць тому

      No, it's
      AlphaPhoenix: You're right, the politicians are terrible at gerrymandering.

    • @Sammysapphira
      @Sammysapphira 11 днів тому

      ​@@key_bounce isnt this more proof that gerrymandering *isnt* occurring?

    • @key_bounce
      @key_bounce 10 днів тому

      @@Sammysapphira Nope. Just that they don't know how to hide that it is happening.

  • @msnhao
    @msnhao 3 роки тому +525

    Politicians are about to hire a lot of computer scientists

  • @mr.boltun1043
    @mr.boltun1043 3 роки тому +420

    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.

  • @jerwahjwcc
    @jerwahjwcc 3 роки тому +352

    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  3 роки тому +161

      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 3 роки тому +32

      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 3 роки тому +3

      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 3 роки тому +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 3 роки тому +3

      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.

  • @EvilAng3la
    @EvilAng3la 3 роки тому +58

    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.

    • @red_roy
      @red_roy Місяць тому +3

      while i agree with you
      big changes take more time and effort.
      and easier change would be, to use the previous election as a reference. and drawing the borders in such a way that the popular vote ratio of dems:reps is close to the district ratio.
      so if there are 5 districts and dems won 60% of the popular vote in the previous election, the districts should be drawn in such a way to give 3 districts to the dems if the election happened exactly the same next time.
      not a perfect but works much better imo.
      didnt mention that what im proposing is for this to be the written in law as the way to draw district maps and if the maps dont follow it, they get are invalid.

    • @evancombs5159
      @evancombs5159 24 дні тому +1

      @@red_roy using the previous election is extremely biased when you are changing districts on a 10 year basis. Better to use the previous 10 years. Or better yet, use a system that only looks at population, and doesn't care about voting patterns.

    • @omduggineni
      @omduggineni 24 дні тому +1

      @@red_roy Using the previous election just biases whoever's in power to stay in power. I feel like proportional representation is still the answer

    • @red_roy
      @red_roy 24 дні тому

      @evancombs5159 oh i didnt know they changed it every 10 years.
      i was imolying using a new map that reflects the last election, every election.
      but i wonder if that will be bad to change districts that often, maybe just change the map everytime demographics change significantly enough to change the ratio of red to blue districts.
      also i think i disagree with you, if a city expands and a district that used to be red becomes blue. theres no reason to base the map off the last 10 years when the change is likely to be permanent.

    • @red_roy
      @red_roy 24 дні тому

      @evancombs5159 "only looks at population and doesnt care about voting patterns", the whole point is to district things in such a way the state popular vote ratio and the ratio of blue to red districts are kept the same.
      population isnt the only thing that matters, class, occupation, literacy, race, age, all of these will change voting.
      and if youre gonna be taking into account all of these variables to keep districting fair, might as well just use the voting patterns

  • @aniquinstark4347
    @aniquinstark4347 3 роки тому +95

    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 роки тому +3

      ​@@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 2 роки тому

      @@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 2 роки тому +18

      @@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.

  • @raz1572
    @raz1572 3 роки тому +274

    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 3 роки тому +21

      finally its good that politicians and parties are dumb

    • @iantaakalla8180
      @iantaakalla8180 3 роки тому +40

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

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

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

    • @zewhatyouwannasay
      @zewhatyouwannasay 3 роки тому +19

      @@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 3 роки тому +10

      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.

  • @sirfloppy
    @sirfloppy 3 роки тому +383

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

    • @Kavukamari
      @Kavukamari 3 роки тому +7

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

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

      @@Kavukamari ?????

    • @Kavukamari
      @Kavukamari 3 роки тому +1

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

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

      @@Kavukamari this fucking got me LMAOOO

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

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

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

    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.

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

    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_ Рік тому +4

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

  • @Russiansnow
    @Russiansnow 3 роки тому +229

    North Carolina senators with notepads: interesting

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

      Quick, write that down, write that down!

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

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

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

      They would be very upset if they could read.

    • @jakeschneider9931
      @jakeschneider9931 3 роки тому +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 3 роки тому

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

  • @darrinocke7504
    @darrinocke7504 3 роки тому +19

    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 3 роки тому +8

      “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]))

    • @connorthompson66
      @connorthompson66 4 місяці тому +4

      ​@@fifthcolumn388 The Supreme Court case Shaw v. Reno made gerrymandering on racial or ethnic grounds unconstitutional, even as a form of affirmative action for minority candidates.

  • @NikoKun
    @NikoKun 3 роки тому +128

    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 3 роки тому +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 3 роки тому +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 3 роки тому +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 3 роки тому

      Its probably a bit slow to be called interactive

  • @vyladence
    @vyladence 3 роки тому +26

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

  • @jmckinney0040
    @jmckinney0040 3 роки тому +12

    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.

  • @adamwhitney3935
    @adamwhitney3935 3 роки тому +189

    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 3 роки тому +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 3 роки тому +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 3 роки тому +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 3 роки тому +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 3 роки тому +1

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

  • @mlutteral
    @mlutteral 3 роки тому +118

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

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

      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 3 роки тому +1

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

  • @Cyndr_
    @Cyndr_ 3 роки тому +54

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

    • @goe591
      @goe591 3 роки тому +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!

  • @_Pyroon_
    @_Pyroon_ 3 роки тому +18

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

  • @nicademous6396
    @nicademous6396 2 роки тому +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!

  • @Miziziziz
    @Miziziziz 3 роки тому +331

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

  • @nikolaymorgun3204
    @nikolaymorgun3204 3 роки тому +89

    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.

    • @jacobduncan2142
      @jacobduncan2142 Місяць тому

      ​@denp54z the site provides all of that data. It's not needed, but it is interesting. There is even an option to remove voting data and go blind. Whatever floats your boat.

    • @GillfigGarstang
      @GillfigGarstang 24 дні тому +1

      @@denp54zImagine a square image with the top half coloured solid blue and the bottom half solid red.
      The image is to be divided into two equally-sized pieces and the whole image will be represented by the average colour of each piece.
      If you cut the image vertically you will get a uniform purple square, if you cut it horizontally you would get something indistinguishable from the original image; which do you think would be a more representative/fair picture of the original image?

  • @OfficialBiggBenn
    @OfficialBiggBenn 3 роки тому +5

    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.

  • @YodaWhat
    @YodaWhat Місяць тому +1

    I arrived at this video when it was already 3 years old, and still found it quite fascinating in its own right. I also saw that it relates to other fields where _apparent randomness_ is important, such as the *turbulent flow of fluids.* That kind of cross-fertilization of ideas is UTTERLY FASCINATING to me. TYVM for this video! -- Another resident of N. Carolina.

  • @garthgoldwater5256
    @garthgoldwater5256 3 роки тому +334

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

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

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

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

      It isn't though.

    • @Benjome
      @Benjome 3 роки тому +11

      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 3 роки тому +37

      @@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...

    •  3 роки тому +13

      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

  • @tim.kuechler
    @tim.kuechler 3 роки тому +21

    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  3 роки тому +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.

  • @mikewilliams6025
    @mikewilliams6025 3 роки тому +38

    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 3 роки тому +4

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

  • @Kukielka
    @Kukielka 3 роки тому +27

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

  • @Jjrage1
    @Jjrage1 3 роки тому +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.

  • @rizy2001
    @rizy2001 3 роки тому +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

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

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

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

      Hahahahaha welcome to the channel 😂

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

      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

  • @TheArmyofWin
    @TheArmyofWin 3 роки тому +6

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

  • @adrianstephens56
    @adrianstephens56 3 роки тому +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.

  • @trevorseitz502
    @trevorseitz502 10 днів тому +1

    I attended an academic presentation while in college that proved literally every way of forming the voting districts is gerrymandering.

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

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

  • @jonnyeh
    @jonnyeh 3 роки тому +139

    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 3 роки тому +13

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

    • @jefflistman4178
      @jefflistman4178 3 роки тому +11

      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.

    • @connorthompson66
      @connorthompson66 4 місяці тому

      I also would like to see how we can algorithmically create maps that best reflect the towns and cities that comprise them. For instance, combine towns with regional school districts, or regional health boards. Combine towns in the same county. Combine towns that provide each other water, electricity, waste treatment, garbage collection services, or any other utility service. Etc.

    • @key_bounce
      @key_bounce Місяць тому +1

      Bad idea. Zipcodes were made long ago based on how mail needed to be delivered in the distant past, and do not represent anything about the modern population layout.
      It would eliminate *intentional* gerrymandering, and give you *unintended* gerrymandering of a different type.

  • @RellekEarth
    @RellekEarth 3 роки тому +232

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

    • @tissuepaper9962
      @tissuepaper9962 3 роки тому +45

      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 3 роки тому +6

      @@tissuepaper9962 yes

    • @ZuluboProductions
      @ZuluboProductions 3 роки тому +31

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

    • @tissuepaper9962
      @tissuepaper9962 3 роки тому +26

      @@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 3 роки тому +4

      @@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.

  • @wv1107
    @wv1107 3 роки тому +1

    you're literally KNEADING the data into the form you want by alternating weightless and free flowing/ heavy and viscous... insanely cool

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

    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

  • @kylecook4806
    @kylecook4806 3 роки тому +26

    Politicians : "WRITE THAT DOWN WRITE THAT DOWN!"

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

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

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

      @@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 3 роки тому +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.

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

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

  • @Gwallacec2
    @Gwallacec2 3 роки тому +1

    To be honest I think this video existing poses a threat. Obviously, someone else would just come up with this idea but this is spreading the knowledge. Not that this is your fault it would happen regardless it's just terrifying.

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

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

  • @Youtube_Hivemind_Member
    @Youtube_Hivemind_Member 3 роки тому +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  3 роки тому +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!

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

    Yo that headphone untangling thing is actually genius

  • @Juttutin
    @Juttutin 3 роки тому +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 3 роки тому +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.

  • @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!

  • @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

  • @BreakingTaps
    @BreakingTaps 3 роки тому +38

    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  3 роки тому +23

      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 3 роки тому +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 3 роки тому +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 3 роки тому +1

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

  • @nicholasimholte7359
    @nicholasimholte7359 3 роки тому +6

    It's pretty amazing that you don't even have to have weirdly shaped districts to gerrymander. More proof of the need of proportional representation.

    • @syro33
      @syro33 Місяць тому +1

      Yeah... Look at Utah's districts and they look pretty normally shaped, but 3 out of 4 of them take a piece of the most urban area in the state (the salt lake valley/metro area) and stretch out to the rural areas on the borders of the state. So the borders look smooth, but the dividing lines cut up the major metro area that has like a third of the total population.

  • @pyromen321
    @pyromen321 3 роки тому +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  3 роки тому +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"

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

    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.

  • @imaskier
    @imaskier 3 роки тому +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!

  • @LeoStaley
    @LeoStaley 3 роки тому +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.

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

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

  • @edwardatnardellaca
    @edwardatnardellaca 3 роки тому +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.

  • @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.

  • @UNDERGROUNDBASS
    @UNDERGROUNDBASS 3 роки тому +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.

  • @deepspacemachines
    @deepspacemachines 3 роки тому +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 роки тому +3

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

  • @carpdog42
    @carpdog42 3 роки тому +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.

  • @bejoscha
    @bejoscha 3 роки тому +4

    Came here from Reddit. Really liked that video and share your passion for (seemingly) gamishy-senseless simulations, so I really enjoyed that and the ideas presented.

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

      I haven't made a matlab/python playlist yet, but on the channel here you should be able to find a snake AI and a molecular dynamics crystalization. I also want to go deeper into image processing as a video at some point. I'm pretty sure that when posted, my Snake AI was the "best" snake AI, granted you were playing on a board with an even number of squares, but if you look at the pinned comment, somebody took the general idea and made a fantastically elegant change that makes it crazy efficient - unfortunately they don't have a youtube channel, but you CAN watch it play on their github.

    • @bejoscha
      @bejoscha 3 роки тому

      @@AlphaPhoenixChannel Thanks, I'll check it out.

  • @judemiller
    @judemiller 2 місяці тому +2

    I'd love to see this model applied to all 50 states. Amazing work!

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

    You are already one of my heroes. I have a Bachelor's degree in Electrical Engineering. My biggest regret is that I didn't at least earn my Masters. But this video elevated you to a whole new level in my mind. I have been concerned about politicians' gerrymandering maps for quite some time. Like most of your material, I will need to apply lots of effort to wrap my mind around the entire video. But your topic selections are excellent. I am so happy that you share your talent on this channel.

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

    this needs to be made a journal paper

  • @TheAlchaemist
    @TheAlchaemist Місяць тому +3

    Just remember, with Proportional Representation, there is no gerrymandering. And you get appropriate representation even if you lose.

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

    It’s good to note that no one algorithm can objectively create good maps. The process of redistricting is inherently subjective in how various factors are weighted-population variance, communities of interest, whether more representative or more competitive is more important and to what extent, what metric(s) are used for “compactness”, and even how votes are counted all make a difference. Anyone who says they’ve found the One True Algorithm™ is most likely lying and taking advantage of most people’s ignorance on the topic.

  • @Jilktube
    @Jilktube 3 роки тому +7

    Would love to see this algorithm applied to Maryland.

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

    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

  • @funnycat9962
    @funnycat9962 3 роки тому +1

    As a Charlotte resident, I forgive you for making the district look kinda weird.

  • @y337
    @y337 3 роки тому +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

  • @lewismassie
    @lewismassie 3 роки тому +6

    I've never seen this channel before and frankly that's a shame. Instant sub from me

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

    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 3 роки тому +2

      score voting! 🎉🎉🎉

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

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

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

      @@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 3 роки тому +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 3 роки тому

      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.

  • @BobnWeaveFC
    @BobnWeaveFC 3 роки тому +1

    Thanks for saying the circles are magenta made my day. Keep up the good work.

  • @Troutmaan
    @Troutmaan 3 роки тому +1

    I am surprised I understood this video, you explained a super complicated topic so well to the point I could understand all of it

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

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

    • @Arrica101
      @Arrica101 3 роки тому +3

      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

  • @Spinobreaker
    @Spinobreaker 3 роки тому +5

    You need to talk to Andrew and Thomas on the Opening Arguments podcast. Please, it would be awesome :D

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

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

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

    i hope no politicians see this video! incredible work, im a happy new subscriber

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

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

  • @DEtchells
    @DEtchells 3 роки тому +3

    Wow, brilliant work and really fascinating! I was surprised to see that you could end up with such significant gerrymandering with such reasonable-looking district boundaries. State political parties should license your software! (Actually, how about just putting it in the public domain, if you haven’t already?)
    It does point out how broken the current system is; I’d like to see some sort of requirement for software like this to be used for redistricting going forward, with the requirement that the “fairness parameter” be set neutral.

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

      I feel like its better to not make it a public domain, the distance between it being a theoretical question and actual physical implemintaiuon is the reach of the average politician to the application, better not shorten the distance.

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

    Basically the Ising model with more than 2 states?

  • @SputnikRX
    @SputnikRX 21 день тому +3

    This wouldn't be an issue with proportional representation

  • @zebj16
    @zebj16 3 роки тому +1

    Wow, many many years ago, a colleague and I implemented a robot motion planner that constructed an N dimensional configuration space to approximate an "attractive field" based on a Voronoi surface to "keep" the robot away from objects. There would also be various constraints on the motion. The hard part was the weighting of multiple factors.
    So strange to watch this video and see similar algorithmic approach to a completely different problem.
    Excellent video.

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

    On the one hand, this has incredible power to keep elections honest (with other conditions taken into account, like race). On the other hand, no sane government would give up control like this, and so look forward to the more sinister aspects of your video coming to elections near you in the future.