Skip to content

Create a separate class for the args dict to be used in the GeneticAlgorithm #44

@gnypit

Description

@gnypit

What the args dict should look like:

args = {
        'genome': (g1, g2, ...),
        'selection': [(s11, s12, ...), ..., (sN1, sN2, ...)],
        'crossover': [(c11, c12, ...), ..., (cM1, cM2, ...)]
}

Where:

  1. g1, g2, etc., are args for the genome_generator func;
  2. s11, s12, etc., are args for the 1st selection operator passed in the selection_operators list of func and sN1, sN2, etc., are args of the Nth selection operator;
  3. c11, c12, etc., are args for the 1st crossover operator passed in the crossover_operators list of func and cM1, cM2, etc., are args of the Mth crossover operator.

Let's create a class for that to enforce this format inside the GeneticAlgorithm.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions