{"id":20918356,"url":"https://github.com/governmentplates/geneticalgorithm","last_synced_at":"2025-08-22T19:04:01.254Z","repository":{"id":54341377,"uuid":"390491909","full_name":"GovernmentPlates/GeneticAlgorithm","owner":"GovernmentPlates","description":"Genetic algorithm with Ackley function optimization","archived":false,"fork":false,"pushed_at":"2022-08-07T10:53:43.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T16:49:20.401Z","etag":null,"topics":["ackley-function-optimization","genetic-algorithm","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"afl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GovernmentPlates.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-28T20:14:46.000Z","updated_at":"2024-07-08T02:55:31.000Z","dependencies_parsed_at":"2022-08-13T12:40:10.077Z","dependency_job_id":null,"html_url":"https://github.com/GovernmentPlates/GeneticAlgorithm","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/GovernmentPlates%2FGeneticAlgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovernmentPlates%2FGeneticAlgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovernmentPlates%2FGeneticAlgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GovernmentPlates%2FGeneticAlgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GovernmentPlates","download_url":"https://codeload.github.com/GovernmentPlates/GeneticAlgorithm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243312916,"owners_count":20271160,"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":["ackley-function-optimization","genetic-algorithm","python"],"created_at":"2024-11-18T16:38:40.081Z","updated_at":"2025-03-12T23:42:44.790Z","avatar_url":"https://github.com/GovernmentPlates.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (Simple) Genetic Algorithm\nSimple genetic algorithm with Ackley's function optimization.\n\n**Author:** Dominic Hollis (GovernmentPlates) -- Uni Coursework (May 2021)\n***\n\n## Running the GA\nMake sure that all the files `main.py`, `GAFunctions.py` and `GAConfig.py` are in the same\ndirectory.\n\nThen run `main.py` from your Python CLI -- after a few seconds (depending on your parameters), you should see a GAOutput.csv generated.\nThe CSV contains the population coordinates, which can then be fed into a program like Excel to produce a graph.\n\n![GAOutput.csv scatter graph](https://github.com/GovernmentPlates/GeneticAlgorithm/blob/main/GAGraph.png)\n\n**IMPORTANT:** Make sure that you are reading the output of the console for any messages.\n\n## Adjusting the parameters of the GA\nThe script will read from the configuration file called `ga.config`. You can open this file up\nin a text editor of your choice and change around the parameters on there.\n\nIf this is the first time you are running the script, it will generate a configuration file with default parameters for you. Once it does this, re-run `main.py`.\n\nExample `ga.config` file:\n```\npopulationSize:100\nmaximumGens:1000\nminBoundsSolutionConstraint:-5\nmaxBoundsSolutionConstraint:5\n```\n\n**populationSize** Set's the size of the population (used in generating the population for the first time).\n\n**maximumGens** Set's the maximum number of generations that the GA will go through.\n\n**minBoundsSolutionConstraint** A minimum boundary value (used in generating random numbers).\n\n**maxBoundsSolutionConstraint** A maximum boundary value (used in generating random numbers).\n\n**NOTE:** As per the [university assignment] requirements, the **minBoundsSolutionConstraint** and **maxBoundsSolutionConstraint** must be set at **-5** and **5** (constraints).\n\n\n## Features Implemented\n* Population generation\n* Genetic crossover + Mutation\n* Child generation\n* Ackley function optimization (used in the fitness function)\n* Configuration system (innovation?)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovernmentplates%2Fgeneticalgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgovernmentplates%2Fgeneticalgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovernmentplates%2Fgeneticalgorithm/lists"}