From 163e35dd23b228d6c620f4717ff73fa972851d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Fri, 20 Mar 2020 18:44:45 +0100 Subject: [PATCH] [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. --- tools/yulPhaser/Phaser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/yulPhaser/Phaser.cpp b/tools/yulPhaser/Phaser.cpp index 8e34a756b..d5b3bdda7 100644 --- a/tools/yulPhaser/Phaser.cpp +++ b/tools/yulPhaser/Phaser.cpp @@ -473,17 +473,17 @@ Phaser::CommandLineDescription Phaser::buildCommandLineDescription() ) ( "min-chromosome-length", - po::value()->value_name("")->default_value(12), + po::value()->value_name("")->default_value(100), "Minimum length of randomly generated chromosomes." ) ( "max-chromosome-length", - po::value()->value_name("")->default_value(30), + po::value()->value_name("")->default_value(100), "Maximum length of randomly generated chromosomes." ) ( "crossover", - po::value()->value_name("")->default_value(CrossoverChoice::SinglePoint), + po::value()->value_name("")->default_value(CrossoverChoice::Uniform), ( "Type of the crossover operator to use.\n" "\n" @@ -542,7 +542,7 @@ Phaser::CommandLineDescription Phaser::buildCommandLineDescription() classicGeneticAlgorithmDescription.add_options() ( "classic-elite-pool-size", - po::value()->value_name("")->default_value(0), + po::value()->value_name("")->default_value(0.25), "Percentage of population to regenerate using mutations in each round." ) (