------------------------------------------------------------------------------------------------------
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 don't 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 at least Python 2.6+ or 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 GNU General Public License
version 3.0 (GPLv3). This license can be found online at
http://www.opensource.org/licenses/gpl-3.0.html.
Resources
=========
* Homepage: http://inspyred.github.com
* Email: aaron.lee.garrett@gmail.com
Metadata
Release files for inspyred 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| inspyred-1.0.tar.gz | 81.0 kB | Without provenance | Details |
Release files / inspyred-1.0.tar.gz
| Download URL | inspyred-1.0.tar.gz |
|---|---|
| Size | 81.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5cd2f890541a4020484ccd739484ec186a5cb4138b35e8adc28375325f07f26
|
|
BLAKE2b-256 checksum How to use checksums |
87c9d3bfd1bf04778cd6e2687476aceac03519ac3f958986f3ece6733d0203bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for inspyred 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.