{"id":18402861,"url":"https://github.com/jancervenka/genalg","last_synced_at":"2025-04-12T18:29:55.230Z","repository":{"id":94373891,"uuid":"73598368","full_name":"jancervenka/genalg","owner":"jancervenka","description":"Solver for traveling salesman problem","archived":false,"fork":false,"pushed_at":"2023-07-06T21:58:10.000Z","size":1532,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T03:45:02.563Z","etag":null,"topics":["genetic-algorithm","numpy","python"],"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/jancervenka.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-11-13T05:55:56.000Z","updated_at":"2020-07-08T17:05:47.000Z","dependencies_parsed_at":"2024-11-06T03:08:56.315Z","dependency_job_id":"2da75696-9a05-4daf-9851-845f725bb79c","html_url":"https://github.com/jancervenka/genalg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jancervenka%2Fgenalg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jancervenka%2Fgenalg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jancervenka%2Fgenalg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jancervenka%2Fgenalg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jancervenka","download_url":"https://codeload.github.com/jancervenka/genalg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248612936,"owners_count":21133404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["genetic-algorithm","numpy","python"],"created_at":"2024-11-06T02:43:46.321Z","updated_at":"2025-04-12T18:29:55.202Z","avatar_url":"https://github.com/jancervenka.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GENALG\n\nExample of a genetic algorithm solution to the traveling salesman problem.\n\nYou can install the package using `setup.py` as:\n\n```bash\npython setup.py install\n```\n\n## Example\n\n```python\n\nfrom genalg.algorithm import GeneticAlgorithm, Problem\n\ncities = [(20, 30), (50, 10), (21, 22), (35, 40),\n          (10, 15), (91, 21), (25, 22), (55, 11),\n          (12, 12), (13, 55), (51, 69), (52, 25),\n          (13, 14), (51, 85), (11, 99), (82, 44),\n          (33, 24), (93, 22), (85, 29), (21, 19)]\n\nproblem = Problem(cities=cities)\nga = GeneticAlgorithm(problem=problem)\nsolution = ga.compute(n_generation=50)\n\nprint(solution.fitness)\nprint(solution.path)\n```\n\n![problem90](img/problem_90.svg \"Solution to a problem with 90 cities\")\n![problem20](img/problem_20.svg \"Solution to a problem with 20 cities\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjancervenka%2Fgenalg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjancervenka%2Fgenalg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjancervenka%2Fgenalg/lists"}