I am trying to write an algorithm that creates groups of people based on their βratingβ. A person has two parameters, name and rating. (The range of scores is from -10 to 10, but this is really not relevant). I am looking to create groups with an equal number of people (if possible, based on the number of people represented), where the average score of the group members is the same (or very close to the same).
For instance:
Group 1 (GPA = 2) - John Doe, grade 2 - Jane Doe, grade 7 - Jack Black, Grade -3
Group 2 (GPA = 2) - Bobby Fley, score 4 - Page Cary, Score -3 - Linus Tarval, Score 5
source
share