alogos.systems.cfggp._parameters

Default parameters for CFG-GP.


Detailed object descriptions

alogos.systems.cfggp._parameters.default_parameters

Default parameters for CFG-GP.

These values can be changed to affect the default behavior of CFG-GP when used in a search algorithm. Note that the default values can also be overwritten by passing parameters to the constructor of a search algorithm.

Parameters:
  • max_depth (int, default=17)

  • max_expansions (int, default=1_000_000)

  • init_ind_operator (str, default=”random_genotype”) – Possible values:

    • "given_genotype"

    • "given_derivation_tree"

    • "given_phenotype"

    • "random_genotype"

    • "gp_grow_tree"

    • "pi_grow_tree"

    • "gp_full_tree"

    • "ptc2_tree"

  • init_ind_given_genotype (Genotype, default=`None`)

  • init_ind_given_derivation_tree (DerivationTree, default=`None`)

  • init_ind_given_phenotype (str, default=`None`)

  • init_ind_gp_grow_max_depth (int, default=8)

  • init_ind_gp_full_max_depth (int, default=8)

  • init_ind_pi_grow_max_depth (int, default=8)

  • init_ind_ptc2_max_expansions (int, default=50)

  • init_pop_operator (str, default=”ptc2”) – Possible values:

    • "given_genotypes"

    • "given_derivation_trees"

    • "given_phenotypes"

    • "random_genotypes"

    • "gp_rhh"

    • "pi_rhh"

    • "ptc2"

  • init_pop_size (int, default=100) – This parameter is used by population initialization operators. Caution: Search methods like EvolutionaryAlgorithm come with the parameter population_size, which determines the size of the population both during initialization and during the search, therefore overwriting the value of init_pop_size.

  • init_pop_given_genotypes (list of Genotype, default=`None`)

  • init_pop_given_derivation_trees (list of DerivationTree, default=`None`)

  • init_pop_given_phenotypes (list of str, default=`None`)

  • init_pop_gp_rhh_start_depth (int, default=2)

  • init_pop_gp_rhh_end_depth (int, default=17)

  • init_pop_pi_rhh_start_depth (int, default=2)

  • init_pop_pi_rhh_end_depth (int, default=17)

  • init_pop_ptc2_start_expansions (int, default=20)

  • init_pop_ptc2_end_expansions (int, default=240)

  • init_pop_unique_genotypes (bool, default=False)

  • init_pop_unique_phenotypes (bool, default=True)

  • init_pop_unique_max_tries (int, default=100000)

  • mutation_operator (str, default=”subtree_replacement”) – Possible values:

    • "subtree_replacement"

  • crossover_operator (str, default=”subtree_exchange”) – Possible values:

    • "subtree_exchange"

  • neighborhood_operator (str, default=”subtree_replacement”) – Possible values:

    • "subtree_replacement"

  • neighborhood_distance (int, default=1)

  • neighborhood_max_size (int, default=100)

  • neighborhood_only_terminals (bool, default=False)