inspyred


Nameinspyred JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/aarongarrett/inspyred
SummaryA framework for creating bio-inspired computational intelligence algorithms in Python
upload_time2023-11-02 16:34:10
maintainer
docs_urlhttps://pythonhosted.org/inspyred/
authorAaron Garrett
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ======================================================================================================
``inspyred`` -- A framework for creating bio-inspired computational intelligence algorithms in Python.
======================================================================================================


.. image:: https://img.shields.io/pypi/v/inspyred.svg
        :target: https://pypi.python.org/pypi/inspyred
        :alt: PyPi

.. image:: https://github.com/aarongarrett/inspyred/actions/workflows/ci.yml/badge.svg
        :target: https://github.com/aarongarrett/inspyred/actions/workflows/ci.yml
        :alt: GitHub Actions

.. image:: https://readthedocs.org/projects/inspyred/badge/?version=latest
        :target: https://inspyred.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

.. image:: https://img.shields.io/github/issues-pr/aarongarrett/inspyred
        :target: https://github.com/aarongarrett/inspyred/pulls
        :alt: PRs

.. image:: https://img.shields.io/github/issues/aarongarrett/inspyred
        :target: https://github.com/aarongarrett/inspyred/issues
        :alt: Issues


inspyred is a free, open source framework for creating biologically-inspired
computational intelligence algorithms in Python, including evolutionary
computation, swarm intelligence, and immunocomputing. Additionally, inspyred
provides easy-to-use canonical versions of many bio-inspired algorithms for
users who do not need much customization.


Example
-------

The following example illustrates the basics of the inspyred package. In this
example, candidate solutions are 10-bit binary strings whose decimal values
should be maximized::

    import random
    import time
    import inspyred

    def generate_binary(random, args):
        bits = args.get('num_bits', 8)
        return [random.choice([0, 1]) for i in range(bits)]

    @inspyred.ec.evaluators.evaluator
    def evaluate_binary(candidate, args):
        return int("".join([str(c) for c in candidate]), 2)

    rand = random.Random()
    rand.seed(int(time.time()))
    ga = inspyred.ec.GA(rand)
    ga.observer = inspyred.ec.observers.stats_observer
    ga.terminator = inspyred.ec.terminators.evaluation_termination
    final_pop = ga.evolve(evaluator=evaluate_binary,
                          generator=generate_binary,
                          max_evaluations=1000,
                          num_elites=1,
                          pop_size=100,
                          num_bits=10)
    final_pop.sort(reverse=True)
    for ind in final_pop:
        print(str(ind))


Requirements
------------

  * Requires Python 3+.
  * Numpy and Pylab are required for several functions in ``ec.observers``.
  * Pylab and Matplotlib are required for several functions in ``ec.analysis``.
  * Parallel Python (pp) is required if ``ec.evaluators.parallel_evaluation_pp`` is used.


License
-------

This package is distributed under the MIT License. This license can be found
online at http://www.opensource.org/licenses/MIT.


Resources
---------

  * Homepage: http://aarongarrett.github.io/inspyred
  * Email: garrett@inspiredintelligence.io
  * Documentation: https://inspyred.readthedocs.io.

Citing
------
Garrett, A. (2012). inspyred (Version 1.0.1) [software]. Inspired Intelligence. Retrieved from https://github.com/aarongarrett/inspyred [accessed CURRENT DATE].

Features
--------

* TODO

Credits
---------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aarongarrett/inspyred",
    "name": "inspyred",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/inspyred/",
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Aaron Garrett",
    "author_email": "garrett@inspiredintelligence.io",
    "download_url": "https://files.pythonhosted.org/packages/f6/ac/d5e154416e1290e050adb2cc995d5cc038db1749c5cb2601d96b6d7f5c92/inspyred-1.0.2.tar.gz",
    "platform": null,
    "description": "======================================================================================================\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 Pylab are required for several functions in ``ec.observers``.\n  * Pylab and Matplotlib are required for several functions in ``ec.analysis``.\n  * Parallel Python (pp) is required if ``ec.evaluators.parallel_evaluation_pp`` is used.\n\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",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A framework for creating bio-inspired computational intelligence algorithms in Python",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/aarongarrett/inspyred"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3695611721e56bf1e7c4c248bb0b59c5035663e64331196cf2c2bcb5350682a9",
                "md5": "2a8c474d243fbd4f403e8afdc61f8578",
                "sha256": "6df4fa5c3e9ff467981f3e98e253fa04ca161d92e70cdc15075e27e6439438f2"
            },
            "downloads": -1,
            "filename": "inspyred-1.0.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2a8c474d243fbd4f403e8afdc61f8578",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 74438,
            "upload_time": "2023-11-02T16:34:08",
            "upload_time_iso_8601": "2023-11-02T16:34:08.225361Z",
            "url": "https://files.pythonhosted.org/packages/36/95/611721e56bf1e7c4c248bb0b59c5035663e64331196cf2c2bcb5350682a9/inspyred-1.0.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f6acd5e154416e1290e050adb2cc995d5cc038db1749c5cb2601d96b6d7f5c92",
                "md5": "effb9566d37ed4ec6aa7b6e495f3b5ac",
                "sha256": "4a8437e1818b8be5e2c7964ce6dc4df9678389e8caeb597b6f07083eb1aeae1e"
            },
            "downloads": -1,
            "filename": "inspyred-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "effb9566d37ed4ec6aa7b6e495f3b5ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4416262,
            "upload_time": "2023-11-02T16:34:10",
            "upload_time_iso_8601": "2023-11-02T16:34:10.984163Z",
            "url": "https://files.pythonhosted.org/packages/f6/ac/d5e154416e1290e050adb2cc995d5cc038db1749c5cb2601d96b6d7f5c92/inspyred-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-02 16:34:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aarongarrett",
    "github_project": "inspyred",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "inspyred"
}
        
Elapsed time: 0.14459s