Gerrymandering with simulated annealing with Monte Carlo Markov chains. Found this video from 3 years ago. Basically you randomly flip pixels on a map, then, as your simulated "temperature" decreases, you decrease the randomness of how much you run with the random pixel flips regardless of whether they increase whatever gerrymandering metric you put in, and increase the degree to which the map zeroes in on a solution that's close to optimal. Your optimization function takes into account such things as to what degree funky shapes are allowed, populations of all districts are close, and of course, the degree to which the final outcome of the state is proportional to the population in terms of political parties, or whether it gives one party or the other disproportionate representation.
Algorithmic Redistricting: Elections made-to-order - AlphaPhoenix
#solidstatelife #domesticpolitics #gerrymandering #simulatedannealing