Skip to content

Genetic algorithm technique for creating optimal groupings of individuals based on their preferences

License

Notifications You must be signed in to change notification settings

frizensami/group-matching

Repository files navigation

Genetic Algorithm for Group Formation

Requirements

  • Python 3.x
  • matplotlib

Usage

./genetic.py --help

This will display all the relevant arguments for this Python script

To run with the exact arguments from the associated paper (Population Size = 10000, Number of Generation = 5000, Elitism Factor = 3, Number of non-elite individuals to select from parent population = 3, Mutation Chance = 0.5, Number of swaps per mutation = 1, Number of participants = 27, Group size = 3), run

./genetic.py -p 10000 -g 5000 -el 3 -rest 3 -mchance 0.5 -mswaps 1 -n 27 -s 3

You will need a file called rankings.csv with a n x n matrix of preference values starting at the first row and first column. The value in row i and column j will refer to the rating given by the ith participant to the jth participant.

There is some support for running multiple GA instances in parallel. Running:

./genetic-parallel.py

will execute a number of ./genetic.py instances in parallel. This has no command-line arguments - all changes need to be made in the code itself currently. The call to run_genetic(...) and the variable cpus are the main points of modification.

About

Genetic algorithm technique for creating optimal groupings of individuals based on their preferences

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages