{"id":18708116,"url":"https://github.com/murf-y/enhanced-networked-genetic-algorithm","last_synced_at":"2025-11-09T09:30:35.830Z","repository":{"id":226785600,"uuid":"728311177","full_name":"Murf-y/Enhanced-Networked-Genetic-Algorithm","owner":"Murf-y","description":"A Scale-free Networked Genetic Algorithm with Balanced Exploration and Exploitation","archived":false,"fork":false,"pushed_at":"2023-12-18T13:21:59.000Z","size":15043,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-28T07:26:56.495Z","etag":null,"topics":["evolutionary-algorithms","genetic-algorithm","network-science","scale-free"],"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/Murf-y.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}},"created_at":"2023-12-06T17:09:39.000Z","updated_at":"2024-03-09T15:41:50.000Z","dependencies_parsed_at":"2024-03-09T17:50:39.586Z","dependency_job_id":null,"html_url":"https://github.com/Murf-y/Enhanced-Networked-Genetic-Algorithm","commit_stats":null,"previous_names":["murf-y/enhanced-networked-genetic-algorithm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Murf-y%2FEnhanced-Networked-Genetic-Algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Murf-y%2FEnhanced-Networked-Genetic-Algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Murf-y%2FEnhanced-Networked-Genetic-Algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Murf-y%2FEnhanced-Networked-Genetic-Algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Murf-y","download_url":"https://codeload.github.com/Murf-y/Enhanced-Networked-Genetic-Algorithm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239571586,"owners_count":19661165,"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":["evolutionary-algorithms","genetic-algorithm","network-science","scale-free"],"created_at":"2024-11-07T12:21:45.328Z","updated_at":"2025-11-09T09:30:35.789Z","avatar_url":"https://github.com/Murf-y.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# A Scale-free Networked Genetic Algorithm with Balanced Exploration and Exploitation\n\nIn our proposed approach, we use a metric that combines phenotypic and genotypic similarities to establish inter-chromosomal links. We define phenotypic and genotypic similarities between two chromosomes as the differences in their fitness values and gene content, respectively. The created inter-chromosomal links form a scale-free topology that drives the evolutionary process in a way that maintains a balance of exploration and exploitation.\n\n## Installation\n\nTo install the code, first clone the repository\n\n```bash\n  git clone https://github.com/Murf-y/Enhanced-Networked-Genetic-Algorithm\n```\n\nThen install necessary packages to run the code\n\n```bash\n  pip install -r requirements.txt\n```\n\n## Usage\n\nAll GA algorithms implemented inherit from the parent GA class. To run a specific genetic algorithm, you only need to use the `main.py` file. Therefore, there is no need to open any other file for configuration. To view the code of each variation created for the genetic algorithm, open the corresponding file with the name of the variation.\n\n### Benchmark Functions\n\nIn `main.py`, first, we get the benchmark functions to use.\nTo run on all benchmark functions, you can use:\n\n```python\nbenchmark_functions = get_all_functions()\n```\nTo run on a specific set of benchmark functions, you can get them by name, for example:\n```py\nbenchmark_functions = get_functions_by_name(['f2', 'f5'])\n```\n\n### Benchmark \u0026 GA variations\n\n1. In `main.py`, after specifying the benchmark functions to use, we create an instance of a `Benchmark` given a genetic algorithm class.\nFor example:\n\n```py\nbenchmark_functions = get_all_functions()\n\n# Enhanced Networked Genetic Algorithm\nenhanced_nga_benchmark = Benchmark(genetic_algorithm=EnhancedNetworkGeneticAlgorithm, number_of_runs=1, benchmark_functions=benchmark_functions, number_of_generations=2000, population_size=125, number_elites=0, probability_crossover=0.95, probability_mutation=0.1, verbose=True, save_metrics=True)\n```\n\nThe above code, would create a Benchmark instance, with the ENGA as a genetic algorithm variation, this algorithm will run on the benchmark functions already defined  `number_of_runs` times. The ENGA will run with 125 as the number of individuals in the population, 2000 as the maximum generations, 95% probability of crossover and 10% probability of mutation. `Verbose=True`, means that the results logs will be displayed in the console with a progress bar, the `save_metrics=True` will save the metrics of the benchmark for each run.\n\n2. To run the benchmark instance already created, you simply run\n\n```py\nenhanced_nga_benchmark.run()\n```\n\n3. Currently all GA variation have a benchmark instance, hence to run them uncomment one or more of the below lines:\n\n```py\n# enhanced_nga_benchmark.run()\n# nga_benchmark.run()\n# ga_benchmark.run()\n# crga_benchmark.run()\n# dcga_benchmark.run()\n```\n\n## Images\n\n### Degree distribution of the network\n\n![Degree](./Images/Degree_distribution.png)\n\n### Example Network with 10 nodes, to illustrate the assignment of individuals\n\n![Assignment](./Images/Assignment.png)\n\n## Authors\n\n- [@Murf-y](https://github.com/Murf-y)\n- [@yazid-hoblos](https://github.com/yazid-hoblos)\n\n## Acknowledgements\n\n- [Numpy](https://numpy.org/)\n- [Networkx](https://networkx.org/)\n- [Pyvis](https://github.com/WestHealth/pyvis)\n\n## Contributing\n\nContributions are always welcome!\n\nOnce you've found an issue you'd like to work on, please follow these steps to make your contribution:\n\nComment on it and say you're working on that issue. This is to avoid conflicts with others also working on the issue. If you've followed the guidelines above, you don't need to ask permission to start work on an issue.\nWrite your code and submit your pull request.\n\nWait for code review and address any issues raised as soon as you can.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurf-y%2Fenhanced-networked-genetic-algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurf-y%2Fenhanced-networked-genetic-algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurf-y%2Fenhanced-networked-genetic-algorithm/lists"}