{"id":41207640,"url":"https://github.com/godatadriven/evol","last_synced_at":"2026-01-22T22:20:14.801Z","repository":{"id":23933552,"uuid":"97301207","full_name":"godatadriven/evol","owner":"godatadriven","description":"a python grammar for evolutionary algorithms and heuristics","archived":false,"fork":false,"pushed_at":"2022-04-07T17:57:11.000Z","size":1375,"stargazers_count":191,"open_issues_count":10,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-08T14:16:57.011Z","etag":null,"topics":["artificial-intelligence","evolutionary-algorithm","heuristics","pythonic"],"latest_commit_sha":null,"homepage":"https://evol.rtfd.io","language":"Python","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/godatadriven.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":"2017-07-15T07:59:20.000Z","updated_at":"2025-07-12T16:06:42.000Z","dependencies_parsed_at":"2022-07-25T13:52:04.955Z","dependency_job_id":null,"html_url":"https://github.com/godatadriven/evol","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/godatadriven/evol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godatadriven%2Fevol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godatadriven%2Fevol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godatadriven%2Fevol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godatadriven%2Fevol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/godatadriven","download_url":"https://codeload.github.com/godatadriven/evol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godatadriven%2Fevol/sbom","scorecard":{"id":433398,"data":{"date":"2025-08-11","repo":{"name":"github.com/godatadriven/evol","commit":"1274b675b2ca3c48a388fa9b167d9c140a54e6dd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Code-Review","score":8,"reason":"Found 14/16 approved changesets -- score normalized to 8","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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T03:56:26.166Z","repository_id":23933552,"created_at":"2025-08-19T03:56:26.166Z","updated_at":"2025-08-19T03:56:26.166Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28673143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T20:48:19.482Z","status":"ssl_error","status_checked_at":"2026-01-22T20:48:14.968Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["artificial-intelligence","evolutionary-algorithm","heuristics","pythonic"],"created_at":"2026-01-22T22:20:14.018Z","updated_at":"2026-01-22T22:20:14.795Z","avatar_url":"https://github.com/godatadriven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation Status](https://readthedocs.org/projects/evol/badge/?version=latest)](https://evol.readthedocs.io/en/latest/?badge=latest)[![Downloads](https://pepy.tech/badge/evol)](https://pepy.tech/project/evol)\n[![Build Status](https://dev.azure.com/godatadriven/evol/_apis/build/status/godatadriven.evol?branchName=master)](https://dev.azure.com/godatadriven/evol/_build/latest?definitionId=9\u0026branchName=master) [![Documentation Status](https://readthedocs.org/projects/evol/badge/?version=latest)](https://evol.readthedocs.io/en/latest/?badge=latest)[![Downloads](https://pepy.tech/badge/evol)](https://pepy.tech/project/evol)\n\n\n![Imgur](https://i.imgur.com/7MHcIq1.png)\n\n`Evol` is clear dsl for composable evolutionary algorithms that optimised for joy.\n\n## Installation\n\nWe currently support python3.6 and python3.7 and you can install it via pip.\n\n```\npip install evol\n```\n\n## Documentation\n\nFor more details you can read the [docs](https://evol.readthedocs.io/en/latest/) but we advice everyone to get start by first checking out the examples in the `/examples` directory. These stand alone examples should show the spirit of usage better than the docs.\n\n## The Gist\n\nThe main idea is that you should be able to define a complex algorithm\nin a composable way. To explain what we mean by this:  let's consider\ntwo evolutionary algorithms for travelling salesman problems.\n\nThe first approach takes a collections of solutions and applies:\n\n1. a survival where only the top 50% solutions survive\n2. the population reproduces using a crossover of genes\n3. certain members mutate\n4. repeat this, maybe 1000 times or more!\n\n\u003cimg src=\"https://i.imgur.com/is9g07u.png\" alt=\"Drawing\" style=\"width: 100%;\"/\u003e\n\nWe can also think of another approach:\n\n1. pick the best solution of the population\n2. make random changes to this parent and generate new solutions\n3. repeat this, maybe 1000 times or more!\n\n\u003cimg src=\"https://i.imgur.com/JRSWbTd.png\" alt=\"Drawing\" style=\"width: 100%;\"/\u003e\n\nOne could even combine the two algorithms into a new one:\n\n1. run algorithm 1 50 times\n2. run algorithm 2 10 times\n3. repeat this, maybe 1000 times or more!\n\n\u003cimg src=\"https://i.imgur.com/SZTBWX2.png\" alt=\"Drawing\" style=\"width: 100%;\"/\u003e\n\nYou might notice that many parts of these algorithms are similar and it\nis the goal of this library is to automate these parts. We hope to\nprovide an API that is fun to use and easy to tweak your heuristics in.\n\nA working example of something silimar to what is depicted above is shown below. You can also find this code as an example in the `/examples/simple_nonlinear.py`. \n\n```python\nimport random\nfrom evol import Population, Evolution\n\nrandom.seed(42)\n\ndef random_start():\n    \"\"\"\n    This function generates a random (x,y) coordinate\n    \"\"\"\n    return (random.random() - 0.5) * 20, (random.random() - 0.5) * 20\n\ndef func_to_optimise(xy):\n    \"\"\"\n    This is the function we want to optimise (maximize)\n    \"\"\"\n    x, y = xy\n    return -(1-x)**2 - 2*(2-x**2)**2\n\ndef pick_random_parents(pop):\n    \"\"\"\n    This is how we are going to select parents from the population\n    \"\"\"\n    mom = random.choice(pop)\n    dad = random.choice(pop)\n    return mom, dad\n\ndef make_child(mom, dad):\n    \"\"\"\n    This function describes how two candidates combine into a new candidate\n    Note that the output is a tuple, just like the output of `random_start`\n    We leave it to the developer to ensure that chromosomes are of the same type\n    \"\"\"\n    child_x = (mom[0] + dad[0])/2\n    child_y = (mom[1] + dad[1])/2\n    return child_x, child_y\n\ndef add_noise(chromosome, sigma):\n    \"\"\"\n    This is a function that will add some noise to the chromosome.\n    \"\"\"\n    new_x = chromosome[0] + (random.random()-0.5) * sigma\n    new_y = chromosome[1] + (random.random()-0.5) * sigma\n    return new_x, new_y\n\n# We start by defining a population with candidates.\npop = Population(chromosomes=[random_start() for _ in range(200)],\n                 eval_function=func_to_optimise, maximize=True)\n\n# We define a sequence of steps to change these candidates\nevo1 = (Evolution()\n       .survive(fraction=0.5)\n       .breed(parent_picker=pick_random_parents, combiner=make_child)\n       .mutate(func=add_noise, sigma=1))\n\n# We define another sequence of steps to change these candidates\nevo2 = (Evolution()\n       .survive(n=1)\n       .breed(parent_picker=pick_random_parents, combiner=make_child)\n       .mutate(func=add_noise, sigma=0.2))\n\n# We are combining two evolutions into a third one. You don't have to\n# but this approach demonstrates the flexibility of the library.\nevo3 = (Evolution()\n       .repeat(evo1, n=50)\n       .repeat(evo2, n=10)\n       .evaluate())\n\n# In this step we are telling evol to apply the evolutions\n# to the population of candidates.\npop = pop.evolve(evo3, n=5)\nprint(f\"the best score found: {max([i.fitness for i in pop])}\")\n```\n\nGetting Started\n---------------------------------------\n\nThe best place to get started is the `/examples` folder on github.\nThis folder contains self contained examples that work out of the\nbox.\n\n## How does it compare to ...\n\n- [... deap?](https://github.com/DEAP/deap) We think our library is more composable and pythonic while not removing any functionality. Our library may be a bit slower though.\n- [... hyperopt?](http://jaberg.github.io/hyperopt/) Since we force the user to make the actual algorithm we are less black boxy. Hyperopt is meant for hyperparameter tuning for machine learning and has better support for search in scikit learn.\n- [... inspyred?](https://pypi.org/project/inspyred/) The library offers a simple way to get started but it seems the project is less actively maintained than ours. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodatadriven%2Fevol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodatadriven%2Fevol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodatadriven%2Fevol/lists"}