In the following program genetic algorithm was implemented. The problem was to find the best solution of connecting pins on circuit boards.
Genetic algorithm requires selection algorithm for it to work. In this case, roulette selection and tournamenst selection were implemented.
Two operators were implemented: mutation and crossing.
Mutation moves one selected segment in random direction.
Crossing swaps two paths between two selected subjects.
Parameters that are close to being optimal (producing good results) are proposed in Main file.