in reply to Efficient Assignment of Many People To Many Locations?

If you modify "If it's worse, discard the change, and swap again" to sometimes accepting "unfavorable" moves depending on a random number and a parameter that decreases during the simulation (usually called "temperature"), you have the simulated annealing algorithm, which has been applied to this problem. See for example,
  • Comment on Re: Efficient Assignment of Many People To Many Locations?