Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 2.71 KB

README.creole

File metadata and controls

63 lines (49 loc) · 2.71 KB

Garth - Genetic AlgoRiTHm

Copyright 2010 Korovasoft, Inc.

Available under the terms of the Apache Public License, version 2.0 See LICENSE file for details.

Overview

Garth is designed as a framework for writing customized highly parallel genetic algorithm software. It is designed to be incorporated into your existing simulation or research software as an optimization addon.

Garth can also be treated as a standalone GA toolkit, requiring only that one write a fitness function plugin. It comes equipped with a web application called the Monitor which allows you to design, deploy and of course monitor genetic algorithms experiments.

Architecture

Garth is designed in a highly modular fashion, making it easy to customize specific components of the genetic algorithms process to your needs.

For example, the most common situation is that your fitness measure will need to be determined by some outside software package. This is a big hurdle for GA toolkits that require you to write your fitness functions in a hand-rolled scripting language. With Garth, you simply write a module that bridges your existing software to garth by taking in a byte array representing the genome and returning the fitness score as determined by your outside software.

Development / Installation

Scrum Story List: https://www.pivotaltracker.com/projects/149225

Depends on mysql-connector-java-5.0.8-bin.jar. Also, you'll have to build it with Eclipse or write your own build scripts, because I couldn't figure out how to make Helios export an AntScript

Fire up mysql, create a database, set the db name, user, and pass in KSDistGAConfig.java (yeah, I know. You wanna fix it for me?) and then run KSDistGABootloader. This will prep all the tables (all one of them ;-) and then exit.

Now start the tools/distributed_ga_monitor.pl script (but first you'll have to re-enter the db name/user/pass in there as well. It's the 2nd or 3rd line that calls DBI->connect()) and it will start reporting on some basic statistics, such as how many new organisms have been created (right now, 0) and what the min/max/avg fitness score is.

Now fire up a couple of KSDistGAWorker processes (1 per cpu is about the tops in my testing, because remember you'll have a LOT of MySQL overhead) and watch it roll!

Also, you will probably want to have written your own fitness function in KSFitnessFunction.evaluate or it will just use my crappy example one. Remember, All the genes are doubles on [0,1], so it is YOUR JOB to map these values to an appropriate alphabet for each gene before computing your fitness function. I am forcing this restriction in order to keep the mutation statistics easy, also it's not that much of a pain in your ass, so stop bitching...