The travelling salesman problem is a well known problem in computer science. The solution is the shortest route a hypothetical travelling salesman can take, such that all possible cities are visited. Common optimization methods are not practical in terms of the required computation time, specially when the number of cities is large. A genetic algorithm is constructed such that the algorithm converges to a local optimal solution in a reasonable time span.