Skip to content
Snippets Groups Projects
Select Git revision
  • master default
  • v1.0.0
2 results

algorithms.md

Blame
  • Algorithms

    There are different algorithms availiable for the optimization process. They all evaluate a fixed number of candidates per step. The set of candidates of a step is called a generation.

    All algorithms share the seed parameter that sets the seed of the random generator.

    Local Search

    The Local Search takes the best candidate of the last generation and mutates it randomly to generate the candidates of the next generation

    Parameters

    • parallel :: Number of candidates per generation
    • distance :: Number of flags to be altered for candidates of a generation

    Random Search

    The Random Search algorithm picks different parameters at random.

    Parameters

    • parallel :: Number of random walks that should be executed in parallel

    Hill Climber

    The Hillclimber takes the best candidate of the last generation and mutates one flag at a each step and continues with it if it is better otherwise it continues with the old candidate. When all flags ware done it starts over with the first flag.

    Parameters

    • parallel :: Number of Hillclimbers that should be executed in parallel

    Genetic Algorithm

    This algorithm is a bit more complicated. Its steps consist of three phases: selection, repopulation and mutation. At first new candidates are generated by crossover and mutation. Crossover means that two randomly chosen candidates are fused by mixing their flags. This happens by taking flags from one candidate and then randomly switch to the other. Mutation just alters random flags. Then the candidates are selected via a selection algorithm that favors good candidates. There are two different selection algorithms aviailable:

    Truncation Select

    This method just takes the best candidates and drops the rest.

    Propotional Select

    Here candidates are selected randomly, with good ones having a better chance of suvival.

    Parameters

    • population_size :: Number of candidates per generation
    • selection_method :: The selection method. This may be "truncate" or "proportional".
    • crossovers :: Number of candidates to generate via crossover
    • crossover_probability :: Probability to switch between candidates during crossover
    • mutations :: Number of candidates to generate via mutation
    • mutation_probability :: Probability for each single flag to be mutated during mutation