One of the first posts I wrote on the new version of this blog was about my genetic algorithm Ruby gem, Darwinning. I actually started building the library back in December of 2012 when I was first learning Ruby and it's gone through several updates and periods of inactivity. Usually I'll just add some tests or make a small update when I have some free time. It's been a pretty casual project. I just didn't think that there was that much of a need for a Ruby GA library, I just thought it would be fun to make.
Recently I've seen a steady stream of people starring and forking the Darwinning repo on Github and I've received some really thoughtful and helpful pull requests from people, so I wanted to give the library a bit more attention. I had some free time this weekend and used it to finish off a major feature that I had been working on and finally published the 0.1.0 version of the gem!
The major feature I added was the ability to use Darwinning in existing Ruby models via
include. This lets you utilize the library in projects that might not be specifically about genetic algorithms.
Here's my dumb, contrived example:
Then you can use some nice built in methods to generate a population of these objects and evolve them towards a fitness goal:
I've been having fun working on this project and it's really cool to see some other people contribute to the project. If you want to play around with the library or have an interest in genetic algorithms just
gem install darwinning or check out the Darwinning Github repo. There are always more updates to do, but it felt good to make some progress on this project.