3 ms·
For a uni assignment we had to do a project that organised a bunch of people into 4-5 person groups based on * gender (try to get mixed gender groups and atlea
by blarg1 7y ago
For a uni assignment we had to do a project that organised a bunch of people into 4-5 person groups based on
* gender (try to get mixed gender groups and atleast have two of each gender in a group e.g. no 1 female + 4 males)
* skill types and skill level (so correct combination of skills and skill levels)
* bunch of other rules and stats
At first I brute forced it, but didn't work very well, then with a few tweaks I used a simulated annealing algorithm which worked perfectly. I believe genetic algorithms can solve the same problems like that though.