Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    inspyred 1.0

    Download button

    No screenshots available
    Downloads: 140  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Aaron Garrett | More programs
    GPL v3 / FREE
    April 5th, 2012, 10:27 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    inspyred description

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

    inspyred is a free and open source Python 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 ECsPy 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))



    Product's homepage

    Requirements:

    · Python
    · NumPy
    · Matplotlib
    · PP

      


    TAGS:

    bio-inspired computational | Python library | intelligence algorithms | Python | bio-inspired | computational

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM