This is the Simple Genetic Algorithm(SGA) to find the optimal solution for the 0-1 Knapsack problem. Gene material are exchanged using the single point crossover. Single point mutation was applied to increase the diversity in the population.
For more details, read the following article http://www.dataminingapps.com/2017/03/solving-the-knapsack-problem-with-a-simple-genetic-algorithm/