An implementation of Falkenauer's grouping genetic algorithm to solve one-dimensional bin-packing.
The initial population is generated by starting at a random position in the item array and applying First-Fit.
Crossover is simply BPCX using First-Fit to place the remaining items.
Mutation probabilistically deletes random bins in every chromosome and places the items back into the chromosome using First-Fit.
An "inversion operator" is added, but it isn't sophisticated. It merely sorts the bins in ascending order.
The mating pool is selected through tournament selection with a tournament size of 2.
The child population completely replaces the previous population except for the single most fit chromosome from the previous population.