[ANN] charlie 0.6.0 Released - A genetic algorithms library.

Discussion in 'Ruby' started by Sander Land, Dec 26, 2007.

  1. Sander Land

    Sander Land Guest

    Hi all,

    I'm pleased to announce the second public release of charlie, a
    genetic algorithms library for Ruby.

    This release includes a TreeGenotype, making the library useful for
    genetic programming. This is still an early version with very limited
    mutation options, and I would really appreciate suggestions on how to
    extend these.
    It also includes several performance improvements, changes for ruby
    1.9, convergence checks and improved mutator/crossover operators for
    permutations.

    ## Ruby 1.9 Compatibility
    This release is mostly compatible with Ruby 1.9.
    However, there is a bug in Ruby (#16493) that makes a lot of tests,
    and some benchmark examples fail.
    To avoid this bug, don't have two or more results of a function that
    returns a module in the same array (e.g. don't have something like
    "crossover PCross(0.5,SinglePointCrossover),
    PCross(0.5,UniformCrossover)" in your benchmarks).

    ## FEATURES:
    - Quickly develop GAs by combining several parts (genotype, selection,
    crossover, mutation) provided by the library.
    - Sensible defaults are provided with any genotype, so often you only
    need to define a fitness function.
    - Easily replace any of the parts by your own code.
    - Test different strategies in GA, and generate reports comparing
    them. Example report:
    http://charlie.rubyforge.org/example_report.html

    ## EXAMPLE
    This example finds a polynomial which approximates cos(x)

    class Cos < TreeGenotype([proc{3*rand-1.5},:x], [:+,:*,:-], [:-@])
    def fitness
    -[0,0.33,0.66,1].map{|x| (eval_genes:)x=>x) - Math.cos(x)).abs }.max
    end
    use TournamentSelection(4)
    end
    Population.new(Cos).evolve_on_console(500)

    Several other simple examples are included in the gem/tarball.

    ## INSTALLATION:
    * sudo gem install charlie

    ## Links
    * http://rubyforge.org/projects/charlie/
    * http://charlie.rubyforge.org

    ## LICENSE:
    MIT license.
     
    Sander Land, Dec 26, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thuswise Webmaster
    Replies:
    0
    Views:
    833
    Thuswise Webmaster
    Jun 28, 2003
  2. aum
    Replies:
    1
    Views:
    351
  3. Sander Land
    Replies:
    2
    Views:
    171
    Ian Leitch
    Dec 20, 2007
  4. Sander Land
    Replies:
    1
    Views:
    111
    Sander Land
    Jan 12, 2008
  5. Sander Land
    Replies:
    0
    Views:
    117
    Sander Land
    Feb 12, 2008
Loading...

Share This Page