I remember reading once about the following algorithm:
Consider a lattice grid and $N$ houses situated at grid points, in which live the town elders. They want to choose a lattice point location where they will build the city hall, such that the total distance walked by all $N$ elders is minimized. The algorithm consists of choosing an initial site at random, and then considering an adjacent site. The town elders then vote on whether to switch to the new site, only considering their own walking distances. The process repeats until no better site can be found, then that site clearly minimizes the sum of the walking distances.
Is there a general use for this type of technique (by that I mean the iterated small-shifts and then voting on them)?