Giter Club home page Giter Club logo

inspyred's Introduction

inspyred -- A framework for creating bio-inspired computational intelligence algorithms in Python.

Documentation Status Updates

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 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 MIT License. This license can be found online at http://www.opensource.org/licenses/MIT.

Resources

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.

inspyred's People

Contributors

aarongarrett avatar sanjayankur31 avatar jschueller avatar epiasini avatar rgerkin avatar richardjgowers avatar albertotonda avatar galaunay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.