{"id":37643595,"url":"https://github.com/acupy/genetic-algorithm-es6","last_synced_at":"2026-01-16T11:22:41.539Z","repository":{"id":57249584,"uuid":"73330131","full_name":"acupy/genetic-algorithm-es6","owner":"acupy","description":"🔬 This package provides a framework for building applications where genetic algorithm (GA) is used for solving optimization problems based on a natural selection process that mimics biological evolution. The algorithm repeatedly modifies a population of individual solutions.","archived":false,"fork":false,"pushed_at":"2018-08-17T18:15:35.000Z","size":10,"stargazers_count":9,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T06:54:16.930Z","etag":null,"topics":["ai","es6","framework","genetic-algorithm","population"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/genetic-algorithm-fw","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acupy.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":"2016-11-09T23:34:37.000Z","updated_at":"2024-05-16T06:45:41.000Z","dependencies_parsed_at":"2022-09-09T00:51:45.954Z","dependency_job_id":null,"html_url":"https://github.com/acupy/genetic-algorithm-es6","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/acupy/genetic-algorithm-es6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acupy%2Fgenetic-algorithm-es6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acupy%2Fgenetic-algorithm-es6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acupy%2Fgenetic-algorithm-es6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acupy%2Fgenetic-algorithm-es6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acupy","download_url":"https://codeload.github.com/acupy/genetic-algorithm-es6/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acupy%2Fgenetic-algorithm-es6/sbom","scorecard":{"id":164086,"data":{"date":"2025-08-11","repo":{"name":"github.com/acupy/genetic-algorithm-es6","commit":"853071d96fbb1e100352ed2a57ad07f9ca954d33"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T14:21:07.518Z","repository_id":57249584,"created_at":"2025-08-16T14:21:07.518Z","updated_at":"2025-08-16T14:21:07.518Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","es6","framework","genetic-algorithm","population"],"created_at":"2026-01-16T11:22:40.977Z","updated_at":"2026-01-16T11:22:41.534Z","avatar_url":"https://github.com/acupy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genetic algorithm framework built with JavaScript ES6\n\n[![Build Status](https://travis-ci.org/acupy/genetic-algorithm-es6.svg?branch=master)](https://travis-ci.org/acupy/genetic-algorithm-es6)\n\n[![NPM](https://nodei.co/npm/genetic-algorithm-fw.png?downloads=true)](https://npmjs.org/package/genetic-algorithm-fw)\n\nThis package provides a framework for building applications where genetic algorithms (GA) are used for solving optimization problems based on a natural selection process that mimics biological evolution.\n\nThe algorithm repeatedly modifies a population of individual solutions.\n\n## Installation\n\n```bash\n\nnpm install genetic-algorithm-fw\n\n```\n\n## Functions to define\n\n#### mutation\n\n```js\nfunction mutation(oldPhenotype){\n  // return a new phenotype\n}\n```\n\n#### crossover\n\n```js\nfunction crossover (phenoTypeA, phenoTypeB) {\n    // using phenoTypeA and phenotypeB create a new list of two phenoTypes\n    // return [phenotype1, phenotype2]\n}\n```\n#### fitness\n\n```js\nfunction fitness(phenotype) {\n  // return the fitness number\n  // the higher the value the fitter it is\n}\n```\n#### competition\n```js\nfunction competition(phenoTypeA, phenoTypeB) {\n    // return true when the fitness value is higher for phenoTypeA\n    // otherwise return false\n}\n```\n\n## Initialize GA object with the previously defined functions\n```js\nvar GeneticAlgorithm = require('genetic-algorithm-fw');\n\nvar geneticalgorithm = new GeneticAlgorithm(\n  mutation, // if not specified, no mutation happens\n  crossover, // if not specified, the initial phenoTypes are returned\n  fitness, // if not specified, 0 is returned\n  competition, // if not specified, no competition happens\n  [], // initial list of phenoTypes\n  populationSize, // by defualt it is 100\n  chanceOfMutation); // by defautlt it is 50\n```\n## Evolve our population\n```js\n// we can run as many iterations as we like\ngeneticalgorithm.evolve();\n```\n\n## Get the best result\n```js\n// we can check the best phenotype in our current population\nvar theBestPhenotype = geneticalgorithm.best();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facupy%2Fgenetic-algorithm-es6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facupy%2Fgenetic-algorithm-es6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facupy%2Fgenetic-algorithm-es6/lists"}