mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[yul-phaser] Tweak default values according to experiment results
- Long chromosomes in the intial population are better. Set minimum and maximum to 100. - The classic algorithm does not work well without elite. 50% performed better but I think it might be too large. Let's set it to 25%. - Switch to uniform crossover since this is what was used in most experiments and performed well.
This commit is contained in:
parent
35395a4b9c
commit
163e35dd23
@ -473,17 +473,17 @@ Phaser::CommandLineDescription Phaser::buildCommandLineDescription()
|
|||||||
)
|
)
|
||||||
(
|
(
|
||||||
"min-chromosome-length",
|
"min-chromosome-length",
|
||||||
po::value<size_t>()->value_name("<NUM>")->default_value(12),
|
po::value<size_t>()->value_name("<NUM>")->default_value(100),
|
||||||
"Minimum length of randomly generated chromosomes."
|
"Minimum length of randomly generated chromosomes."
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
"max-chromosome-length",
|
"max-chromosome-length",
|
||||||
po::value<size_t>()->value_name("<NUM>")->default_value(30),
|
po::value<size_t>()->value_name("<NUM>")->default_value(100),
|
||||||
"Maximum length of randomly generated chromosomes."
|
"Maximum length of randomly generated chromosomes."
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
"crossover",
|
"crossover",
|
||||||
po::value<CrossoverChoice>()->value_name("<NAME>")->default_value(CrossoverChoice::SinglePoint),
|
po::value<CrossoverChoice>()->value_name("<NAME>")->default_value(CrossoverChoice::Uniform),
|
||||||
(
|
(
|
||||||
"Type of the crossover operator to use.\n"
|
"Type of the crossover operator to use.\n"
|
||||||
"\n"
|
"\n"
|
||||||
@ -542,7 +542,7 @@ Phaser::CommandLineDescription Phaser::buildCommandLineDescription()
|
|||||||
classicGeneticAlgorithmDescription.add_options()
|
classicGeneticAlgorithmDescription.add_options()
|
||||||
(
|
(
|
||||||
"classic-elite-pool-size",
|
"classic-elite-pool-size",
|
||||||
po::value<double>()->value_name("<FRACTION>")->default_value(0),
|
po::value<double>()->value_name("<FRACTION>")->default_value(0.25),
|
||||||
"Percentage of population to regenerate using mutations in each round."
|
"Percentage of population to regenerate using mutations in each round."
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
|
Loading…
Reference in New Issue
Block a user