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

    ECsPy 1.1

    Download button

    No screenshots available
    Downloads: 466  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Poor (1.0/5)
    1 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Aaron Garrett | More programs
    GPL v3 / FREE
    February 9th, 2012, 14:30 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    ECsPy description

    Evolutionary Computations in Python

    ECsPy is a free and open source framework for creating evolutionary computations in Python. Additionally, ECsPy provides an easy-to-use canonical genetic algorithm (GA), evolution strategy (ES), and particle swarm optimizer (PSO) for users who don't need much customization.

    Background

    An extensive background on evolutionary computation, including references to the relevant academic literature, can be found in the Project Wiki. You can also find a great deal of information from the Wikipedia links on the right.
    Package Structure

    ECsPy consists of the following 6 modules:

    * ec.py -- provides the basic framework for the Evolution Engine and specific ECs
    * observers.py -- defines a few built-in (screen and file) observers
    * replacers.py -- defines standard replacement schemes such as generational and steady-state replacement
    * selectors.py -- defines standard selectors (e.g., tournament)
    * terminators.py -- defines standard terminators (e.g., exceeding a maximum number of generations)
    * variators.py -- defines standard variators (crossover and mutation schemes such as n-point crossover)

    Example

    The following example illustrates the basics of the ECsPy package. Additional examples can be found under the Examples wiki.

    from random import Random
    from time import time
    from ecspy import ec
    from ecspy import terminators
    from ecspy import observers


    def generate_binary(random, args):
     try:
     bits = args['num_bits']
     except KeyError:
     bits = 8
     return [random.choice([0, 1]) for i in xrange(bits)]
     
    def evaluate_binary(candidates, args):
     fitness = []
     try:
     base = args['base']
     except KeyError:
     base = 2
     for cand in candidates:
     num = 0
     exp = len(cand) - 1
     for c in cand:
     num += c * (base ** exp)
     exp -= 1
     fitness.append(num)
     return fitness

    rand = Random()
    rand.seed(int(time()))
    ga = ec.GA(rand)
    ga.observer = observers.screen_observer
    final_pop = ga.evolve(evaluator=evaluate_binary,
     generator=generate_binary,
     terminator=terminators.fun_eval_termination,
     max_fun_evals=1000,
     num_elites=1,
     pop_size=100,
     num_bits=10)
    for ind in final_pop:
     print(str(ind))



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    evolutionary computations | Python library | genetic algorithm | Python | evolutionary | computations

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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