Genetic algorithm

An evolutionary approach to combinatorial optimisation.

Say you are packing a bag with a weight limit of 30 and fifteen items to choose from. A genetic algorithm finds a good combination without trying all 32 768: it starts from random guesses, keeps the best, mixes them and mutates them, over and over. The best possible value here is 69. Hit Run and watch it get there.


Items

w — / 30 v —

Evolve

Speed
Generation 0
Best value —
Weight — / 30
■ best of 20 ■ average of 20

All demos