Form three random groups satisfying certain parameters

37 Views Asked by At

I want to form three football teams out of 18 players that have been playing for years. The input data is the following: 1) skill index per player, and 2) 100+ game results, including the most successful combination of two and three players. The teams generated need to be: 1) randomly selected, 2) more or less even in terms of average skill index, and 3) the best potential combination of players given past combined performances (but maintaining average skill intact).

Here is some sample data:

Player      Team    Game    Result   Skill

Player A    Team X  Game 1  Win      1
Player B    Team X  Game 1  Win      2
Player C    Team X  Game 1  Win      3
Player D    Team Z  Game 1  Lose     4
Player E    Team Z  Game 1  Lose     5
Player F    Team Z  Game 1  Lose     6

Player A    Team P  Game 2  Lose     1
Player B    Team Q  Game 2  Win      2
Player C    Team P  Game 2  Lose     3
Player D    Team Q  Game 2  Win      4
Player E    Team P  Game 2  Lose     5
Player F    Team Q  Game 2  Win      6

Player A    Team R  Game 3  Win      1
Player B    Team R  Game 3  Win      2
Player C    Team S  Game 3  Lose     3
Player D    Team S  Game 3  Lose     4
Player E    Team R  Game 3  Win      5
Player F    Team S  Game 3  Lose     6

Using these data, how do I form three teams that are randomly selected, but balanced in terms of skills and maximising in terms of matches of players that play well together?

*This question is similar to mine but not what I need.

1

There are 1 best solutions below

2
On BEST ANSWER

You asked a question earlier that's clearly a leadup to this one.

Your requirements are getting more and more complex. I suggest that you proceed by generating many sets of three six person teams at random, calculate a "strength" for each team using some combination of players' individual skill level and the value of pairs and triples from your previous question. Then pick the set of teams for which the strengths are closest together.