Skip to content

Instantly share code, notes, and snippets.

View Tayyab-Ilahi12's full-sized avatar
🎯
Focusing

Tayyab Elahi Tayyab-Ilahi12

🎯
Focusing
View GitHub Profile
@turbofart
turbofart / tsp.py
Created August 22, 2012 20:06
Applying a genetic algorithm to the travelling salesman problem
#!/usr/bin/env python
"""
This Python code is based on Java code by Lee Jacobson found in an article
entitled "Applying a genetic algorithm to the travelling salesman problem"
that can be found at: http://goo.gl/cJEY1
"""
import math
import random