Giter Site home page Giter Site logo

ea's Introduction

Evolutionary Computation in Golang

This is really a re-implementation of a set of libraries I've developed over the years to perform evolutionary computation. I've had versions in C++, Java, C#, LISP, and even Ada. I'm re-implementing it in Go for a couple of reasons. The first is I just like the subject matter. It's fun to play "guess what converges faster."

The second is because I've always solved this problem with generics. Except for LISP (where I passed in specific algorithms as functions), the easy way to tackle a generic evolutionary computing problem was to parameterize a generic EC framework with specific implementations of behaviors. The behaviors involve how populations are constructed, how reproduction occurs, and how offspring and parents are selected.

While the behavior of specific subtype of evolutionary algorithms might involve sexual or asexual reproduction, mutation, encoding as bit-strings, etc., they all had roughly the same general outline.

  1. Generate a candidate population
  2. Produce some number of offspring
  3. Have the offspring and parents compete of space in the new generation.

Being able to parameterize an EA so as to mimic a (highly explorative) Genetic Algorithm with sexual reproduction and fitness-proportional selection or more of a μ + λ (and highly exploitive) Evolutionary Strategy is possible in a framework that views them as points along a continuum. That allows you to "shift the slider" left or right as you explore a problem space.

So what's this like without generics (which may be coming in Go 2.0). Without opening up a can of worms, generics are actually a hard language feature to implement correctly. (cough cough Java). Even then, not all parameterized constructs are equally generic. For example, a generic parameter may be required to support a specific set of operations or inherit from a specifc parent.

So it's also just interesting to take a problem that I've solved multiple times with generics and solve it with nothing more than interfaces and first-class functions.

ea's People

Contributors

pahoehne avatar paul-hoehne avatar

Watchers

 avatar  avatar

ea's Issues

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.