Example of solving an optimization problem using genetic algorithms