I am trying to algorithmically build a 16 team rotation with 4 courts, and 8 team rotations on 2 or 4 courts.
I do not need to correct for balance on an individual court, but do want to move teams around to different courts as fairly as possible.
I have a cyclic algorithm now (in Ruby), but am looking for the pieces to move the 'seed' (team A or 1) around so they are not always on court 1.
Right now I am reversing the rotation on alternating passes but this only partially solved the problem as they still only use courts 1 and 4.
This same algorithm will be fed 8 teams with 2 or 4 courts and should be reasonable there as well.