{"id":13837270,"url":"https://github.com/aarongarrett/inspyred","last_synced_at":"2025-10-21T13:10:01.556Z","repository":{"id":2665494,"uuid":"3656818","full_name":"aarongarrett/inspyred","owner":"aarongarrett","description":"Python library for bio-inspired computational intelligence","archived":false,"fork":false,"pushed_at":"2024-10-24T14:13:14.000Z","size":3079,"stargazers_count":195,"open_issues_count":5,"forks_count":58,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-07-05T03:46:40.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/aarongarrett.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","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.rst"}},"created_at":"2012-03-08T04:44:48.000Z","updated_at":"2025-02-08T10:36:04.000Z","dependencies_parsed_at":"2023-12-26T06:37:48.998Z","dependency_job_id":"3c00864e-0db1-4e5c-8131-d198a9a304c0","html_url":"https://github.com/aarongarrett/inspyred","commit_stats":{"total_commits":88,"total_committers":12,"mean_commits":7.333333333333333,"dds":0.5681818181818181,"last_synced_commit":"0caf899907b5037bdc3825c73830de478a11f1b9"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aarongarrett/inspyred","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarongarrett%2Finspyred","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarongarrett%2Finspyred/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarongarrett%2Finspyred/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarongarrett%2Finspyred/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aarongarrett","download_url":"https://codeload.github.com/aarongarrett/inspyred/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarongarrett%2Finspyred/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264608135,"owners_count":23636684,"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":[],"created_at":"2024-08-04T15:01:05.032Z","updated_at":"2025-10-21T13:10:01.481Z","avatar_url":"https://github.com/aarongarrett.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"======================================================================================================\n``inspyred`` -- A framework for creating bio-inspired computational intelligence algorithms in Python.\n======================================================================================================\n\n\n.. image:: https://img.shields.io/pypi/v/inspyred.svg\n        :target: https://pypi.python.org/pypi/inspyred\n        :alt: PyPi\n\n.. image:: https://github.com/aarongarrett/inspyred/actions/workflows/ci.yml/badge.svg\n        :target: https://github.com/aarongarrett/inspyred/actions/workflows/ci.yml\n        :alt: GitHub Actions\n\n.. image:: https://readthedocs.org/projects/inspyred/badge/?version=latest\n        :target: https://inspyred.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n.. image:: https://img.shields.io/github/issues-pr/aarongarrett/inspyred\n        :target: https://github.com/aarongarrett/inspyred/pulls\n        :alt: PRs\n\n.. image:: https://img.shields.io/github/issues/aarongarrett/inspyred\n        :target: https://github.com/aarongarrett/inspyred/issues\n        :alt: Issues\n\n\ninspyred is a free, open source framework for creating biologically-inspired\ncomputational intelligence algorithms in Python, including evolutionary\ncomputation, swarm intelligence, and immunocomputing. Additionally, inspyred\nprovides easy-to-use canonical versions of many bio-inspired algorithms for\nusers who do not need much customization.\n\n\nExample\n-------\n\nThe following example illustrates the basics of the inspyred package. In this\nexample, candidate solutions are 10-bit binary strings whose decimal values\nshould be maximized::\n\n    import random\n    import time\n    import inspyred\n\n    def generate_binary(random, args):\n        bits = args.get('num_bits', 8)\n        return [random.choice([0, 1]) for i in range(bits)]\n\n    @inspyred.ec.evaluators.evaluator\n    def evaluate_binary(candidate, args):\n        return int(\"\".join([str(c) for c in candidate]), 2)\n\n    rand = random.Random()\n    rand.seed(int(time.time()))\n    ga = inspyred.ec.GA(rand)\n    ga.observer = inspyred.ec.observers.stats_observer\n    ga.terminator = inspyred.ec.terminators.evaluation_termination\n    final_pop = ga.evolve(evaluator=evaluate_binary,\n                          generator=generate_binary,\n                          max_evaluations=1000,\n                          num_elites=1,\n                          pop_size=100,\n                          num_bits=10)\n    final_pop.sort(reverse=True)\n    for ind in final_pop:\n        print(str(ind))\n\n\nRequirements\n------------\n\n  * Requires Python 3+.\n  * Numpy and Matplotlib are required for several functions in ``ec.observers``.\n  * Matplotlib is required for several functions in ``ec.analysis``.\n  * Parallel Python (ppft) is required if ``ec.evaluators.parallel_evaluation_pp`` is used.\n\nYou can use the `all` extra to install inspyred with all the extra dependencies::\n\n    pip install inspyred[all]\n\nLicense\n-------\n\nThis package is distributed under the MIT License. This license can be found\nonline at http://www.opensource.org/licenses/MIT.\n\n\nResources\n---------\n\n  * Homepage: http://aarongarrett.github.io/inspyred\n  * Email: garrett@inspiredintelligence.io\n  * Documentation: https://inspyred.readthedocs.io.\n\nCiting\n------\nGarrett, A. (2012). inspyred (Version 1.0.1) [software]. Inspired Intelligence. Retrieved from https://github.com/aarongarrett/inspyred [accessed CURRENT DATE].\n\nFeatures\n--------\n\n* TODO\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faarongarrett%2Finspyred","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faarongarrett%2Finspyred","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faarongarrett%2Finspyred/lists"}