{"id":13686398,"url":"https://github.com/tlemo/darwin","last_synced_at":"2026-01-14T08:01:30.125Z","repository":{"id":54578540,"uuid":"157114747","full_name":"tlemo/darwin","owner":"tlemo","description":"Evolutionary Algorithms Framework","archived":false,"fork":false,"pushed_at":"2025-03-16T03:29:17.000Z","size":15707,"stargazers_count":115,"open_issues_count":0,"forks_count":21,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-01-08T02:39:19.750Z","etag":null,"topics":["ai","evolution","evolutionary-algorithms","genetic-algorithms","genetic-programming","ml","neuroevolution"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tlemo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-11T19:46:24.000Z","updated_at":"2025-12-31T22:05:41.000Z","dependencies_parsed_at":"2025-05-01T09:42:32.114Z","dependency_job_id":null,"html_url":"https://github.com/tlemo/darwin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tlemo/darwin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlemo%2Fdarwin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlemo%2Fdarwin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlemo%2Fdarwin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlemo%2Fdarwin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlemo","download_url":"https://codeload.github.com/tlemo/darwin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlemo%2Fdarwin/sbom","scorecard":{"id":889347,"data":{"date":"2025-08-11","repo":{"name":"github.com/tlemo/darwin","commit":"669dd93f931e33e501e49155d4a7ba09297ad5a9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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":"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":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"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-44cc-43rp-5947","Warn: Project is vulnerable to: PYSEC-2021-130 / GHSA-4952-p58q-6crx","Warn: Project is vulnerable to: GHSA-9q39-rmj3-p4r2"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T11:11:19.769Z","repository_id":54578540,"created_at":"2025-08-24T11:11:19.769Z","updated_at":"2025-08-24T11:11:19.769Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"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":["ai","evolution","evolutionary-algorithms","genetic-algorithms","genetic-programming","ml","neuroevolution"],"created_at":"2024-08-02T15:00:31.639Z","updated_at":"2026-01-14T08:01:30.085Z","avatar_url":"https://github.com/tlemo.png","language":"C++","readme":"\n![](docs/images/unicycle_demo.gif)\n\n# Darwin Neuroevolution Framework\n\nDarwin is a framework intended to make Neuroevolution experiments easy, quick and fun. It\nprovides building blocks, samples and tooling to avoid the repetitive (and potentially\ncomplex) scaffolding required to research new ideas.\n\nThe current implementation is a combination of portable C++ (running on Linux,\nWindows and macOS), augmented by a collection of Python [scripts](scripts/docs/scripts.md)\nfor post-processing recorded evolution traces.\n\nExperimental [Python bindings][4] are underway.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tlemo/darwin/master?urlpath=lab/tree/notebooks)\n\n## What's New\n\nPlease see the [changelog](CHANGELOG.md) for the latest updates.\n\n## Getting Started\n\n\u003e Read the setup instructions before cloning the repository\n\n- [Setup Instructions](docs/setup.md)\n- [Documentation][1]\n- [Scripts](scripts/docs/scripts.md)\n- [Python Bindings][4]\n- [Contributing](CONTRIBUTING.md)\n\n## Evolutionary Algorithms and Neuroevolution\n\n[Evolutionary Algorithms][3] are a class of nature-inspired algorithms based on the idea\nthat a few basic mechanisms, loosely inspired by biological evolution (selection,\nreproduction and mutation) can be the building blocks for efficient searches in complex\nproblem spaces. In particular, we can use Evolutionary Algorithms to train artificial\nneural networks: [Neuroevolution][2].\n\nStarting with a random initial _population_, we seek to evolve towards better solutions in\na iterative fashion: each iteration (_generation_) attempts to combine (_crossover_) the\nmost promising traits (_selection_) from the previous one, occasionally making random\ntweaks (_mutation_):\n\n![Evolve!](docs/images/evolution.svg)\n\nAt a high level, the generic structure of an evolutionary algorithm can be as simple as:\n\n```python\n    initialize_population\n    while(not satisfied):\n        for_each individual:\n            evaluate_fitness\n        next_generation:\n            select_parents\n            use crossover \u0026 mutation to generate children\n```\n\nThis conceptual simplicity makes Evolutionary Algorithms attractive and easy to implement,\nalthough creating interesting domain-specific fitness functions and supporting a\nstructured experimentation approach requires a lot of scaffolding: persisting experiment\nvariations and results, visualizations, reports, profiling, etc. This is where the Darwin\nFramework comes in.\n\n## Darwin Neuroevolution Framework Overview\n\nAt the highest level, the core concepts are the [Domain] and the [Population]. The former\ndescribes what we're trying to solve, while the latter encapsulates the solution model(s)\ntogether with the specific evolutionary algorithm(s) used to search for better solutions.\n\nThe [Domain] and [Population] interfaces intentionally decouple the two concepts: domains\ndon't know anything about the details of a particular population implementation, and the \nonly thing a population knows about a domain is the number of inputs and outputs.\n\n#### Domains\n\nA [Domain] implementation defines the problem space: the \"shape\" of a solution (the number\nof inputs \u0026 outputs) and how to assign a fitness value to a particular solution.\n\nIn our case, a solution instance is encoded as a [Genotype] and it's evaluated indirectly\nthrough its phenotypic expression (the corresponding [Brain]).\n\nFor example, [Pong] is a domain implementation which simulates the classic 2-player \narcade game. It defines 6 inputs + 2 outputs, and it calculates the fitness of every\ngenotype in the population based solely on the results of a tournament between the\npopulation individuals themselves (so the evolved solutions don't incorporate any a priori\nknowledge of what a good game play looks like)\n\n#### Populations\n\nA [Population] is simply a set of [Genotypes][Genotype], together with the ability to \ngenerate new generations (after a [Domain] implementation evaluates and assigns fitness \nvalues to all the individual genotypes in the population)\n\nThe [Genotype] is an encoding for a particular solution and the \"recipe\" to construct the\ncorresponding [Brain] (the \"phenotype\") with the number of inputs and outputs specified by\nthe domain selected in the active experiment.\n\n#### Summary\n\nHere's how all these pieces fit together:\n\n![Key Interfaces](docs/images/darwin_overview.svg)\n\nUsing these interfaces, the general structure of the evolution driver code is illustrated\nbelow (this evolution top loop, with a few additions, is provided by the Darwin\nFramework so we don't have to re-implement it for every new experiment)\n\n```cpp\npopulation-\u003ecreatePrimordialGeneration(population_size);\nwhile (domain-\u003eevaluatePopulation(population)) {\n    population-\u003erankGenotypes();\n    population-\u003ecreateNextGeneration();\n}\n```\n\nThis is everything required to know in order to experiment with new problems (domains) or\nimplement new evolutionary algorithms (the populations). Everything else in the Darwin \nFramework exists to provide support for these concepts: persistance for storing experiment\nresults, UI, tracking and visualizing experiments, common building blocks, tools to\nanalyze the results, etc.\n\nFor additional information see the [full documentation][1].\n\n## Darwin Studio\n\nDarwin Studio is a visual integrated environment used to create, run and visualize\nexperiments:\n\n![Darwin Studio](docs/images/darwin_studio.png)\n\nCurrently it's the main user-facing tool included in the Darwin Framework, although there\nare plans to add additional options (for example a command line driver and/or Python\nbindings). For post-processing experiment results there are Python\n[scripts](scripts/docs/scripts.md) which can parse Darwin universe databases.\n\n\n## Running Experiments \u0026 The Universe Database\n\nEvery instance of an experiment is persisted in a [Universe] database, which is\nimplemented as a single Sqlite file. The key data model concepts are:\n\n- [Universe]: the persistent storage for a set of experiments.\n- [Experiment]: loosely speaking, a [Domain] / [Population] pair.\n- [Variation]: a specific set of configuration values for an experiment.\n- [Trace]: the recording of a particular experiment variation run.\n\nNormally, each [Domain] and [Population] implementation comes with a set of configuration\nproperties which can be edited before starting an experiment. For each set of values\nthere's a [Variation] associated with the [Experiment]. Every time an experiment variation\nis started, a new [Trace] is created to record the history/results of the experiment.\n\nThe database schema models the structural relationships, while the actual configuration\nvalues and results are stored as JSON strings (the fields highlighted in green):\n\n![Darwin Data Model](docs/images/darwin_data_model.svg)\n\n## Related projects\n\nIt's worth mentioning a few similar projects. Many of them are focused on RL rather than\nEA (while some cover both and more) but they overlap in interesting ways with the Darwin \nFramework:\n\n- [SharpNEAT](http://sharpneat.sourceforge.net)\n- [Open AI Gym](https://gym.openai.com)\n- [Pyevolve](http://pyevolve.sourceforge.net)\n- DeepMind's [TRFL](https://deepmind.com/blog/trfl)\n- [Reinforcement Learning Coach](https://nervanasystems.github.io/coach/index.html)\n- [Dopamine](https://github.com/google/dopamine)\n- [OpenNERO](https://github.com/nnrg/opennero/wiki)\n- [ESTool](https://github.com/hardmaru/estool)\n- [Neataptic](https://wagenaartje.github.io/neataptic)\n- [DEAP](https://deap.readthedocs.io/en/master)\n- [PyBrain](http://www.pybrain.org/pages/home)\n- [Maja Machine Learning Framework](http://mmlf.sourceforge.net)\n\nDarwin Framework was created with the following goals and design principles in mind:\n\n- **First class support for Evolutionary Algorithms concepts** (population, generation,\n    genotype/phenotype), without specializing on a particular EA flavor. This allows\n    simple interfaces for implementing new algorithms (and domains) while accommodating\n    a wide variety of algorithms (Neuroevolution, GP, GEP, ...)\n- **Capable of running interesting experiments on easily available hardware**\n    (no expensive GPU or data center required). There are plans to take advantage of both\n    GPUs and distributed platforms in the future.\n- **Complete package**: creating \u0026 running experiments, visualizing the progress and the final\n     results, interacting with the solutions, and more. Currently Darwin Studio is the\n     central part of the framework and it aims to offer a familiar integrated environment\n     UI (_it may be worth noting that the Darwin Framework would score well against John\n     R. Koza's wish list mentioned in the seminal Genetic Programming book_)\n- **Structured approach to experimentation**: all the experiment runs are automatically\n    recorded, including the experiment variation \"lineage\"\n- **Cross-platform with minimal external dependencies**\n\n---\n\nThis is not an officially supported Google product.\n\n[1]: https://tlemo.github.io/darwin\n[2]: https://en.wikipedia.org/wiki/Neuroevolution\n[3]: https://en.wikipedia.org/wiki/Evolutionary_algorithm\n[4]: bindings/python/docs/tutorial.md\n\n[Genotype]: https://tlemo.github.io/darwin/classdarwin_1_1_genotype.html\n[Brain]: https://tlemo.github.io/darwin/classdarwin_1_1_brain.html\n[Population]: https://tlemo.github.io/darwin/classdarwin_1_1_population.html\n[Domain]: https://tlemo.github.io/darwin/classdarwin_1_1_domain.html\n[Pong]: https://tlemo.github.io/darwin/classpong_1_1_pong.html\n[Universe]: https://tlemo.github.io/darwin/classdarwin_1_1_universe.html\n[Experiment]: https://tlemo.github.io/darwin/structdarwin_1_1_db_experiment.html\n[Variation]: https://tlemo.github.io/darwin/structdarwin_1_1_db_experiment_variation.html\n[Trace]: https://tlemo.github.io/darwin/structdarwin_1_1_db_evolution_trace.html\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlemo%2Fdarwin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlemo%2Fdarwin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlemo%2Fdarwin/lists"}