Загрузка...

Genetic Algorithm with Python - Source Code Explained - Travelling Salesman Problem - Part 2

This is the second part of the video series about Genetic Algorithm and Python implementation of Travelling Salesman Problem(TSP). I prepared Python files and example dataset, and explained each function and steps during the video.

I displayed Chromosome sequence implementation in Python, and you can use the same or similar structure for your optimisation problems. Moreover, I added three different crossover functions. As a selection method, I used “Tournament Selection” method. You can use this or adapt any of other like Wheel Roulette.

Lastly, remember that GA is quite successful and efficient but it doesn’t provide the best solution in all cases. It provides optimal solutions in an efficient time. Therefore, it’s always better to think local optimisation algorithms with GA.

My code is accessible on the Github. You can use or inspire. The link:
https://github.com/emre-kocyigit/genetic_algorithm_tsp

Also for other available datasets in TSPLIB:
http://elib.zib.de/pub/mp-testdata/tsp/tsplib/tsp/index.html

#geneticalgorithm
#python
#travellingsalesmanproblem
#geneticalgorithmwithpython

Timecode
0:00 Intro, TSP
0:33 Dataset
1:16 General structure, main file, parameters
4:13 Chromosome file, Node class, distance matrix
6:57 Genetic algorithm, steps, operators
8:27 Selection (tournament)
9:21 Crossovers, one point, two points, mixed
12:13 Mutation
12:39 Create a new generation
13:56 Results and evolutionary progress of the paths

Видео Genetic Algorithm with Python - Source Code Explained - Travelling Salesman Problem - Part 2 канала Emre KOCYIGIT
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять