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.
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.
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”
@@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.
@@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!
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
@@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.
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.
@@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
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!
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...
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.
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 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))
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…
@@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.
@@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
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.
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.
@@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.
@@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?
@@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.
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 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.
@@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.
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.
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.
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.
@@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.
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.
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.
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.
@@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.
@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.
@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
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 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.
@@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.
@@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.
@@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.
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...
@@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.
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.
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.)
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?
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.
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 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.
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.
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!
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.
@@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.
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.
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.
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)
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.
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.
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.
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!
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!
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.
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.
@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.
@@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?
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.
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.
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?
@@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
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
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.
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!
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.
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
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.
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.
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.
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.
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.
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.
@@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.
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
@@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.
@@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.
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.
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
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!
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.
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!
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!
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.
@@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.
@@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.
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.
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!
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.
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!
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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.
@@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.
@@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.
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.
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
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.
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.
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.
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.
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.
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.
@@1ucasvb Yes, you are correct.
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”
@@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.
@@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!
“I inadvertently simulated extreme voter fraud” is not a sentence I was expecting today.
Sure... "inadvertently"... *wink* *wink*
I don't think this is "voter fraud."
Just another day in office for a politician.
Yeah, it usually comes around on Thursdays.
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
“You became the very thing you swore to defeat!”
why are we letting politicians decide whose vote counts and whose doesn't in the first place
@@Berniebud who else would decide?
@@alistairgrey5089 just get rid of districts. Ranked choice within the state + Top 13 will get you a far more representative group.
@@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.
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.
That would be hilarious
but that would be too easy for politicians
I thought it was notable that "fair" and "gerrymandered" are just a matter of perspective.
@@TatharNuar nope
@@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
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!
Heya, love your stuff
Sup bro
yo cary
Who subbed to him when he uploaded BFDI?
I think that this might be closer to simulated annealing than MCMC.
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...
Awesome application!
I can only imagine the amount of pain is hidden behind the phrase "So I ended up fixing that"
Especially in combination with "how did I even do that"
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.
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.
@@ГеоргиГеоргиев-с3г smart
@@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))
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.
That’s how I feel lol
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…
@@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.
@@mskiptr Simply not using "first past the post" would be a good start.
Mah furst thought too!
Now for the ultimate challenge: redraw the 48 continental states as if they were voting districts in a single state
That would be hilarious
LOL yes, begin with “the 48 states” as your starting state ROFL
@@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
@@UnlikelyToRemember that would be one long state lol. A little snakey boy going around the edge of the entire country
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.
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.
The monte-carlo earbud untangling fucking blew my mind, I did not expect it to work that well.
Can we see the most gerrymandered maps with the "looking fair" parameter turned off? Let's see how totalitarian this bad boy can get
Start with New York. They are one of the worst states in the union when it comes to gerrymandering
@@tykeorama9898 *Maryland has entered the chat*
@@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.
@@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?
@@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.
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.
That would favor the democratic Party
How about make them as equal as possible
@@hassiaschbi it's still a gerrymandering algorithm. How fair the map is is arbitrary, this change would just optimize better for what LOOKS fair
Does the population centrality weight kinda do this?
@@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.
@@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.
Someone get this to CGP Grey.
Oh my god I LOVE Grey
@@AlphaPhoenixChannel In Greys terms you are the paid weasel :P
Yeah would be nice to have an analysis of the results, and compare them to the real districts.
@@Mobin92 or also, to start with the current districting map, rather than random, and see how that transforms under the fair and biased targets.
He had a video on the shortest splitline algorithm didnt he ?
This is genuinely one of the best math/programming videos that I’ve seen on the platform
Us: Wow this is so terrible! The politicians are gerrymandering!
AlphaPhoenix: Omg you're right, it is terrible, they've barely even optimised it!
No, it's
AlphaPhoenix: You're right, the politicians are terrible at gerrymandering.
@@key_bounce isnt this more proof that gerrymandering *isnt* occurring?
@@Sammysapphira Nope. Just that they don't know how to hide that it is happening.
Politicians are about to hire a lot of computer scientists
I wish.
They had done so a long time ago
Dominion
As if they hadn't already
@@josephang9927 Sure buddy
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.
Hahaha it was 18k two days ago
20k subs a week ago? xD damn hes blowing up then i suppose!
well... 80k... yes this is blowing
sees russian lettering
[conspiracy hat] This will be quite useful to the psyops team
91k
Another enhancement that might make it fun would be to add physical barriers, ie rivers, lakes, mountains, etc which could offer constraints on shapes
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
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.
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.
@@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.
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.
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.
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.
@@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.
@@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
@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.
@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
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.
In that they don't. With one party continuing to gerrymander without opposition be abuse they are dying as an idea.
@@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.
@@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.
@@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.
@@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.
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...
finally its good that politicians and parties are dumb
For once the inability of politicians to be effective have saved us. However, they will figure it out.
@@CheddarBro the People don’t matter the map does!
@@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.
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.
How was your statistical massage?
It was pretty good on average
it was fine, but for some reason now my state is run by neonazis
@@Kavukamari ?????
@@boxcarz it's just a joke, dont worry about it
@@Kavukamari this fucking got me LMAOOO
@@boxcarz
Someone will explain it, eventually, for the rest of us.
really enjoy this sort of deep dive. Glad the video id doing well. Getting too technical usually doesn't work well with my audience.
What is the strongest saw horse made with the lowest linear feet of dimensional lumber, derived by Markov Chain Monte Carlo Simulated annealing.
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.)
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?
It's never too late to change course! Don't settle for a life you don't want.
North Carolina senators with notepads: interesting
Quick, write that down, write that down!
At least it was not solitaire they have open. Oh no, actual physical notepads...
They would be very upset if they could read.
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.
@@jakeschneider9931 yeah most they can do is 11-3, VRA Mandates two M-M seats, and Raleigh is just too dem
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.
“Gerrymandering is bad, except when it benefits minorities” is a weird thing.
@@fifthcolumn388 we all be Democrats if it wasn't so hypocritical (and bad policy lol]))
@@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.
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.
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!
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.
@@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.
Its probably a bit slow to be called interactive
jesus christ, you gained 10k subs overnight. i'm honored to be one of them.
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.
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.
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)
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.
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.
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.
@@zsfekete5211 Why do you need all hispanics in the same district?
"how did I do that?" (goes for the notes).... so relatable :D
Amazing work.
Admittedly that was a recreation, but the first time I was about to explain it to camera I said almost the same words xD
Hi Martin!
Not surprised to find your comment under this video :)
This is legitimately one of the best videos you have made. I hope more people find you because of this!
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!
Next video:
"hey guys, it's been a while since my last post as the fbi claimed there was suspicious software on my computer"
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!
Wow really good video, great explanations and learned some cool algorithms
Oh cool
Definitely did not expect to find you in a random video UA-cam recommended.
Hey you
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.
This is insane
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.
@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.
@@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?
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.
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.
seems like we should just implement proportional representation if our definition of fairness for districting is “matches proportional representation”
Yep, or adopt consensus-based voting methods, instead of faction-based.
It isn't though.
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?
@@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...
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
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
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.
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!
These are great questions, good things to include in a finished product of (ideally) a de-gerrymandering algorithm.
Holy shit this is actually genius.
Please, for the sake of mankind, never release this and destroy your harddrives.
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.
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
Glad you liked it!
Never thought I'd see a video on both politics and metaheuristics. This is great!
Hahahahaha welcome to the channel 😂
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
I've been on the "Thinking: years" stage of this exact project idea for... well, years. Super great to see someone actually made it!
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.
I attended an academic presentation while in college that proved literally every way of forming the voting districts is gerrymandering.
I'm calling it now. He has all the tools to be a 500k subscriber UA-camr
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.
this just becomes a combinatorics problem though, very very easy to solve given the limited number of zip codes
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.
Watch as the USPS is surreptitiously infiltrated by political operatives. You might just be shifting the problem.
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.
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.
I wonder how many "interested students" wanted an inside look at this code...
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.
@@tissuepaper9962 yes
@@tissuepaper9962 I think you underestimate how incredibly out of touch and technologically illiterate our government is
@@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.
@@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.
you're literally KNEADING the data into the form you want by alternating weightless and free flowing/ heavy and viscous... insanely cool
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
Politicians : "WRITE THAT DOWN WRITE THAT DOWN!"
Great stuff gives me, although it anxiety knowing how a normal and fair looking map can be skewed to rig results
@@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.
@@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.
"How did I even do that?" + moments of panic wondering if you missed something that makes your results total garbage.
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.
New subscriber here. Your topics and videos are possibly the most stimulating videos I've experienced in a while. Thank you
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
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!
Yo that headphone untangling thing is actually genius
It would be interesting to try and bring in natural boundaries, like major roads and streams. The surface tension aspect could maybe incorporate this.
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.
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!
this was so cool, I loved to see the entire process, I would even watch an extended version with more details about fixing things
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!
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.
@@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.
@@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.
On voter probability, I suspect that by the time you get up to "pixel level" it basically averages out.
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.
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.
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!
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"
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.
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!
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.
This dude is about to get so many e-mail requests from politicians
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.
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.
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.
it seems ironic that an org dedicated to fighting gerrymandering ended up providing the data for the most extreme examples of the practice :o
Gerrymandering and not gerrymandering are the same practice, just taken in opposite directions. Makes sense they come from the same data.
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.
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.
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.
@@AlphaPhoenixChannel Thanks, I'll check it out.
I'd love to see this model applied to all 50 states. Amazing work!
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.
this needs to be made a journal paper
Just remember, with Proportional Representation, there is no gerrymandering. And you get appropriate representation even if you lose.
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.
Would love to see this algorithm applied to Maryland.
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
As a Charlotte resident, I forgive you for making the district look kinda weird.
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
I've never seen this channel before and frankly that's a shame. Instant sub from me
Glad to have you!
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.
score voting! 🎉🎉🎉
@@sofia.eris.bauhaus Yes! Cardinal voting. in general.
@@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.
@@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.
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.
Thanks for saying the circles are magenta made my day. Keep up the good work.
I am surprised I understood this video, you explained a super complicated topic so well to the point I could understand all of it
Who could have imagined that our election process and results were so opaque?
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
You need to talk to Andrew and Thomas on the Opening Arguments podcast. Please, it would be awesome :D
kinda wanna see the districts "go to war" allow them to be completely overtaken
i hope no politicians see this video! incredible work, im a happy new subscriber
The way you explained how you applied randomness to make this algorithm work was so easy to understand. Thanks!
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.
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.
Basically the Ising model with more than 2 states?
Magnets did it first 😂
This wouldn't be an issue with proportional representation
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.
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.