I am trying to make a golf league schedule for 19 weeks consisting of 20 players. there will be 5 tee times per week with two teams of two players playing each other. The catch is we are all close friends and switch teammates every week. so you play as a teammate to each person once. Also trying to optimize it so that there is an equal distribution of tee times so that the same person doesn't play at 1 tee time for a large portion of the league. the balance should be 4,4,4,4,3 with some people only getting a tee time 3 times. I am attaching the schedule sheet as a reference. to what I am trying to do. I made a table of each possible pairing, and have counters on the side to ensure no repeat each week and to try and optimize tee times but there are just too many variables at this point for me to program this in and doing it by hand gets confusing.