{"id":20078589,"url":"https://github.com/timbo-rafa/genetic-algorithm","last_synced_at":"2026-06-09T17:31:46.131Z","repository":{"id":118734033,"uuid":"60626485","full_name":"timbo-rafa/genetic-algorithm","owner":"timbo-rafa","description":"Parallel Genetic Algorithm python code for the Travelling Salesman Problem.","archived":false,"fork":false,"pushed_at":"2019-08-22T18:34:15.000Z","size":874,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T13:14:29.097Z","etag":null,"topics":["algorithms","demo","genetic-algorithm","python","python3","qa","tdd","test","travis","tsp-problem"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timbo-rafa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-07T15:51:45.000Z","updated_at":"2021-11-12T20:55:34.000Z","dependencies_parsed_at":"2023-03-16T03:31:58.541Z","dependency_job_id":null,"html_url":"https://github.com/timbo-rafa/genetic-algorithm","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/timbo-rafa/genetic-algorithm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbo-rafa%2Fgenetic-algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbo-rafa%2Fgenetic-algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbo-rafa%2Fgenetic-algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbo-rafa%2Fgenetic-algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timbo-rafa","download_url":"https://codeload.github.com/timbo-rafa/genetic-algorithm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbo-rafa%2Fgenetic-algorithm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34118751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","demo","genetic-algorithm","python","python3","qa","tdd","test","travis","tsp-problem"],"created_at":"2024-11-13T15:15:35.202Z","updated_at":"2026-06-09T17:31:46.115Z","avatar_url":"https://github.com/timbo-rafa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/timbo-rafa/genetic-algorithm.svg?branch=master)](https://travis-ci.org/timbo-rafa/genetic-algorithm)\n\n# Genetic Algorithm\nGenetic Algorithm for the Traveling Salesman Problem\n\n## Problem\n\n#### Definition\n\nGiven a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and returns to the origin city?\nIt is an NP-hard problem in combinatorial optimization.\n\n#### Data Modeling\n\nThe TSP can be modelled as an undirected weighted graph, such that cities are the graph's vertices, paths are the graph's edges, and a path's distance is the edge's weight.\nIt is a minimization problem starting and finishing at a specified vertex\nafter having visited each other vertex exactly once.\n\n#### Solution Technique\n\nGenetic algorithms are evolutionary techniques used for optimization purposes according to survival of the fittest idea. These methods do not ensure optimal solutions; however, they give good approximation usually in time. The genetic algorithms are useful for NP-hard problems, especially the traveling salesman problem. We used this technique here.\n\n## Installation\n\n```bash\ngit clone https://github.com/timbo-rafa/genetic-algorithm\ncd genetic-algorithm\npip install networkx\n```\n\n## Running\n\n![Running](https://raw.githubusercontent.com/timbo-rafa/genetic-algorithm/master/screenshots/genetic-algorithms-run.gif)\n\n### Testing\n\nTests made using [nose](http://nose.readthedocs.io/en/latest/)\n![Testing](https://raw.githubusercontent.com/timbo-rafa/genetic-algorithm/master/screenshots/genetic-algorithms-test.gif)\n\n### Profiling\n\n![Profiling](https://raw.githubusercontent.com/timbo-rafa/genetic-algorithm/master/screenshots/genetic-algorithms-profiler.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimbo-rafa%2Fgenetic-algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimbo-rafa%2Fgenetic-algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimbo-rafa%2Fgenetic-algorithm/lists"}