I am seeking someone who can write code for me that will optimize the formation of small groups based on their personal social preferences. I run a massage school, and at the end of our program the students pair up and work on each other over a period of weeks. This usually happens by students informally talking to each other and setting the pairs up themselves, and this works fine for many, but it means that the “least popular” students are not picked and must pair up with each other. I would like to design a system where each student submits a list of (up to) their three top picks as well as a list of (up to) two they don’t want to work with. Then the program would output the optimal groupings where no one is paired with the two they didn’t want, and maximum number of preferred pairings occur.
The class is usually 36 students in size. I would want the program to function with any even number that's divisible by 4.
One more difficult constraint to this equation is that the groupings do NOT work such that A works on B, and then B works on A. Instead, A works on B, B works on C, C works on D, and D works on A. This way we know that A and C are working on one day and B and D are working on another. In addition, a person should be able to exclude an entire set of people by gender.
So, if A is Sally, and she says that she would prefer Peter, Paul, or Mary, and she wouldn’t like Bill or Ted, neither person B nor person D can be Bill or Ted. If B or D could be Peter, Paul, or Mary, that’s great. And if Peter, Paul, or Mary picked A as well, that’s even better.
I want a script where I enter the names and gender of each student, with the 3 inclusions and 2 exclusions and potential gender exclusions, where the exclusions can also be left blank (since some people don’t have any exclusions).
I would like it to output a final table that has “Group #” down the left and “ABCD” along the top, with student names in the table cells.
I’m aware that the optimal fit would require the program running all possible options, and that might be too computationally large. Perhaps we could just pick the best of 100 runs that satisfy the exclusion conditions.
I’m not sure in what application this script would live. Could be served on my website or in Filemaker, or some other application that ran on a Mac.
I am looking for a mix of experience and value