Optimization Algorithms - MBtech/stormbenchmark GitHub Wiki

The wiki is a WIP at the moment

Optimization Algorithms

The tuning directory of the repository contains following optimization algorithms:

  • Hill climbing algorithm
  • Modified hill climbing algorithm
  • Rule based algorithm
  • Random recursive search
  • Nelder mead
  • Genetic algorithm

Description of these algorithms will be added shortly

Hill Climbing Algorithm

Modified Hill Climbing Algorithm

Rule based algorithm

Genetic Algorithm

The genetic algorithm implementation is fairly simply. The main code for genetic algorithm in ga.py is surrounded by alot of glue and support code to make it work for Apache Storm but the core algorithm is shown in the following pseudocode-like description:

GeneticAlgorithm():
    TotalIterations=50
    I=10
    Generate initial sample set of size I using LHS 
    For TotalIterations-I runs:
         Generate a parent set consisting of top T% candidates 
         Add L% of the remaining candidates to the parent set
         Randomly select two parents from the parent set
         Cross over these parents to generate a child
         With probability M% mutate one of the features of the child
         Get the fitness of this child and add it to the parent set

The actual implementation can be easily transformed to allow for generation for multiple children from parent set but currently only one child is produced from a single couple of parents because one configuration is tested at a time anyways.

The algorithm can be tried out using (given that everything else is setup)

python ga.py yamlfiles/conf_rollingtopwords_hc.yaml rollingtopwords.yaml lat_90,throughput=150000 yamlfiles/relations.yaml