Following the delivery of the 2020 Census results, the legislative districts in the U.S. will be redrawn. In a majority of states, the political party in power will be responsible for assigning the district boundary, which reasonably draws skepticism as a potential conflict of interest. The concept of partisan gerrymandering, or setting congressional maps to benefit a speficic party since Elbridge Gerry was scrutinized for a district boundary he approved in 1812 that looked like a salamander.
The advent of computational mapmaking has enabled more extreme and efficient forms of partisan gerrymandering. The Voting Rights Act of 1965 explicitly prohibits racial gerrymandering, but partisan gerrymandering lies in the gray area of questionable legality, which is currently being contended in the courts. If partisan gerrymandering is at least understood to be unfair, one solution that several states already embrace is an independent, non-partisan committee that draws the maps every ten years. Perhaps an objective, unbiased algorithm could be developed and approved to divide the popultion into appropriate districts.
A starting point for such an algorithm might be the shortest splitline algorithm. The algorithm does a good job dividing regions into evenly populated, compact zones without considering any political information. However, the algorithm alone does a terrible job preserving historial neighborhoods of communities of color to ensure adequate representation. Humans don't naturally organize into geometric formations, so an impartial, just algorithm is actually incredibly complicated to develop, and perhaps harder to implement. The demo below attempts to divide an arbitray region with 12 citizens into 4 evenly populated districts.